projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee8d01d
)
Fix `anno -delete': preserve newline in folded header fields
author
markus schnalke
<meillo@marmaro.de>
Mon, 17 Apr 2017 21:41:55 +0000
(23:41 +0200)
committer
markus schnalke
<meillo@marmaro.de>
Mon, 17 Apr 2017 21:41:55 +0000
(23:41 +0200)
uip/anno.c
patch
|
blob
|
history
diff --git
a/uip/anno.c
b/uip/anno.c
index
33d2b49
..
1708557
100644
(file)
--- a/
uip/anno.c
+++ b/
uip/anno.c
@@
-480,11
+480,13
@@
dodel(int fd, unsigned char *comp, char *text, FILE *tmp, int number)
** a long path name.
*/
for (n=0, cp=field; (c=getc(fp)) != EOF; *cp++ = c) {
- if (c == '\n' && (c = getc(fp)) != ' ' &&
- c != '\t') {
- ungetc(c, fp);
+ if (c == '\n') {
+ ungetc((c = getc(fp)), fp);
+ if (c != ' ' && c != '\t') {
+ c = '\n';
+ break;
+ }
c = '\n';
- break;
}
if (++n >= field_size - 1) {