mirror of
https://github.com/reactos/ccache.git
synced 2025-01-06 02:38:35 +00:00
Rename read_file() to read_text_file()
This commit is contained in:
parent
4db8870fc3
commit
4ac86e614b
2
ccache.h
2
ccache.h
@ -148,7 +148,7 @@ void *x_fmmap(const char *fname, off_t *size, const char *errstr);
|
|||||||
int x_munmap(void *addr, size_t length);
|
int x_munmap(void *addr, size_t length);
|
||||||
int x_rename(const char *oldpath, const char *newpath);
|
int x_rename(const char *oldpath, const char *newpath);
|
||||||
char *x_readlink(const char *path);
|
char *x_readlink(const char *path);
|
||||||
char *read_file(const char *path);
|
char *read_text_file(const char *path);
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
/* stats.c */
|
/* stats.c */
|
||||||
|
2
stats.c
2
stats.c
@ -177,7 +177,7 @@ stats_update_size(enum stats stat, size_t size, unsigned files)
|
|||||||
void
|
void
|
||||||
stats_read(const char *sfile, struct counters *counters)
|
stats_read(const char *sfile, struct counters *counters)
|
||||||
{
|
{
|
||||||
char *data = read_file(sfile);
|
char *data = read_text_file(sfile);
|
||||||
if (data) {
|
if (data) {
|
||||||
parse_stats(counters, data);
|
parse_stats(counters, data);
|
||||||
} else {
|
} else {
|
||||||
|
@ -4,6 +4,5 @@
|
|||||||
int path_exists(const char *path);
|
int path_exists(const char *path);
|
||||||
int is_symlink(const char *path);
|
int is_symlink(const char *path);
|
||||||
void create_file(const char *path, const char *content);
|
void create_file(const char *path, const char *content);
|
||||||
char *read_file(const char *path);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
2
util.c
2
util.c
@ -1160,7 +1160,7 @@ x_readlink(const char *path)
|
|||||||
|
|
||||||
/* Return the content of a text file, or NULL on error. Caller frees. */
|
/* Return the content of a text file, or NULL on error. Caller frees. */
|
||||||
char *
|
char *
|
||||||
read_file(const char *path)
|
read_text_file(const char *path)
|
||||||
{
|
{
|
||||||
int fd, ret;
|
int fd, ret;
|
||||||
size_t pos = 0, allocated = 1024;
|
size_t pos = 0, allocated = 1024;
|
||||||
|
Loading…
Reference in New Issue
Block a user