--- libaitio/inc/aitio.h 2010/03/09 09:26:27 1.2 +++ libaitio/inc/aitio.h 2010/04/16 13:33:00 1.4.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitio.h,v 1.2 2010/03/09 09:26:27 misho Exp $ +* $Id: aitio.h,v 1.4.2.1 2010/04/16 13:33:00 misho Exp $ * *************************************************************************/ #ifndef __AITIO_H @@ -29,6 +29,7 @@ struct tagIOURL { char *url_reserved; }; + // io_GetErrno() Get error code of last operation inline int io_GetErrno(); // io_GetError() Get error text of last operation @@ -113,15 +114,55 @@ inline int io_MakeAV(const char * __restrict csArgs, c */ inline int io_SizeArray(const char *csArgs, const char *csDelim); /* - * io_MakeArray() Parse and make array of arguments values - * @psArgs = Input arguments line + * io_MakeArray() Parse and make array of arguments values ... + * (input string will be modified! and output array must be free) + * @psArgs = Input arguments line, after execute string is modified!!! * @csDelim = Delimiter(s) for separate * @args = Output array of arguments ... (must be free() after procced function!) - * @nargs = Requested count of arguments + * @nargs = Maximum requested count of arguments from input string psArgs * return: 0 error format; -1 error:: can`t read; >0 ok, number of readed items */ inline int io_MakeArray(char * __restrict psArgs, const char *csDelim, char *** __restrict args, int nargs); + +/* + * io_UnquotStr() Remove quots from input text string + * @psLine = Text string + * return: 0 nothing to do; 1 successful unquoted string +*/ +inline int io_UnquotStr(unsigned char * __restrict psLine); +/* + * io_LTrimStr() Remove left whitespaces from text string + * @psLine = Text string + * return: 0 nothing to do; !=0 Removed bytes +*/ +inline int io_LTrimStr(unsigned char * __restrict psLine); +/* + * io_RTrimStr() Remove right whitespaces from text string + * @psLine = Text string + * return: 0 nothing to do; !=0 Removed bytes +*/ +inline int io_RTrimStr(unsigned char * __restrict psLine); +/* + * io_TrimStr() Remove left and right whitespaces from text string + * @psLine = Text string + * return: 0 nothing to do; !=0 Removed bytes +*/ +inline int io_TrimStr(unsigned char * __restrict psLine); +/* + * io_Char2Hex() Convert from Char string to Hex string + * @psLine = Text string + * @lineLen = Length of Text string + * return: NULL nothing to do or error; !=0 Allocated new converted string(must be free) +*/ +inline char *io_Char2Hex(unsigned char *psLine, int lineLen); +/* + * io_Hex2Char() Convert from Hex string to Char string + * @psLine = Text string + * @lineLen = Length of Text string + * return: NULL nothing to do or error; !=0 Allocated new converted string(must be free) +*/ +inline char *io_Hex2Char(unsigned char *psLine, int lineLen); /* * ioURLGet() Parse and get data from input URL