[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[augeas-devel] augeas: master - Rename read_file to xread_file



Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=23aa2ded7d2e1deffe380c49e2284d8f40ca7285
Commit:        23aa2ded7d2e1deffe380c49e2284d8f40ca7285
Parent:        47b17fff6ddb16f0193d7834d62270a0eced477e
Author:        David Lutterkort <lutter redhat com>
AuthorDate:    Mon Jan 4 14:33:07 2010 -0800
Committer:     David Lutterkort <lutter redhat com>
CommitterDate: Mon Jan 4 14:33:07 2010 -0800

Rename read_file to xread_file

---
 src/builtin.c   |    2 +-
 src/internal.c  |    2 +-
 src/internal.h  |    4 ++--
 src/transform.c |    6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/builtin.c b/src/builtin.c
index 874ae76..e68a840 100644
--- a/src/builtin.c
+++ b/src/builtin.c
@@ -418,7 +418,7 @@ static struct value *sys_read_file(struct info *info, struct value *n) {
     assert(n->tag == V_STRING);
     char *str = NULL;
 
-    str = read_file(n->string->str);
+    str = xread_file(n->string->str);
     if (str == NULL) {
         char error_buf[1024];
         const char *errmsg;
diff --git a/src/internal.c b/src/internal.c
index 318c79a..a50025d 100644
--- a/src/internal.c
+++ b/src/internal.c
@@ -125,7 +125,7 @@ fread_file_lim (FILE *stream, size_t max_len, size_t *length)
     return NULL;
 }
 
-char* read_file(const char *path) {
+char* xread_file(const char *path) {
     FILE *fp = fopen(path, "r");
     char *result;
     size_t len;
diff --git a/src/internal.h b/src/internal.h
index 732a31e..cbdfa30 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -258,11 +258,11 @@ int print_chars(FILE *out, const char *text, int cnt);
 void print_pos(FILE *out, const char *text, int pos);
 char *format_pos(const char *text, int pos);
 
-/* Function: read_file
+/* Function: xread_file
  * Read the contents of file PATH and return them as one long string. The
  * caller must free the result. Return NULL if any error occurs.
  */
-char* read_file(const char *path);
+char* xread_file(const char *path);
 
 /* Get the error message for ERRNUM in a threadsafe way. Based on libvirt's
  * virStrError
diff --git a/src/transform.c b/src/transform.c
index 51857a1..e55cc5e 100644
--- a/src/transform.c
+++ b/src/transform.c
@@ -391,7 +391,7 @@ static int load_file(struct augeas *aug, struct lens *lens, char *filename) {
     if (r < 0)
         goto done;
 
-    text = read_file(filename);
+    text = xread_file(filename);
     if (text == NULL) {
         err_status = "read_failed";
         goto done;
@@ -724,7 +724,7 @@ int transform_save(struct augeas *aug, struct tree *xfm,
     }
 
     if (access(augorig, R_OK) == 0) {
-        text = read_file(augorig);
+        text = xread_file(augorig);
     } else {
         text = strdup("");
     }
@@ -810,7 +810,7 @@ int transform_save(struct augeas *aug, struct tree *xfm,
     }
 
     {
-        char *new_text = read_file(augnew);
+        char *new_text = xread_file(augnew);
         int same = 0;
         if (new_text == NULL) {
             err_status = "read_augnew";



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]