projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
send use m_getfld2
[mmh]
/
uip
/
forw.c
diff --git
a/uip/forw.c
b/uip/forw.c
index
c754b27
..
d6ded24
100644
(file)
--- a/
uip/forw.c
+++ b/
uip/forw.c
@@
-44,6
+44,8
@@
static struct swit switches[] = {
{ NULL, 0 }
};
{ NULL, 0 }
};
+char *version=VERSION;
+
static char drft[BUFSIZ];
static struct msgs *mp = NULL;
static char drft[BUFSIZ];
static struct msgs *mp = NULL;
@@
-130,7
+132,6
@@
main(int argc, char **argv)
if (!(digest = *argp++) || *digest == '-')
adios(EX_USAGE, NULL, "missing argument to %s",
argp[-2]);
if (!(digest = *argp++) || *digest == '-')
adios(EX_USAGE, NULL, "missing argument to %s",
argp[-2]);
- //mime = 0;
continue;
case ISSUESW:
if (!(cp = *argp++) || *cp == '-')
continue;
case ISSUESW:
if (!(cp = *argp++) || *cp == '-')
@@
-154,13
+155,13
@@
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 {
msgs[msgp++] = cp;
}
}
} else {
msgs[msgp++] = cp;
}
}
- cwd = getcpy(pwd());
+ cwd = mh_xstrdup(pwd());
strncpy(drft, buildsw ? toabsdir("draft") : m_draft(seq_beyond),
sizeof(drft));
/*
strncpy(drft, buildsw ? toabsdir("draft") : m_draft(seq_beyond),
sizeof(drft));
/*
@@
-196,7
+197,6
@@
main(int argc, char **argv)
exit(EX_SOFTWARE);
}
}
exit(EX_SOFTWARE);
}
}
- seq_setprev(mp); /* set the previous sequence */
if ((out = creat(drft, m_gmprot())) == NOTOK)
adios(EX_CANTCREAT, drft, "unable to create");
if ((out = creat(drft, m_gmprot())) == NOTOK)
adios(EX_CANTCREAT, drft, "unable to create");
@@
-234,10
+234,10
@@
main(int argc, char **argv)
if (digest) {
snprintf(buf, sizeof(buf), IFORMAT, digest);
snprintf(value, sizeof(value), "%d", issue);
if (digest) {
snprintf(buf, sizeof(buf), IFORMAT, digest);
snprintf(value, sizeof(value), "%d", issue);
- context_replace(buf, getcpy(value));
+ context_replace(buf, mh_xstrdup(value));
snprintf(buf, sizeof(buf), VFORMAT, digest);
snprintf(value, sizeof(value), "%d", volume);
snprintf(buf, sizeof(buf), VFORMAT, digest);
snprintf(value, sizeof(value), "%d", volume);
- context_replace(buf, getcpy(value));
+ context_replace(buf, mh_xstrdup(value));
}
context_replace(curfolder, folder); /* update current folder */
}
context_replace(curfolder, folder); /* update current folder */
@@
-297,10
+297,10
@@
build_form(char *form, char *digest, int volume, int issue)
{
int in;
int fmtsize;
{
int in;
int fmtsize;
- register char *fmtstr;
+ char *fmtstr;
char *line, tmpfil[BUFSIZ];
FILE *tmp;
char *line, tmpfil[BUFSIZ];
FILE *tmp;
- register struct comp *cptr;
+ struct comp *cptr;
struct format *fmt;
int dat[5];
char *cp = NULL;
struct format *fmt;
int dat[5];
char *cp = NULL;
@@
-317,7
+317,7
@@
build_form(char *form, char *digest, int volume, int issue)
cptr->c_text = digest;
FINDCOMP(cptr, "date");
if (cptr)
cptr->c_text = digest;
FINDCOMP(cptr, "date");
if (cptr)
- cptr->c_text = getcpy(dtimenow());
+ cptr->c_text = mh_xstrdup(dtimenow());
dat[0] = issue;
dat[1] = volume;
dat[0] = issue;
dat[1] = volume;
@@
-334,10
+334,10
@@
build_form(char *form, char *digest, int volume, int issue)
if ((in = dup(fileno(tmp))) == NOTOK)
adios(EX_OSERR, "dup", "unable to");
if ((in = dup(fileno(tmp))) == NOTOK)
adios(EX_OSERR, "dup", "unable to");
- line = mh_xmalloc((unsigned) fmtsize);
+ line = mh_xcalloc(fmtsize, sizeof(char));
fmt_scan(fmt, line, fmtsize, dat);
fputs(line, tmp);
fmt_scan(fmt, line, fmtsize, dat);
fputs(line, tmp);
- free(line);
+ mh_free0(&line);
if (fclose(tmp))
adios(EX_IOERR, tmpfil, "error writing");
if (fclose(tmp))
adios(EX_IOERR, tmpfil, "error writing");