X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=Clean%20System%20Files%2FreadLine.c;h=e3f4def4d6eb6a67811bbf77899d78b25c90dc53;hb=4809a88897173cecff92433816e872b505426f88;hp=c73bc06a7d8d4651fc832471ab4a60e9d1574a9f;hpb=32f7345100abe7c55c4222da3979c24a69fe4ca2;p=CleanReadLine.git diff --git a/Clean System Files/readLine.c b/Clean System Files/readLine.c index c73bc06..e3f4def 100644 --- a/Clean System Files/readLine.c +++ b/Clean System Files/readLine.c @@ -247,7 +247,7 @@ int cleanReadHistory(CleanString path) char *cs_path = cleanStringToCString(path); int errno = read_history(cs_path); free(cs_path); - return errno; + return errno == 0; } int cleanReadHistoryRange(CleanString path, int from, int to) @@ -255,7 +255,7 @@ int cleanReadHistoryRange(CleanString path, int from, int to) char *cs_path = cleanStringToCString(path); int errno = read_history_range(cs_path, from, to); free(cs_path); - return errno; + return errno == 0; } int cleanWriteHistory(CleanString path) @@ -263,7 +263,7 @@ int cleanWriteHistory(CleanString path) char *cs_path = cleanStringToCString(path); int errno = write_history(cs_path); free(cs_path); - return errno; + return errno == 0; } int cleanAppendHistory(int n, CleanString path) @@ -271,7 +271,7 @@ int cleanAppendHistory(int n, CleanString path) char *cs_path = cleanStringToCString(path); int errno = append_history(n, cs_path); free(cs_path); - return errno; + return errno == 0; } int cleanHistoryTruncateFile(CleanString path, int nlines) @@ -279,5 +279,5 @@ int cleanHistoryTruncateFile(CleanString path, int nlines) char *cs_path = cleanStringToCString(path); int errno = history_truncate_file(cs_path, nlines); free(cs_path); - return errno; + return errno == 0; }