static HANDLE heventChild;
#endif
+sys_t sys;
/*
===============================================================================
// give QHOST a chance to hook into the console
if ((t = COM_CheckParm ("-HFILE")) > 0)
{
- if (t < com_argc)
- hFile = (HANDLE)atoi (com_argv[t+1]);
+ if (t < sys.argc)
+ hFile = (HANDLE)atoi (sys.argv[t+1]);
}
if ((t = COM_CheckParm ("-HPARENT")) > 0)
{
- if (t < com_argc)
- heventParent = (HANDLE)atoi (com_argv[t+1]);
+ if (t < sys.argc)
+ heventParent = (HANDLE)atoi (sys.argv[t+1]);
}
if ((t = COM_CheckParm ("-HCHILD")) > 0)
{
- if (t < com_argc)
- heventChild = (HANDLE)atoi (com_argv[t+1]);
+ if (t < sys.argc)
+ heventChild = (HANDLE)atoi (sys.argv[t+1]);
}
InitConProc (hFile, heventParent, heventChild);
program_name[sizeof(program_name)-1] = 0;
GetModuleFileNameA(NULL, program_name, sizeof(program_name) - 1);
- com_argc = 1;
- com_argv = argv;
+ sys.argc = 1;
+ sys.argv = argv;
argv[0] = program_name;
// FIXME: this tokenizer is rather redundent, call a more general one
- while (*lpCmdLine && (com_argc < MAX_NUM_ARGVS))
+ while (*lpCmdLine && (sys.argc < MAX_NUM_ARGVS))
{
while (*lpCmdLine && ISWHITESPACE(*lpCmdLine))
lpCmdLine++;
{
// quoted string
lpCmdLine++;
- argv[com_argc] = lpCmdLine;
- com_argc++;
+ argv[sys.argc] = lpCmdLine;
+ sys.argc++;
while (*lpCmdLine && (*lpCmdLine != '\"'))
lpCmdLine++;
}
else
{
// unquoted word
- argv[com_argc] = lpCmdLine;
- com_argc++;
+ argv[sys.argc] = lpCmdLine;
+ sys.argc++;
while (*lpCmdLine && !ISWHITESPACE(*lpCmdLine))
lpCmdLine++;
}
program_name[sizeof(program_name)-1] = 0;
GetModuleFileNameA(NULL, program_name, sizeof(program_name) - 1);
- com_argc = argc;
- com_argv = argv;
+ sys.argc = argc;
+ sys.argv = argv;
Host_Main();