本網站在啟用 JavaScript 的情況下可以運作的更好。
首頁
探索
說明
登入
Immanuel
/
sxiv
關注
1
收藏
0
複製
0
程式碼
問題
0
合併請求
0
版本發佈
0
Wiki
活動
瀏覽代碼
Fixed empty lines in readline()
master
Bert
14 年之前
父節點
cfed65d36f
當前提交
e8ed491ba9
共有
3 個檔案被更改
,包括
5 行新增
和
5 行删除
分割檢視
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
Makefile
+1
-1
main.c
+3
-3
util.c
+ 1
- 1
Makefile
查看文件
@@ -1,6 +1,6 @@
all: sxiv
VERSION=git-2011021
4
VERSION=git-2011021
5
CC?=gcc
PREFIX?=/usr/local
+ 1
- 1
main.c
查看文件
@@ -91,7 +91,7 @@ int main(int argc, char **argv) {
if (options->from_stdin) {
while ((filename = readline(stdin))) {
if (!check_append(filename))
if (!
*filename || !
check_append(filename))
free((void*) filename);
}
} else {
+ 3
- 3
util.c
查看文件
@@ -102,11 +102,11 @@ char* readline(FILE *stream) {
}
} while (!end && !feof(stream) && !ferror(stream));
if (!ferror(stream) && *buf) {
if (ferror(stream)) {
s = NULL;
} else {
s = (char*) s_malloc((strlen(buf) + 1) * sizeof(char));
strcpy(s, buf);
} else {
s = NULL;
}
free(buf);
Write
Preview
Loading…
取消
儲存