DEADSOFTWARE

portability: remove dependency on str(n)casemp
[flatwaifu.git] / src / soft / render.c
index 705de17f30725cecf1d45697c402b164ef706e6a..7fbfc8fc280a88c4ec5416ae9c32109ef7ce7322 100644 (file)
@@ -1,3 +1,20 @@
+/* Copyright (C) 1996-1997 Aleksey Volynskov
+ * Copyright (C) 2011 Rambo
+ * Copyright (C) 2020 SovietPony
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3 of the License ONLY.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 #include <string.h>
 #include <stdarg.h>
 #include <stdlib.h> // abs()
@@ -1376,13 +1393,13 @@ void R_get_name (int n, char s[8]) {
 }
 
 static short getani (char n[8]) {
-  if (strncasecmp(n, "WALL22_1", 8) == 0) {
+  if (cp866_strncasecmp(n, "WALL22_1", 8) == 0) {
     return 1;
-  } else if (strncasecmp(n, "WALL58_1", 8) == 0) {
+  } else if (cp866_strncasecmp(n, "WALL58_1", 8) == 0) {
     return 2;
-  } else if (strncasecmp(n, "W73A_1", 8) == 0) {
+  } else if (cp866_strncasecmp(n, "W73A_1", 8) == 0) {
     return 3;
-  } else if (strncasecmp(n, "RP2_1", 8) == 0) {
+  } else if (cp866_strncasecmp(n, "RP2_1", 8) == 0) {
     return 4;
   } else {
     return 0;
@@ -1416,7 +1433,7 @@ void R_load (char s[8]) {
     walh[max_textures] = -1;
     walp[max_textures] = NULL;
   } else {
-    if (strncasecmp(s, "_WATER_", 7) == 0) {
+    if (cp866_strncasecmp(s, "_WATER_", 7) == 0) {
       walh[max_textures] = -2;
       walp[max_textures] = (void*)((intptr_t)s[7] - '0' + 1);
     } else {
@@ -1566,12 +1583,9 @@ static int video_menu_handler (menu_msg_t *msg, const menu_t *m, void *data, int
   return simple_menu_handler(msg, i, __NUM__, &sm, &cur);
 }
 
-static const menu_t video_menu = {
-  NULL, &video_menu_handler
-};
-
 const menu_t *R_menu (void) {
-  return &video_menu;
+  static const menu_t m = { video_menu_handler };
+  return &m;
 }
 
 const cfg_t *R_args (void) {