#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.h",
path_join(NULL, dir, take(path_basename(NULL, 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) {