projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace getcpy() and strdup() with mh_xstrdup()
[mmh]
/
uip
/
new.c
diff --git
a/uip/new.c
b/uip/new.c
index
25ee492
..
5bc7136
100644
(file)
--- a/
uip/new.c
+++ b/
uip/new.c
@@
-55,7
+55,7
@@
count_messages(char *field)
int j, k;
char *cp, **ap;
int j, k;
char *cp, **ap;
- field = getcpy(field);
+ field = mh_xstrdup(field);
/* copied from seq_read.c:seq_init */
for (ap = brkstring(field, " ", "\n"); *ap; ap++) {
/* copied from seq_read.c:seq_init */
for (ap = brkstring(field, " ", "\n"); *ap; ap++) {
@@
-114,7
+114,7
@@
get_msgnums(char *folder, char *sequences[])
case FLD:
case FLDPLUS:
if (state == FLDPLUS) {
case FLD:
case FLDPLUS:
if (state == FLDPLUS) {
- cp = getcpy(field);
+ cp = mh_xstrdup(field);
while (state == FLDPLUS) {
state = m_getfld(state, name, field,
sizeof(field), fp);
while (state == FLDPLUS) {
state = m_getfld(state, name, field,
sizeof(field), fp);
@@
-258,7
+258,7
@@
check_folders(struct node **first, struct node **last,
while (vfgets(fp, &line) == OK) {
len = strlen(line) - 1;
line[len] = '\0';
while (vfgets(fp, &line) == OK) {
len = strlen(line) - 1;
line[len] = '\0';
- check_folder(getcpy(line), len, &b);
+ check_folder(mh_xstrdup(line), len, &b);
}
fclose(fp);
}
}
fclose(fp);
}
@@
-514,7
+514,7
@@
main(int argc, char **argv)
} else {
unseen = seq_unseen; /* use default */
}
} else {
unseen = seq_unseen; /* use default */
}
- dp = getcpy(unseen);
+ dp = mh_xstrdup(unseen);
for (ap = brkstring(dp, " ", "\n"); *ap; ap++) {
sequences[i++] = *ap;
}
for (ap = brkstring(dp, " ", "\n"); *ap; ap++) {
sequences[i++] = *ap;
}