X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fnamespacize.c;h=f06d2f617c124f8b5f2f7aa74621164ab4c5302b;hp=0cbd67342d40205419d522f8c7adfcf55acb0b73;hb=aabf300e324f7da5134d7ad45afba11225045c24;hpb=44b37ee8aeb185f6837378fef17d887bda6ff89b diff --git a/tools/namespacize.c b/tools/namespacize.c index 0cbd6734..f06d2f61 100644 --- a/tools/namespacize.c +++ b/tools/namespacize.c @@ -11,7 +11,7 @@ #include #include "ccan/str/str.h" #include "ccan/str_talloc/str_talloc.h" -#include "ccan/grab_file/grab_file.h" +#include "ccan/rbuf/rbuf.h" #include "ccan/talloc/talloc.h" #include "ccan/err/err.h" #include "tools.h" @@ -262,7 +262,7 @@ static void analyze_headers(const char *dir, struct replace **repl) /* Get hold of header, assume that's it. */ hdr = talloc_asprintf(dir, "%s/%s.h", dir, talloc_basename(dir, dir)); - contents = grab_file(dir, hdr, NULL); + contents = talloc_grab_file(dir, hdr, NULL); if (!contents) err(1, "Reading %s", hdr); @@ -338,7 +338,7 @@ static const char *rewrite_file(const char *filename, int fd; verbose("Rewriting %s\n", filename); - file = grab_file(filename, filename, NULL); + file = talloc_grab_file(filename, filename, NULL); if (!file) err(1, "Reading file %s", filename); @@ -439,7 +439,7 @@ static struct replace *read_replacement_file(const char *depdir) char *replname = talloc_asprintf(depdir, "%s/.namespacize", depdir); char *file, **line; - file = grab_file(replname, replname, NULL); + file = talloc_grab_file(replname, replname, NULL); if (!file) { if (errno != ENOENT) err(1, "Opening %s", replname);