1) fixed \%dFOO query formats

2) made %% work in query formats

CVS patchset: 1900
CVS date: 1997/11/18 02:45:38
This commit is contained in:
ewt 1997-11-18 02:45:38 +00:00
parent d5b0c59cec
commit 59f3f537e9
2 changed files with 18 additions and 1 deletions

View File

@ -1,6 +1,8 @@
2.4.10 -> 2.4.11:
- HAVE_SYS_SOCKET_H was mistakingly MACHINE_SYS_SOCKET_H in
config.h.in
- \%description was trying to do %d expansion in query formats
- made %% work in query formats
2.4.9 -> 2.4.10:
- obsolete entries could cause segv's during upgrades

View File

@ -1308,6 +1308,21 @@ static int parseFormat(char * str, const struct headerTagTableEntry * tags,
while (*start && !done) {
switch (*start) {
case '%':
/* handle %% */
if (*(start + 1) == '%') {
if (currToken < 0 || format[currToken].type != PTOK_STRING) {
currToken++;
format[currToken].type = PTOK_STRING;
dst = format[currToken].u.string.string = start;
}
start++;
*dst++ = *start++;
break; /* out of switch */
}
currToken++;
*dst++ = '\0';
start++;
@ -1638,7 +1653,7 @@ static char * singleSprintf(Header h, struct sprintfToken * token,
case PTOK_STRING:
val = malloc(token->u.string.len + 1);
sprintf(val, token->u.string.string);
strcpy(val, token->u.string.string);
break;
case PTOK_TAG: