#include "ccan/take/take.h"
#include "ccan/rbuf/rbuf.h"
#include "ccan/tal/path/path.h"
#include "ccan/take/take.h"
#include "ccan/rbuf/rbuf.h"
#include "ccan/tal/path/path.h"
- hdr = tal_fmt(dir, "%s/%s.h", dir, path_basename(dir, dir));
+ hdr = tal_fmt(dir, "%s.h",
+ path_join(NULL, dir, take(path_basename(NULL, dir))));
for (r = *repl; r; r = r->next) {
if (write(fd,r->string,strlen(r->string)) != strlen(r->string)
|| write(fd, "\n", 1) != 1) {
for (r = *repl; r; r = r->next) {
if (write(fd,r->string,strlen(r->string)) != strlen(r->string)
|| write(fd, "\n", 1) != 1) {
- name = tal_strdup(NULL, dir);
- while (strends(name, "/"))
- name[strlen(name)-1] = '\0';
-
+ name = path_canon(NULL, dir);
analyze_headers(name, &replace);
write_replacement_file(name, &replace);
setup_adjust_files(name, replace, &adj);
analyze_headers(name, &replace);
write_replacement_file(name, &replace);
setup_adjust_files(name, replace, &adj);
repl = read_replacement_file(depdir);
if (repl) {
verbose("%s has been namespacized\n", depdir);
repl = read_replacement_file(depdir);
if (repl) {
verbose("%s has been namespacized\n", depdir);