glsl/apps: Include missing header, properly escape format strings.
authorMichal Krol <michal@vmware.com>
Thu, 24 Sep 2009 08:55:37 +0000 (10:55 +0200)
committerMichal Krol <michal@vmware.com>
Thu, 24 Sep 2009 08:55:37 +0000 (10:55 +0200)
src/glsl/apps/process.c
src/glsl/apps/purify.c
src/glsl/apps/tokenise.c
src/glsl/apps/version.c

index 28b415c3ffd4ead84c717cda865dc1a0ae6712aa..e20b68b1a9a07e7a6cef6352db290f8c82abd682 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <assert.h>
 #include "../pp/sl_pp_public.h"
 
@@ -235,11 +236,11 @@ main(int argc,
          break;
 
       case SL_PP_MODASSIGN:
-         fprintf(out, "%= ");
+         fprintf(out, "%%= ");
          break;
 
       case SL_PP_MODULO:
-         fprintf(out, "% ");
+         fprintf(out, "%% ");
          break;
 
       case SL_PP_LSHIFTASSIGN:
index 435bdbe5145fe3ecdd73c87ffc386c086012e047..53ba2530225d7a295206ef485404ae698f741059 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include "../pp/sl_pp_public.h"
 
 
index 9f95424f5c89930de6e06573c9292fb3dde069ef..d6b9c4fa0452a94b4960491e8c193e7f88e3395b 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <assert.h>
 #include "../pp/sl_pp_public.h"
 
@@ -219,11 +220,11 @@ main(int argc,
          break;
 
       case SL_PP_MODASSIGN:
-         fprintf(out, "%= ");
+         fprintf(out, "%%= ");
          break;
 
       case SL_PP_MODULO:
-         fprintf(out, "% ");
+         fprintf(out, "%% ");
          break;
 
       case SL_PP_LSHIFTASSIGN:
index f25943199212caf0140c7b64a698d2f2cafce753..4570f86217ebabd4eb242b922d5f6941e6efbac3 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <assert.h>
 #include "../pp/sl_pp_public.h"