int Str_CompareI(char *t, char *s) { /*------------------------------------------- * works like strcmp() except case-insensitive * cwb 4-Sep-03 */ char *t1 = (char *) malloc(strlen(t) + 1); char *s1 = (char *) malloc(strlen(s) + 1); int r = strcmp(Str_ToUpper(t, t1), Str_ToUpper(s, s1)); free(t1); free(s1); return r; }
/** * Set TOS etc information and initial help message */ static void Main_StatusbarSetup(void) { const char *name = NULL; SDL_Keycode key; key = ConfigureParams.Shortcut.withoutModifier[SHORTCUT_OPTIONS]; if (!key) key = ConfigureParams.Shortcut.withModifier[SHORTCUT_OPTIONS]; if (key) name = SDL_GetKeyName(key); if (name) { char message[24], *keyname; #ifdef _MUDFLAP __mf_register(name, 32, __MF_TYPE_GUESS, "SDL keyname"); #endif keyname = Str_ToUpper(strdup(name)); snprintf(message, sizeof(message), "Press %s for Options", keyname); free(keyname); Statusbar_AddMessage(message, 6000); } /* update information loaded by Main_Init() */ Statusbar_UpdateInfo(); }