浏览代码

Make use of EXIT_* macros (2)

master
Bert Münnich 14 年前
父节点
当前提交
d08408e942
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. +1
    -1
      Makefile
  2. +3
    -3
      main.c

+ 1
- 1
Makefile 查看文件

@@ -1,4 +1,4 @@
VERSION = git-20110923
VERSION = git-20110926


CC = gcc CC = gcc
CFLAGS = -Wall -pedantic -O2 CFLAGS = -Wall -pedantic -O2


+ 3
- 3
main.c 查看文件

@@ -109,15 +109,15 @@ void check_add_file(char *filename) {
fileidx++; fileidx++;
} }


void remove_file(int n, bool silent) {
void remove_file(int n, bool manual) {
if (n < 0 || n >= filecnt) if (n < 0 || n >= filecnt)
return; return;


if (filecnt == 1) { if (filecnt == 1) {
if (!silent)
if (!manual)
fprintf(stderr, "sxiv: no more files to display, aborting\n"); fprintf(stderr, "sxiv: no more files to display, aborting\n");
cleanup(); cleanup();
exit(!silent);
exit(manual ? EXIT_SUCCESS : EXIT_FAILURE);
} }


if (files[n].path != files[n].name) if (files[n].path != files[n].name)


正在加载...
取消
保存