version 1.42, 2005/12/13 06:01:27 |
version 1.43, 2005/12/20 06:17:36 |
|
|
|
|
maclcur = lp->l_bp; |
maclcur = lp->l_bp; |
maclcur->l_fp = lp->l_fp; |
maclcur->l_fp = lp->l_fp; |
free((char *)lp); |
free(lp); |
} |
} |
#endif /* !NO_MACRO */ |
#endif /* !NO_MACRO */ |
if ((rep[0] == 'y' || rep[0] == 'Y') && |
if ((rep[0] == 'y' || rep[0] == 'Y') && |
|
|
int oldhue = tthue; |
int oldhue = tthue; |
char *linebuf; |
char *linebuf; |
size_t linesize, len; |
size_t linesize, len; |
const char *cp; |
char *cp; |
|
|
lh = NULL; |
lh = NULL; |
|
|
|
|
linebuf[0] = '\0'; |
linebuf[0] = '\0'; |
width = 0; |
width = 0; |
} |
} |
len = strlcat(linebuf, lh2->l_name + preflen, linesize); |
len = strlcat(linebuf, lh2->l_name + preflen, |
|
linesize); |
width += maxwidth; |
width += maxwidth; |
if (len < width && width < linesize) { |
if (len < width && width < linesize) { |
/* pad so the objects nicely line up */ |
/* pad so the objects nicely line up */ |
|
|
|
|
while (lp) { |
while (lp) { |
next = lp->l_next; |
next = lp->l_next; |
|
free(lp->l_name); |
free(lp); |
free(lp); |
lp = next; |
lp = next; |
} |
} |
|
|
while (lp) { |
while (lp) { |
current = (struct list *)malloc(sizeof(struct list)); |
current = (struct list *)malloc(sizeof(struct list)); |
if (current == NULL) { |
if (current == NULL) { |
|
/* Free what we have allocated so far */ |
for (current = last; current; current = nxt) { |
for (current = last; current; current = nxt) { |
nxt = current->l_next; |
nxt = current->l_next; |
|
free(current->l_name); |
free(current); |
free(current); |
} |
} |
return (NULL); |
return (NULL); |
} |
} |
current->l_next = last; |
current->l_next = last; |
current->l_name = lp->l_name; |
current->l_name = strdup(lp->l_name); |
last = current; |
last = current; |
lp = lp->l_next; |
lp = lp->l_next; |
} |
} |