]> diplodocus.org Git - nmh/blobdiff - uip/slocal.c
Changes to anno.man.
[nmh] / uip / slocal.c
index 772c4e2bb0fc55dd88abdf60021c4cf0dc5f0b16..0e3baae4b069b37546b8270c076f70fe9131bddc 100644 (file)
@@ -452,7 +452,7 @@ usr_delivery (int fd, char *delivery, int su)
        if (*buffer == '#' || *buffer == '\n')
            continue;
 
-        TrimSuffixC(buffer, '\n');
+        trim_suffix_c(buffer, '\n');
 
        /* split buffer into fields */
        vecp = split (buffer, vec);
@@ -735,7 +735,7 @@ parse (int fd)
        switch (state = m_getfld (&gstate, name, field, &fieldsz, in)) {
            case FLD: 
            case FLDPLUS: 
-               lp = add (field, NULL);
+               lp = mh_xstrdup(field);
                while (state == FLDPLUS) {
                    fieldsz = sizeof field;
                    state = m_getfld (&gstate, name, field, &fieldsz, in);
@@ -1250,11 +1250,10 @@ you_lose:
      * and massage the headers.  Save
      * a copy of the "From " line for later.
      */
-    i = LEN("From ");
     while (fgets (buffer, sizeof(buffer), qfp)) {
        if (first) {
            first = 0;
-           if (!strncmp (buffer, "From ", i)) {
+           if (has_prefix(buffer, "From ")) {
                /* get copy of envelope information ("From " line) */
                envelope = mh_xstrdup(buffer);
 
@@ -1338,7 +1337,7 @@ verbose_printf (char *fmt, ...)
     va_list ap;
 
     va_start(ap, fmt);
-    vfprintf (stdout, fmt, ap);
+    vprintf(fmt, ap);
     va_end(ap);
 
     fflush (stdout);   /* now flush output */
@@ -1358,22 +1357,22 @@ adorn (char *what, char *fmt, ...)
     char *s;
 
     eindex = errno;    /* save the errno */
-    fprintf (stdout, ", ");
+    printf(", ");
 
     va_start(ap, fmt);
-    vfprintf (stdout, fmt, ap);
+    vprintf(fmt, ap);
     va_end(ap);
 
     if (what) {
        if (*what)
-           fprintf (stdout, " %s: ", what);
+           printf(" %s: ", what);
        if ((s = strerror (eindex)))
-           fprintf (stdout, "%s", s);
+           fputs(s, stdout);
        else
-           fprintf (stdout, "Error %d", eindex);
+           printf("Error %d", eindex);
     }
 
-    fputc ('\n', stdout);
+    putchar('\n');
     fflush (stdout);
 }
 
@@ -1433,7 +1432,7 @@ suppress_duplicates (int fd, char *file)
                    continue;
                }
 
-               cp = add (buf, NULL);
+               cp = mh_xstrdup(buf);
                while (state == FLDPLUS) {
                    bufsz = sizeof buf;
                    state = m_getfld (&gstate, name, buf, &bufsz, in);