s/stricmp/strcasecmp/

This commit is contained in:
Bill Currie 2001-02-21 22:00:52 +00:00
parent 10b8c5e8ad
commit cd7fdf33d3
9 changed files with 23 additions and 23 deletions

View file

@ -591,7 +591,7 @@ CL_FullServerinfo_f (void)
Con_Printf ("Invalid standards version: %s", p);
}
if ((p = Info_ValueForKey (cl.serverinfo, "skybox")) && *p) {
if (stricmp (p, "none") == 0) {
if (strcasecmp (p, "none") == 0) {
allowskybox = false;
} else {
allowskybox = true;
@ -689,7 +689,7 @@ CL_FullInfo_f (void)
if (*s)
s++;
if (!stricmp (key, pmodel_name) || !stricmp (key, emodel_name))
if (!strcasecmp (key, pmodel_name) || !strcasecmp (key, emodel_name))
continue;
Info_SetValueForKey (cls.userinfo, key, value, MAX_INFO_STRING);
@ -712,7 +712,7 @@ CL_SetInfo_f (void)
Con_Printf ("usage: setinfo [ <key> <value> ]\n");
return;
}
if (!stricmp (Cmd_Argv (1), pmodel_name)
if (!strcasecmp (Cmd_Argv (1), pmodel_name)
|| !strcmp (Cmd_Argv (1), emodel_name)) return;
Info_SetValueForKey (cls.userinfo, Cmd_Argv (1), Cmd_Argv (2),
@ -1125,7 +1125,7 @@ CL_Init (void)
// snprintf (st, sizeof(st), "%s-%04d", QW_VERSION, build_number());
snprintf (st, sizeof (st), "%s", QW_VERSION);
Info_SetValueForStarKey (cls.userinfo, "*ver", st, MAX_INFO_STRING);
Info_SetValueForStarKey (cls.userinfo, "stdver", QSG_VERSION,
Info_SetValueForStarKey (cls.userinfo, "stdver", QW_QSG_VERSION,
MAX_INFO_STRING);
#ifdef PACKET_LOGGING
Net_Log_Init();

View file

@ -629,7 +629,7 @@ CL_ParseServerData (void)
// game directory
str = MSG_ReadString ();
if (stricmp (gamedirfile, str)) {
if (strcasecmp (gamedirfile, str)) {
// save current config
Host_WriteConfiguration ();
cflag = true;

View file

@ -254,7 +254,7 @@ Draw_TextureMode_f (void)
}
for (i = 0; i < 6; i++) {
if (!stricmp (modes[i].name, Cmd_Argv (1)))
if (!strcasecmp (modes[i].name, Cmd_Argv (1)))
break;
}
if (i == 6) {

View file

@ -65,7 +65,7 @@ R_LoadSkys (char *skyname)
QFile *f;
char name[64];
if (stricmp (skyname, "none") == 0) {
if (strcasecmp (skyname, "none") == 0) {
skyloaded = false;
return;
}

View file

@ -223,8 +223,8 @@ Info_SetValueForStarKey (char *s, char *key, char *value, size_t maxsize)
// only copy ascii values
s += strlen (s);
v = newstr;
is_name = stricmp (key, "name") == 0;
is_team = stricmp (key, "team") == 0;
is_name = strcasecmp (key, "name") == 0;
is_team = strcasecmp (key, "team") == 0;
while (*v) {
c = (unsigned char) *v++;
// client only allows highbits on name

View file

@ -328,7 +328,7 @@ SV_Map_f (void)
if (!f) {
Con_Printf ("Can't find %s\n", expanded);
// If curlevel == level, something is SCREWED! --KB
if (stricmp (level, curlevel) == 0)
if (strcasecmp (level, curlevel) == 0)
SV_Error ("map: cannot restart level\n");
else
Cbuf_AddText (va ("map %s", curlevel));

View file

@ -704,7 +704,7 @@ SVC_DirectConnect (void)
s = Info_ValueForKey (userinfo, "spectator");
if (s[0] && strcmp (s, "0")) {
if (spectator_password->string[0] &&
stricmp (spectator_password->string, "none") &&
strcasecmp (spectator_password->string, "none") &&
strcmp (spectator_password->string, s)) { // failed
Con_Printf ("%s:spectator password failed\n",
NET_AdrToString (net_from));
@ -719,7 +719,7 @@ SVC_DirectConnect (void)
} else {
s = Info_ValueForKey (userinfo, "password");
if (password->string[0] &&
stricmp (password->string, "none") && strcmp (password->string, s)) {
strcasecmp (password->string, "none") && strcmp (password->string, s)) {
Con_Printf ("%s:password failed\n", NET_AdrToString (net_from));
Netchan_OutOfBandPrint (net_from,
"%c\nserver requires a password\n\n",
@ -1748,7 +1748,7 @@ SV_ExtractFromUserinfo (client_t *cl)
val = Info_ValueForKey (cl->userinfo, "name");
}
if (!val[0] || !stricmp (val, "console")) {
if (!val[0] || !strcasecmp (val, "console")) {
Info_SetValueForKey (cl->userinfo, "name", "unnamed", MAX_INFO_STRING);
val = Info_ValueForKey (cl->userinfo, "name");
}
@ -1757,7 +1757,7 @@ SV_ExtractFromUserinfo (client_t *cl)
for (i = 0, client = svs.clients; i < MAX_CLIENTS; i++, client++) {
if (client->state != cs_spawned || client == cl)
continue;
if (!stricmp (client->name, val))
if (!strcasecmp (client->name, val))
break;
}
if (i != MAX_CLIENTS) { // dup name

View file

@ -120,11 +120,11 @@ ED_Parse_Extra_Fields (progs_t *pr, char *key, char *value)
// If skyname is set, we want to allow skyboxes and set what
// the skybox name should be. "qlsky" is supported since
// at least one other map uses it already. --KB
if (stricmp (key, "sky") == 0 || // LordHavoc: added "sky" key
if (strcasecmp (key, "sky") == 0 || // LordHavoc: added "sky" key
// (Quake2 and DarkPlaces use
// this)
stricmp (key, "skyname") == 0 ||
stricmp (key, "qlsky") == 0) {
strcasecmp (key, "skyname") == 0 ||
strcasecmp (key, "qlsky") == 0) {
Info_SetValueForKey (svs.info, "skybox",
"1", MAX_SERVERINFO_STRING);
Cvar_Set (r_skyname, value);

View file

@ -364,42 +364,42 @@ locs_loc (void)
snprintf (locfile, sizeof (locfile), "%s/%s", com_gamedir, mapname);
free(mapname);
if (stricmp(Cmd_Argv(1),"save") == 0) {
if (strcasecmp(Cmd_Argv(1),"save") == 0) {
if (Cmd_Argc () == 2) {
locs_save(locfile, false);
} else
Con_Printf("loc save :saves locs from memory into a .loc file\n");
}
if (stricmp(Cmd_Argv(1),"zsave") == 0) {
if (strcasecmp(Cmd_Argv(1),"zsave") == 0) {
if (Cmd_Argc () == 2) {
locs_save(locfile, true);
} else
Con_Printf("loc save :saves locs from memory into a .loc file\n");
}
if (stricmp(Cmd_Argv(1),"add") == 0) {
if (strcasecmp(Cmd_Argv(1),"add") == 0) {
if (Cmd_Argc () >= 3)
locs_mark(cl.simorg,desc);
else
Con_Printf("loc add <description> :marks the current location with the description and records the information into a loc file.\n");
}
if (stricmp(Cmd_Argv(1),"rename") == 0) {
if (strcasecmp(Cmd_Argv(1),"rename") == 0) {
if (Cmd_Argc () >= 3)
locs_edit(cl.simorg,desc);
else
Con_Printf("loc rename <description> :changes the description of the nearest location marker\n");
}
if (stricmp(Cmd_Argv(1),"delete") == 0) {
if (strcasecmp(Cmd_Argv(1),"delete") == 0) {
if (Cmd_Argc () == 2)
locs_del(cl.simorg);
else
Con_Printf("loc delete :removes nearest location marker\n");
}
if (stricmp(Cmd_Argv(1),"move") == 0) {
if (strcasecmp(Cmd_Argv(1),"move") == 0) {
if (Cmd_Argc () == 2)
locs_edit(cl.simorg,NULL);
else