- Introducted Arg2Tcl as a replacement for some calls to Arg2Text
- Fixed a memory leak
This commit is contained in:
15
splitter.h
15
splitter.h
@ -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
|
||||
|
Reference in New Issue
Block a user