今天看见一段代码,有点懵懂,如下
Get_arg(Buff, &argc, argv);
{//命令字符串为空
return;
}
static void Get_arg(U8 *cmdline, U8 *argc, U8 **argv)
{
#define STATE_WHITESPACE 0
#define STATE_WORD 1
U8 *c = NULL;
int state = STATE_WHITESPACE;
int i = 0;
*argc = 0;
if(strlen((const char*)cmdline) == 0)
c = cmdline;
while(*c != '