diff lib-src/yow.c @ 55442:a47704955f8d

Throughout, replace 0 destined for `exit' arg with `EXIT_SUCCESS'. Likewise, replace 1 with `EXIT_FAILURE'. (main): Use `EXIT_SUCCESS' or `EXIT_FAILURE' for return value.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Sat, 08 May 2004 15:23:35 +0000
parents 695cf19ef79e
children 00adf45090ee 4c90ffeb71c5
line wrap: on
line diff
--- a/lib-src/yow.c	Sat May 08 15:00:20 2004 +0000
+++ b/lib-src/yow.c	Sat May 08 15:23:35 2004 +0000
@@ -73,7 +73,7 @@
   if ((fp = fopen(file, "r")) == NULL) {
     fprintf(stderr, "yow: ");
     perror(file);
-    exit(1);
+    exit(EXIT_FAILURE);
   }
 
   /* initialize random seed */
@@ -82,7 +82,7 @@
   setup_yow(fp);
   yow(fp);
   fclose(fp);
-  return 0;
+  return EXIT_SUCCESS;
 }
 
 static long len = -1;
@@ -113,7 +113,7 @@
 
   if (fseek(fp, 0L, 2) == -1) {
     perror("yow");
-    exit(1);
+    exit(EXIT_FAILURE);
   }
   len = ftell(fp) - header_len;
 }
@@ -132,7 +132,7 @@
   offset = rand() % len + header_len;
   if (fseek(fp, offset, 0) == -1) {
     perror("yow");
-    exit(1);
+    exit(EXIT_FAILURE);
   }
 
   /* Read until SEP, read next line, print it.
@@ -180,3 +180,5 @@
 
 /* arch-tag: e40fc0df-bafb-4001-af24-5c883d1c685e
    (do not change this comment) */
+
+/* yow.c ends here */