Programming, System Programming, Win32, C.
void Parse(void) { char *param; g_nparams = 0; for (param = strtok(g_cmd, " \t"); param != NULL; param = strtok(NULL, " \t")) g_params[g_nparams++] = param; } void DirProc(void) { printf("dir\n"); } void ClsProc(void) { if (g_nparams > 1) { printf("too many arguments...\n\n"); return; }