projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial checkin of a testsuite
[mmh]
/
uip
/
replsbr.c
diff --git
a/uip/replsbr.c
b/uip/replsbr.c
index
d92fade
..
a415346
100644
(file)
--- a/
uip/replsbr.c
+++ b/
uip/replsbr.c
@@
-79,7
+79,8
@@
replout (FILE *inb, char *msg, char *drft, struct msgs *mp, int outputlinelen,
register char **ap;
register struct comp **savecomp;
int char_read = 0, format_len, mask;
register char **ap;
register struct comp **savecomp;
int char_read = 0, format_len, mask;
- char name[NAMESZ], *scanl, *cp;
+ char name[NAMESZ], *scanl;
+ unsigned char *cp;
FILE *out;
mask = umask(~m_gmprot());
FILE *out;
mask = umask(~m_gmprot());
@@
-159,10
+160,12
@@
replout (FILE *inb, char *msg, char *drft, struct msgs *mp, int outputlinelen,
*/
if ((cptr = wantcomp[CHASH(name)]))
do {
*/
if ((cptr = wantcomp[CHASH(name)]))
do {
- if (!strcasecmp(name, cptr->c_name)) {
+ if (!mh_strcasecmp(name, cptr->c_name)) {
char_read += msg_count;
if (! cptr->c_text) {
char_read += msg_count;
if (! cptr->c_text) {
- cptr->c_text = tmpbuf;
+ i = strlen(cptr->c_text = tmpbuf) - 1;
+ if (tmpbuf[i] == '\n')
+ tmpbuf[i] = '\0';
*--savecomp = cptr;
tmpbuf = *nxtbuf++;
} else {
*--savecomp = cptr;
tmpbuf = *nxtbuf++;
} else {
@@
-291,11
+294,9
@@
static unsigned int bufsiz=0; /* current size of buf */
int i = dst - buf;\
int n = last_dst - buf;\
bufsiz += ((dst + len - bufend) / BUFINCR + 1) * BUFINCR;\
int i = dst - buf;\
int n = last_dst - buf;\
bufsiz += ((dst + len - bufend) / BUFINCR + 1) * BUFINCR;\
- buf = realloc (buf, bufsiz);\
+ buf = mh_xrealloc (buf, bufsiz);\
dst = buf + i;\
last_dst = buf + n;\
dst = buf + i;\
last_dst = buf + n;\
- if (! buf)\
- adios (NULL, "formataddr: couldn't get buffer space");\
bufend = buf + bufsiz;\
}
bufend = buf + bufsiz;\
}
@@
-391,8
+392,8
@@
insert (struct mailname *np)
return 0;
for (mp = &mq; mp->m_next; mp = mp->m_next) {
return 0;
for (mp = &mq; mp->m_next; mp = mp->m_next) {
- if (!strcasecmp (np->m_host, mp->m_next->m_host)
- && !strcasecmp (np->m_mbox, mp->m_next->m_mbox))
+ if (!mh_strcasecmp (np->m_host, mp->m_next->m_host)
+ && !mh_strcasecmp (np->m_mbox, mp->m_next->m_mbox))
return 0;
}
if (!ccme && ismymbox (np))
return 0;
}
if (!ccme && ismymbox (np))