Blame SOURCES/paps-exitcode.patch

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