mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
make the command/cvar searching case sensitive
This commit is contained in:
parent
f850815b8c
commit
1a601ee0f8
2 changed files with 11 additions and 11 deletions
|
@ -213,12 +213,12 @@ Cmd_CompleteCommand (const char *partial)
|
|||
|
||||
// check for exact match
|
||||
for (cmd = cmd_functions; cmd; cmd = cmd->next)
|
||||
if (!strcasecmp (partial, cmd->name))
|
||||
if (!strcmp (partial, cmd->name))
|
||||
return cmd->name;
|
||||
|
||||
// check for partial match
|
||||
for (cmd = cmd_functions; cmd; cmd = cmd->next)
|
||||
if (!strncasecmp (partial, cmd->name, len))
|
||||
if (!strncmp (partial, cmd->name, len))
|
||||
return cmd->name;
|
||||
|
||||
return NULL;
|
||||
|
@ -247,7 +247,7 @@ Cmd_CompleteCountPossible (const char *partial)
|
|||
|
||||
// Loop through the command list and count all partial matches
|
||||
for (cmd = cmd_functions; cmd; cmd = cmd->next)
|
||||
if (!strncasecmp (partial, cmd->name, len))
|
||||
if (!strncmp (partial, cmd->name, len))
|
||||
h++;
|
||||
|
||||
return h;
|
||||
|
@ -277,7 +277,7 @@ Cmd_CompleteBuildList (const char *partial)
|
|||
SYS_CHECKMEM (buf);
|
||||
// Loop through the alias list and print all matches
|
||||
for (cmd = cmd_functions; cmd; cmd = cmd->next)
|
||||
if (!strncasecmp (partial, cmd->name, len))
|
||||
if (!strncmp (partial, cmd->name, len))
|
||||
buf[bpos++] = cmd->name;
|
||||
|
||||
buf[bpos] = NULL;
|
||||
|
@ -463,7 +463,7 @@ Cmd_Help_f (void)
|
|||
|
||||
name = Cmd_Argv (1);
|
||||
|
||||
for (cmd = cmd_functions; cmd && strcasecmp (name, cmd->name);
|
||||
for (cmd = cmd_functions; cmd && strcmp (name, cmd->name);
|
||||
cmd = cmd->next);
|
||||
if (cmd) {
|
||||
Sys_Printf ("%s\n", cmd->description);
|
||||
|
|
|
@ -148,22 +148,22 @@ Cvar_CompleteVariable (const char *partial)
|
|||
|
||||
// check exact match
|
||||
for (cvar = cvar_vars; cvar; cvar = cvar->next)
|
||||
if (!strcasecmp (partial, cvar->name))
|
||||
if (!strcmp (partial, cvar->name))
|
||||
return cvar->name;
|
||||
|
||||
// check aliases too :)
|
||||
for (alias = calias_vars; alias; alias = alias->next)
|
||||
if (!strcasecmp (partial, alias->name))
|
||||
if (!strcmp (partial, alias->name))
|
||||
return alias->name;
|
||||
|
||||
// check partial match
|
||||
for (cvar = cvar_vars; cvar; cvar = cvar->next)
|
||||
if (!strncasecmp (partial, cvar->name, len))
|
||||
if (!strncmp (partial, cvar->name, len))
|
||||
return cvar->name;
|
||||
|
||||
// check aliases too :)
|
||||
for (alias = calias_vars; alias; alias = alias->next)
|
||||
if (!strncasecmp (partial, alias->name, len))
|
||||
if (!strncmp (partial, alias->name, len))
|
||||
return alias->name;
|
||||
|
||||
return NULL;
|
||||
|
@ -191,7 +191,7 @@ Cvar_CompleteCountPossible (const char *partial)
|
|||
|
||||
// Loop through the cvars and count all possible matches
|
||||
for (cvar = cvar_vars; cvar; cvar = cvar->next)
|
||||
if (!strncasecmp(partial, cvar->name, len))
|
||||
if (!strncmp(partial, cvar->name, len))
|
||||
h++;
|
||||
|
||||
return h;
|
||||
|
@ -220,7 +220,7 @@ Cvar_CompleteBuildList (const char *partial)
|
|||
SYS_CHECKMEM (buf);
|
||||
// Loop through the alias list and print all matches
|
||||
for (cvar = cvar_vars; cvar; cvar = cvar->next)
|
||||
if (!strncasecmp(partial, cvar->name, len))
|
||||
if (!strncmp(partial, cvar->name, len))
|
||||
buf[bpos++] = cvar->name;
|
||||
|
||||
buf[bpos] = NULL;
|
||||
|
|
Loading…
Reference in a new issue