X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fanno.c;h=170855798c44476ef8218fb7d798b4f359169d27;hp=81ad042bf7b50d8bf1e7d8661754ebe195f01baa;hb=93fa896ceb5fbebe2f1f6e6e36419a13f8ffd99f;hpb=d4c34b4439a9dbd89664de460ed37ecddc260fb1 diff --git a/uip/anno.c b/uip/anno.c index 81ad042..1708557 100644 --- a/uip/anno.c +++ b/uip/anno.c @@ -53,6 +53,8 @@ static struct swit switches[] = { { NULL, 0 } }; +char *version=VERSION; + /* ** static prototypes */ @@ -181,7 +183,7 @@ main(int argc, char **argv) if (folder) adios(EX_USAGE, NULL, "only one folder at a time!"); else - folder = getcpy(expandfol(cp)); + folder = mh_xstrdup(expandfol(cp)); } else if (*cp == '/' || *cp == '.') { if (file) adios(EX_USAGE, NULL, "only one file at a time!"); @@ -478,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) {