Blame SOURCES/paps-exitcode.patch

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