[util] Expose the quakerc check function

qargs probably needs to go away. It certainly needs to be rethought. For
now, this is good enough to get qw working with plist-based
quakeforge.cfg
This commit is contained in:
Bill Currie 2021-11-14 10:12:14 +09:00
parent 6a9e5f4970
commit 7c9f3a3b09
2 changed files with 5 additions and 4 deletions

View file

@ -51,6 +51,7 @@ void COM_InitArgv (int argc, const char **argv);
struct cbuf_s;
void COM_ParseConfig (struct cbuf_s *cbuf);
void COM_ExecConfig (struct cbuf_s *cbuf, int skip_quakerc);
int COM_Check_quakerc (const char *cmd, struct cbuf_s *cbuf);
///@}

View file

@ -180,8 +180,8 @@ COM_ParseConfig (cbuf_t *cbuf)
Cbuf_Execute_Sets (cbuf);
}
static int
check_quakerc (const char *cmd, cbuf_t *cbuf)
int
COM_Check_quakerc (const char *cmd, cbuf_t *cbuf)
{
const char *l, *p;
int ret = 0;
@ -214,7 +214,7 @@ COM_ExecConfig (cbuf_t *cbuf, int skip_quakerc)
if (Cmd_Exec_File (cbuf, "quakeforge.cfg", 1)) {
Cmd_Exec_File (cbuf, fs_usercfg->string, 0);
Cmd_StuffCmds (cbuf);
check_quakerc ("startdemos", cbuf);
COM_Check_quakerc ("startdemos", cbuf);
} else {
if (!skip_quakerc) {
Cbuf_InsertText (cbuf, "exec quake.rc\n");
@ -223,7 +223,7 @@ COM_ExecConfig (cbuf_t *cbuf, int skip_quakerc)
// Reparse the command line for + commands.
// (sets still done, but it doesn't matter)
// (Note, no non-base commands exist yet)
if (skip_quakerc || !check_quakerc ("stuffcmds", 0)) {
if (skip_quakerc || !COM_Check_quakerc ("stuffcmds", 0)) {
Cmd_StuffCmds (cbuf);
}
}