]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
tools/hd2data: strupr is windows only, define it elsewhere
authorThomas Debesse <dev@illwieckz.net>
Tue, 14 Jan 2020 10:00:47 +0000 (11:00 +0100)
committerThomas Debesse <dev@illwieckz.net>
Thu, 23 Jan 2020 18:21:39 +0000 (19:21 +0100)
some compiler may ask if strstr would have to be used instead, which is wrong

tools/heretic2/h2data/fmodels.c

index 7d8df18af26e06019347ef2f7a990d5d1c96e211..ca616bfdbcaaa938843f7679377fdfd45e82e013 100644 (file)
@@ -149,17 +149,19 @@ void ScaleTris( vec3_t min, vec3_t max, int Width, int Height, float* u, float*
 void NewDrawLine( int x1, int y1, int x2, int y2, unsigned char* picture, int width, int height );
 
 #if !GDEF_OS_WINDOWS
-
-void strupr( char *string ){
-       int i;
-
-       for ( i = 0 ; i < strlen( string ); i++ )
-               toupper( string[i] );
-
-       return;
+char *strupr (char *start)
+{
+       char *in;
+       in = start;
+       while (*in)
+       {
+               *in = toupper(*in);
+               in++;
+       }
+       return start;
 }
-
 #endif
+
 //==============================================================
 
 /*