]> diplodocus.org Git - nmh/blobdiff - sbr/mf.c
Fixed inc(1) and %(me) to not obey Local-Mailbox profile component.
[nmh] / sbr / mf.c
index 1ff8416f2c710cad4fe45179031e4defceb3dcb3..51edd6450dc4e02974881cb6973b2e102a08a832 100644 (file)
--- a/sbr/mf.c
+++ b/sbr/mf.c
@@ -5,9 +5,9 @@
  * complete copyright information.
  */
 
-#include <h/mh.h>
-#include <h/mf.h>
-#include <h/utils.h>
+#include "h/mh.h"
+#include "h/mf.h"
+#include "h/utils.h"
 
 /*
  * static prototypes
@@ -138,7 +138,7 @@ static char *host = NULL;
 static char *routepath = NULL;
 static char *grp = NULL;
 static char *note = NULL;
-static char err[BUFSIZ];
+static char err[BUFSIZ+39];
 static char adr[BUFSIZ];
 
 static struct adrx  adrxs2;
@@ -244,7 +244,7 @@ again: ;
        case LX_END: 
            return DONE;
 
-       case LX_LBRK:           /* sigh (2) */
+       case LX_LBRK:           /* sigh (2) */
            goto get_addr;
 
        case LX_AT:             /* sigh (3) */
@@ -303,7 +303,7 @@ again: ;
                            }
                    }
 
-               case LX_DOT:    /* sigh (1) */
+               case LX_DOT:    /* sigh (1) */
                    pers = add (".", pers);
                    goto more_phrase;
 
@@ -349,7 +349,7 @@ again: ;
                    return NOTOK;
            }
 
-       case LX_SEMI:           /* no host */
+       case LX_SEMI:           /* no host */
        case LX_COMA: 
        case LX_END: 
            ingrp = glevel;
@@ -400,7 +400,7 @@ route_addr (char *buffer)
            return domain (buffer);
 
        case LX_SEMI:   /* if in group */
-       case LX_RBRK:           /* no host */
+       case LX_RBRK:           /* no host */
        case LX_COMA:
        case LX_END: 
            return OK;
@@ -461,7 +461,7 @@ domain (char *buffer)
                host = add (buffer, host);
                continue;
 
-           case LX_AT:         /* sigh (0) */
+           case LX_AT:         /* sigh (0) */
                mbox = add (host, add ("%", mbox));
                free (host);
                host = NULL;
@@ -540,7 +540,7 @@ my_lex (char *buffer)
     bp = buffer;
     *bp = 0;
     if (!cp)
-       return (last_lex = LX_END);
+       return last_lex = LX_END;
 
     gotat = isat (cp);
     c = *cp++;
@@ -548,7 +548,7 @@ my_lex (char *buffer)
        c = *cp++;
     if (c == 0) {
        cp = NULL;
-       return (last_lex = LX_END);
+       return last_lex = LX_END;
     }
 
     if (c == '(') {
@@ -557,12 +557,12 @@ my_lex (char *buffer)
            switch (c = *cp++) {
                case 0: 
                    cp = NULL;
-                   return (last_lex = LX_ERR);
+                   return last_lex = LX_ERR;
                case '\\': 
                    ADDCHR(c);
                    if ((c = *cp++) == 0) {
                        cp = NULL;
-                       return (last_lex = LX_ERR);
+                       return last_lex = LX_ERR;
                    }
                    ADDCHR(c);
                    continue;
@@ -589,12 +589,12 @@ my_lex (char *buffer)
            switch (c = *cp++) {
                case 0: 
                    cp = NULL;
-                   return (last_lex = LX_ERR);
+                   return last_lex = LX_ERR;
                case '\\': 
                    ADDCHR(c);
                    if ((c = *cp++) == 0) {
                        cp = NULL;
-                       return (last_lex = LX_ERR);
+                       return last_lex = LX_ERR;
                    }
                    /* FALLTHRU */
                default: 
@@ -603,7 +603,7 @@ my_lex (char *buffer)
                case '"': 
                    ADDCHR(c);
                    *bp = 0;
-                   return (last_lex = LX_QSTR);
+                   return last_lex = LX_QSTR;
            }
     }
     
@@ -613,12 +613,12 @@ my_lex (char *buffer)
            switch (c = *cp++) {
                case 0: 
                    cp = NULL;
-                   return (last_lex = LX_ERR);
+                   return last_lex = LX_ERR;
                case '\\': 
                    ADDCHR(c);
                    if ((c = *cp++) == 0) {
                        cp = NULL;
-                       return (last_lex = LX_ERR);
+                       return last_lex = LX_ERR;
                    }
                    /* FALLTHRU */
                default: 
@@ -627,7 +627,7 @@ my_lex (char *buffer)
                case ']': 
                    ADDCHR(c);
                    *bp = 0;
-                   return (last_lex = LX_DLIT);
+                   return last_lex = LX_DLIT;
            }
     }
     
@@ -635,10 +635,10 @@ my_lex (char *buffer)
     *bp = 0;
     for (i = 0; special[i].lx_chr != 0; i++)
        if (c == special[i].lx_chr)
-           return (last_lex = special[i].lx_val);
+           return last_lex = special[i].lx_val;
 
     if (iscntrl ((unsigned char) c))
-       return (last_lex = LX_ERR);
+       return last_lex = LX_ERR;
 
     for (;;) {
        if ((c = *cp++) == 0)
@@ -663,7 +663,7 @@ got_atom: ;
  my_lex_buffull:
     /* Out of buffer space. *bp is the last byte in the buffer */
     *bp = 0;
-    return (last_lex = LX_ERR);
+    return last_lex = LX_ERR;
 }