X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/0a032eea07f6d77ac6ea4d5a39c9491c34358058..29db9a64a:/uip/annosbr.c?ds=sidebyside diff --git a/uip/annosbr.c b/uip/annosbr.c index 3819010a..2c1ce75a 100644 --- a/uip/annosbr.c +++ b/uip/annosbr.c @@ -1,5 +1,4 @@ -/* - * annosbr.c -- prepend annotation to messages +/* annosbr.c -- prepend annotation to messages * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -9,6 +8,8 @@ #include #include #include +#include "../sbr/lock_file.h" +#include "../sbr/m_mktemp.h" #include #include @@ -69,7 +70,7 @@ annotate (char *file, char *comp, char *text, int inplace, int datesw, int delet /* * Produce a listing of all header fields (annotations) whose field name matches - * comp. Number the listing if number is set. Treate the field bodies as path + * comp. Number the listing if number is set. Treat the field bodies as path * names and just output the last component unless text is non-NULL. We don't * care what text is set to. */ @@ -154,8 +155,6 @@ annolist(char *file, char *comp, char *text, int number) free(field); (void)fclose(fp); - - return; } /* @@ -166,7 +165,6 @@ void annopreserve(int preserve) { preserve_actime_and_modtime = preserve; - return; } static int @@ -404,7 +402,7 @@ annosbr (int fd, char *file, char *comp, char *text, int inplace, int datesw, in if ((tmpfd = open (tmpfil, O_RDONLY)) == NOTOK) adios (tmpfil, "unable to open for re-reading"); - lseek (fd, (off_t) 0, SEEK_SET); + lseek(fd, 0, SEEK_SET); /* * We're making the file shorter if we're deleting a header field