break out special local mail processing (e.g., mapping to the
[unix-history] / usr / src / usr.bin / error / pi.c
index f0b0d2b..483fa40 100644 (file)
@@ -1,6 +1,17 @@
-static char *sccsid = "@(#)pi.c        1.3 (Berkeley) %G%";
+/*
+ * Copyright (c) 1980, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * %sccs.include.redist.c%
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)pi.c       8.1 (Berkeley) %G%";
+#endif /* not lint */
+
 #include <stdio.h>
 #include <ctype.h>
 #include <stdio.h>
 #include <ctype.h>
+#include <string.h>
 #include "error.h"
 
 extern char    *currentfilename;
 #include "error.h"
 
 extern char    *currentfilename;
@@ -169,6 +180,8 @@ Errorclass pi()
 {
        char    **nwordv;
 
 {
        char    **nwordv;
 
+       if (wordc < 2)
+               return (C_UNKNOWN);
        if (   ( strlen(wordv[1]) == 1)
            && ( (wordv[1][0] == 'e') || (wordv[1][0] == 'E') )
            && ( piptr(wordv[2]) )
        if (   ( strlen(wordv[1]) == 1)
            && ( (wordv[1][0] == 'e') || (wordv[1][0] == 'E') )
            && ( piptr(wordv[2]) )