Programming, System Programming, Win32, C.
cwd[1024]; int i; for (;;) { if (GetCurrentDirectory(1024, cwd) == 0) ExitSys("GetCurrentDirectory", EXIT_FAILURE); printf("%s>", cwd); gets(g_cmd); Parse(); if (g_nparams == 0) continue; for (i = 0; g_cmds[i].name != NULL; ++i) if (!strcmp(g_cmds[i].name, g_params[0])) { g_cmds[i].Proc(); break; }