]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/mcsdk-tools.git/blobdiff - hfile2array/hfile2array.c
c66x POST: added makefile, disabled C6678 emac test until CSL is synced
[keystone-rtos/mcsdk-tools.git] / hfile2array / hfile2array.c
index a6d7a5b06254f39e88d26f176a6c020163a6a57f..0414afa9e371586fa3a926a2d3f14e6649271dcc 100644 (file)
@@ -82,7 +82,7 @@ int main(int argc, char **argv)
     {
         if (fgets(line_hdr, 200, in_hdr) != NULL)
         {
-            if (fputs(line_hdr, out) != 0)
+            if (fputs(line_hdr, out) < 0)
             {
                 printf ("fputs %s error\n", line_hdr);
                 goto error;
@@ -98,7 +98,7 @@ int main(int argc, char **argv)
     strcat (line, (const char *)(*argv++));
     strcat (line, "[] = {\n");
     
-    if (fputs(line, out) != 0)
+    if (fputs(line, out) < 0)
     {
         printf ("fputs %s error\n", line);
         goto error;
@@ -108,9 +108,9 @@ int main(int argc, char **argv)
     {
         if (fgets(line, 200, in) != NULL)
         {
-            if (fputs(line, out) != 0)
+            if (fputs(line, out) < 0)
             {
-                printf ("fputs %s error\n", fputs);
+                printf ("fputs %s error\n", line);
                 goto error;
             }
         }
@@ -121,9 +121,9 @@ int main(int argc, char **argv)
         }
     }
 
-    if (fputs("};\n", out) != 0)
+    if (fputs("};\n", out) < 0)
     {
-        printf ("fputs %s error\n", fputs);
+        printf ("fputs };\\n error\n");
         goto error;
     }
 
@@ -139,4 +139,4 @@ error:
     fclose(out);
     
     return  (-1);
-}
\ No newline at end of file
+}