diff options
author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2005-05-25 14:17:42 +0000 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2005-05-25 14:17:42 +0000 |
commit | 7235a58f704aff3428fe11c4729e2e23e0eab7d5 (patch) | |
tree | 7c990c41af5ab11dad564792b7b26452012c533e /lib-src | |
parent | f75049fca3b6bc6068f6fbee7ffca03d178f166c (diff) | |
download | emacs-7235a58f704aff3428fe11c4729e2e23e0eab7d5.tar.gz |
(setup_yow): Use EXIT_FAILURE in case no separators found.
(yow): Use EXIT_FAILURE in case of memory error.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/ChangeLog | 5 | ||||
-rw-r--r-- | lib-src/yow.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 1370f05a9d6..aa9d3fe7fc6 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2005-05-25 Thien-Thi Nguyen <ttn@gnu.org> + + * yow.c (setup_yow): Use EXIT_FAILURE in case no separators found. + (yow): Use EXIT_FAILURE in case of memory error. + 2005-05-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> * make-docfile.c (DIRECTORY_SEP): New macro. diff --git a/lib-src/yow.c b/lib-src/yow.c index 9d58ce5aecb..1356ac6db18 100644 --- a/lib-src/yow.c +++ b/lib-src/yow.c @@ -104,7 +104,7 @@ setup_yow(fp) while ((c = getc(fp)) != SEP) { if (c == EOF) { fprintf(stderr, "yow: file contains no separators\n"); - exit(2); + exit(EXIT_FAILURE); } } header_len = ftell(fp); @@ -157,7 +157,7 @@ yow (fp) buf = (char *) malloc(bufsize); if (buf == (char *)0) { fprintf(stderr, "yow: virtual memory exhausted\n"); - exit (3); + exit (EXIT_FAILURE); } buf[i++] = c; @@ -170,7 +170,7 @@ yow (fp) buf = (char *) realloc(buf, bufsize); if (buf == (char *)0) { fprintf(stderr, "yow: virtual memory exhausted\n"); - exit (3); + exit (EXIT_FAILURE); } } } |