Blame SOURCES/paps-exitcode.patch

2b6473
diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
2b6473
--- paps-0.6.8.orig/src/paps.c	2008-09-01 15:54:11.000000000 +0900
2b6473
+++ paps-0.6.8/src/paps.c	2008-09-01 15:54:47.000000000 +0900
2b6473
@@ -365,7 +365,7 @@ int main(int argc, char *argv[])
2b6473
       if (!IN)
2b6473
         {
2b6473
           fprintf(stderr, "Failed to open %s!\n", filename_in);
2b6473
-          exit(-1);
2b6473
+          exit(1);
2b6473
         }
2b6473
     }
2b6473
   else
2b6473
@@ -499,7 +499,7 @@ int main(int argc, char *argv[])
2b6473
       if (cvh == NULL)
2b6473
         {
2b6473
           fprintf(stderr, "%s: Invalid encoding: %s\n", g_get_prgname (), encoding);
2b6473
-          exit(-1);
2b6473
+          exit(1);
2b6473
         }
2b6473
     }
2b6473
 
2b6473
@@ -559,7 +559,7 @@ read_file (FILE   *file,
2b6473
         {
2b6473
           fprintf(stderr, "%s: Error reading file.\n", g_get_prgname ());
2b6473
           g_string_free (inbuf, TRUE);
2b6473
-          return NULL;
2b6473
+          exit(1);
2b6473
         }
2b6473
       else if (bp == NULL)
2b6473
         break;
2b6473
@@ -573,7 +573,7 @@ read_file (FILE   *file,
2b6473
           if (g_iconv (handle, &ib, &iblen, &ob, &oblen) == -1)
2b6473
             {
2b6473
               fprintf (stderr, "%s: Error while converting strings.\n", g_get_prgname ());
2b6473
-              return NULL;
2b6473
+              exit(1);
2b6473
             }
2b6473
           obuffer[BUFSIZE * 6 - 1 - oblen] = 0;
2b6473
         }
2b6473
@@ -637,7 +637,7 @@ split_text_into_paragraphs (PangoContext
2b6473
 	      if (wtext == NULL)
2b6473
 	        {
2b6473
 		  fprintf (stderr, "Failed to convert UTF-8 to UCS-4.\n");
2b6473
-		  return NULL;
2b6473
+                  exit(1);
2b6473
 		}
2b6473
 
2b6473
 	      len = g_utf8_strlen (para->text, para->length);
2b6473
@@ -650,7 +650,7 @@ split_text_into_paragraphs (PangoContext
2b6473
 		    {
2b6473
 		      fprintf (stderr, "Failed to allocate a memory.\n");
2b6473
 		      g_free (wtext);
2b6473
-		      return NULL;
2b6473
+                      exit(1);
2b6473
 		    }
2b6473
 		  for (i = 0; i < len; i++)
2b6473
 		    {
2b6473
@@ -665,7 +665,7 @@ split_text_into_paragraphs (PangoContext
2b6473
 		  if (newtext == NULL)
2b6473
 		    {
2b6473
 		      fprintf (stderr, "Failed to convert UCS-4 to UTF-8.\n");
2b6473
-		      return NULL;
2b6473
+                      exit(1);
2b6473
 		    }
2b6473
 
2b6473
 		  pango_layout_set_text (para->layout, newtext, -1);