nv50: fix build-predicate function
[mesa.git] / src / glsl / apps / purify.c
index 8c01f4fc6a3d9cc6f41b65746dc709b63697e498..e3fca59ab450a6b06611e366103cba5e8ec21753 100644 (file)
  * 
  **************************************************************************/
 
+#include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include "../pp/sl_pp_public.h"
+#include "../pp/sl_pp_purify.h"
 
 
 int
@@ -45,6 +47,7 @@ main(int argc,
    FILE *out;
 
    if (argc != 3) {
+      printf("Usage: purify infile outfile\n");
       return 1;
    }
 
@@ -55,6 +58,10 @@ main(int argc,
 
    fseek(in, 0, SEEK_END);
    size = ftell(in);
+   assert(size != -1);
+   if (size == -1) {
+      return 1;
+   }
    fseek(in, 0, SEEK_SET);
 
    out = fopen(argv[2], "wb");