version 1.28, 2011/12/08 09:19:13 |
version 1.30, 2011/12/09 01:21:10 |
Line 1325 pformatted(DB *hash, struct buf *buf, struct buf *dbuf |
|
Line 1325 pformatted(DB *hash, struct buf *buf, struct buf *dbuf |
|
* bytes). |
* bytes). |
*/ |
*/ |
|
|
if (NULL != (p = strrchr(line, '-'))) { |
if (NULL != (p = strstr(line, "- "))) { |
for (++p; ' ' == *p || '\b' == *p; p++) |
for (p += 2; ' ' == *p || '\b' == *p; p++) |
/* Skip to next word. */ ; |
/* Skip to next word. */ ; |
} else |
} else |
p = line; |
p = line; |
Line 1334 pformatted(DB *hash, struct buf *buf, struct buf *dbuf |
|
Line 1334 pformatted(DB *hash, struct buf *buf, struct buf *dbuf |
|
if ((plen = strlen(p)) > 70) { |
if ((plen = strlen(p)) > 70) { |
plen = 70; |
plen = 70; |
p[plen] = '\0'; |
p[plen] = '\0'; |
|
} |
|
|
|
/* Strip backspace-encoding from line. */ |
|
|
|
while (NULL != (line = memchr(p, '\b', plen))) { |
|
len = line - p; |
|
if (0 == len) { |
|
memmove(line, line + 1, plen--); |
|
continue; |
|
} |
|
memmove(line - 1, line + 1, plen - len); |
|
plen -= 2; |
} |
} |
|
|
buf_appendb(dbuf, p, plen + 1); |
buf_appendb(dbuf, p, plen + 1); |