projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use scandir in folder_read
[mmh]
/
uip
/
mhtest.c
diff --git
a/uip/mhtest.c
b/uip/mhtest.c
index
0fa9741
..
71787af
100644
(file)
--- a/
uip/mhtest.c
+++ b/
uip/mhtest.c
@@
-42,6
+42,7
@@
static struct swit switches[] = {
{ NULL, 0 }
};
{ NULL, 0 }
};
+char *version=VERSION;
/* mhparse.c */
extern char *tmp; /* directory to place temp files */
/* mhparse.c */
extern char *tmp; /* directory to place temp files */
@@
-153,14
+154,14
@@
main(int argc, char **argv)
if (!(cp = *argp++) || (*cp == '-' && cp[1]))
adios(EX_USAGE, NULL, "missing argument to %s",
argp[-2]);
if (!(cp = *argp++) || (*cp == '-' && cp[1]))
adios(EX_USAGE, NULL, "missing argument to %s",
argp[-2]);
- file = *cp == '-' ? cp : getcpy(expanddir(cp));
+ file = *cp == '-' ? cp : mh_xstrdup(expanddir(cp));
continue;
case OUTFILESW:
if (!(cp = *argp++) || (*cp == '-' && cp[1]))
adios(EX_USAGE, NULL, "missing argument to %s",
argp[-2]);
continue;
case OUTFILESW:
if (!(cp = *argp++) || (*cp == '-' && cp[1]))
adios(EX_USAGE, NULL, "missing argument to %s",
argp[-2]);
- outfile = *cp == '-' ? cp : getcpy(expanddir(cp));
+ outfile = *cp == '-' ? cp : mh_xstrdup(expanddir(cp));
continue;
case VERBSW:
continue;
case VERBSW:
@@
-178,7
+179,7
@@
main(int argc, char **argv)
if (folder)
adios(EX_USAGE, NULL, "only one folder at a time!");
else
if (folder)
adios(EX_USAGE, NULL, "only one folder at a time!");
else
- folder = getcpy(expandfol(cp));
+ folder = mh_xstrdup(expandfol(cp));
} else
app_msgarg(&msgs, cp);
}
} else
app_msgarg(&msgs, cp);
}
@@
-200,7
+201,7
@@
main(int argc, char **argv)
if ((cp = context_find(nmhstorage)) && *cp)
tmp = concat(cp, "/", invo_name, NULL);
else
if ((cp = context_find(nmhstorage)) && *cp)
tmp = concat(cp, "/", invo_name, NULL);
else
- tmp = getcpy(toabsdir(invo_name));
+ tmp = mh_xstrdup(toabsdir(invo_name));
if (file && msgs.size)
adios(EX_USAGE, NULL, "cannot specify msg and file at same time!");
if (file && msgs.size)
adios(EX_USAGE, NULL, "cannot specify msg and file at same time!");
@@
-239,7
+240,6
@@
main(int argc, char **argv)
for (msgnum = 0; msgnum < msgs.size; msgnum++)
if (!m_convert(mp, msgs.msgs[msgnum]))
exit(EX_USAGE);
for (msgnum = 0; msgnum < msgs.size; msgnum++)
if (!m_convert(mp, msgs.msgs[msgnum]))
exit(EX_USAGE);
- seq_setprev(mp); /* set the previous-sequence */
cts = mh_xcalloc(mp->numsel + 1, sizeof(*cts));
ctp = cts;
cts = mh_xcalloc(mp->numsel + 1, sizeof(*cts));
ctp = cts;