*/
#include <h/mh.h>
+#include <h/utils.h>
#include <unistd.h>
#include <dirent.h>
#include <locale.h>
if (folder)
adios(EX_USAGE, NULL, "only one folder at a time!");
else
- folder = getcpy(expandfol(cp));
+ folder = mh_xstrdup(expandfol(cp));
} else {
adios(EX_USAGE, NULL, "usage: %s [+folder] [switches]",
invo_name);
cp = concat("Remove folder \"", folder, "\"? ", NULL);
if (!getanswer(cp))
exit(EX_OK);
- free(cp);
+ mh_free0(&cp);
}
if (rmf(folder) == OK) {
struct node *np, *pp;
alen = strlen("atr-");
- plen = strlen(cp = getcpy(toabsdir(folder))) + 1;
+ plen = strlen(cp = mh_xstrdup(toabsdir(folder))) + 1;
/*
** Search context list for keys that look like
pp = np;
}
}
- free(cp);
+ mh_free0(&cp);
}