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)
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)
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)
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)
char *cs_path = cleanStringToCString(path);
int errno = history_truncate_file(cs_path, nlines);
free(cs_path);
- return errno;
+ return errno == 0;
}