- Introducted Arg2Tcl as a replacement for some calls to Arg2Text

- Fixed a memory leak
This commit is contained in:
zolliker
2006-04-11 07:26:55 +00:00
parent e25fb68080
commit da3dfd9d76
11 changed files with 184 additions and 92 deletions

View File

@ -73,4 +73,19 @@ typedef struct _TokenEntry {
/*!
isNumeric test if pText is a number
!*/
char *Arg2Tcl(int argc, char *argv[], char *buffer, int buffersize);
/*!
Arg2Tcl converts an argc, argv[] pair into a line of
text. Args are quoted if needed, in order to be interpreted as
proper tcl command. If buffer is NULL or the result longer than
buffersize, the result is allocated by Arg2Tcl.
If the results fits the buffer, buffer is returned.
If no memory is available or any element of argv is NULL, NULL is
returned.
The result has to be freed by the caller after use be something like:
if (result != NULL && result != buffer) free(result);
!*/
#endif