nsxivd08408e
Make use of EXIT_* macros (2)
+4 −4
2 files changed
| @@ -1,4 +1,4 @@ | |||
| 1 | − | VERSION = git-20110923 | |
| 1 | + | VERSION = git-20110926 | |
| 2 | 2 | ||
| 3 | 3 | CC = gcc | |
| 4 | 4 | CFLAGS = -Wall -pedantic -O2 | |
| @@ -109,15 +109,15 @@ void check_add_file(char *filename) { | |||
| 109 | 109 | fileidx++; | |
| 110 | 110 | } | |
| 111 | 111 | ||
| 112 | − | void remove_file(int n, bool silent) { | |
| 112 | + | void remove_file(int n, bool manual) { | |
| 113 | 113 | if (n < 0 || n >= filecnt) | |
| 114 | 114 | return; | |
| 115 | 115 | ||
| 116 | 116 | if (filecnt == 1) { | |
| 117 | − | if (!silent) | |
| 117 | + | if (!manual) | |
| 118 | 118 | fprintf(stderr, "sxiv: no more files to display, aborting\n"); | |
| 119 | 119 | cleanup(); | |
| 120 | − | exit(!silent); | |
| 120 | + | exit(manual ? EXIT_SUCCESS : EXIT_FAILURE); | |
| 121 | 121 | } | |
| 122 | 122 | ||
| 123 | 123 | if (files[n].path != files[n].name) | |