Displaying 1 result from an estimated 1 matches for "iargv".
Did you mean:
ifargv
2010 Sep 16
1
[RFC] function to parse string to argc/argv pair
...Try 1 at parsing a string to an argc/argv pair. use
free_args1 to free memory malloc'd
*
* Derived from com32/lib/sys/argv.c:__parse_argv()
* Copyright 2004-2009 H. Peter Anvin - All Rights Reserved
* Copyright 2009 Intel Corporation; author: H. Peter Anvin
*/
int parse_args1(char ***iargv, const char *istr)
{
int argc = 0;
const char *p;
char *q, *r, *args, **arg;
int sp = 1; //, qt = 0; /* Was a space; inside a quote */
/* Scan 1: Length */
/* I could eliminate this if I knew a max length, like strncpy() */
int len = strlen(istr);
/* Scan 2: Copy...