X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fanno.c;h=e8742385fa2475c1f704de538145c116e3627c3f;hp=3958eb148e6bf9332d401bec70de45b7eb21ca0b;hb=6c0952c1d53bc73b1beefc46ef9ee08cd5213ac3;hpb=bd60514e13b4b1d4e2f726e6fc54da9eff6a263e diff --git a/uip/anno.c b/uip/anno.c index 3958eb1..e874238 100644 --- a/uip/anno.c +++ b/uip/anno.c @@ -26,7 +26,7 @@ static struct swit switches[] = { #define DATESW 1 { "date", 0 }, #define NDATESW 2 - { "nodate", 0 }, + { "nodate", 2 }, #define TEXTSW 3 { "text body", 0 }, #define VERSIONSW 4 @@ -44,7 +44,7 @@ static struct swit switches[] = { #define PRESERVESW 10 { "preserve", 0 }, #define NOPRESERVESW 11 - { "nopreserve", 0 }, + { "nopreserve", 2 }, { NULL, 0 } }; @@ -74,9 +74,7 @@ main(int argc, char **argv) int append = 0; /* append annotations instead of default prepend */ int number = 0; /* delete specific number of like elements if set */ -#ifdef LOCALE setlocale(LC_ALL, ""); -#endif invo_name = mhbasename(argv[0]); context_read(); @@ -330,10 +328,7 @@ annolist(char *file, unsigned char *comp, int number) if (strncasecmp(field, comp, length)==0 && field[length] == ':') { - for (cp = field + length + 1; - *cp == ' ' || *cp == '\t'; cp++) { - continue; - } + cp = trim(field + length + 1); if (number) { printf("%d\t", count++); }