hash() could return negative values.
[unix-history] / usr / src / usr.bin / mail / lex.c
index aaf427b..6c7f331 100644 (file)
@@ -8,7 +8,7 @@
  * Lexical processing of commands.
  */
 
  * Lexical processing of commands.
  */
 
-static char *SccsId = "@(#)lex.c       2.9 %G%";
+static char *SccsId = "@(#)lex.c       2.11 %G%";
 
 char   *prompt = "& ";
 
 
 char   *prompt = "& ";
 
@@ -28,13 +28,8 @@ setfile(name, isedit)
        static char efile[128];
        extern char tempMesg[];
 
        static char efile[128];
        extern char tempMesg[];
 
-       if ((ibuf = fopen(name, "r")) == NULL) {
-               if (isedit)
-                       perror(name);
-               else
-                       printf("No mail for %s\n", myname);
+       if ((ibuf = fopen(name, "r")) == NULL)
                return(-1);
                return(-1);
-       }
 
        /*
         * Looks like all will be well.  We must now relinquish our
 
        /*
         * Looks like all will be well.  We must now relinquish our
@@ -547,11 +542,11 @@ announce(pr)
        int vec[2], mdot;
        extern char *version;
 
        int vec[2], mdot;
        extern char *version;
 
+       if (pr && value("quiet") == NOSTR)
+               printf(greeting, version);
        mdot = newfileinfo();
        vec[0] = mdot;
        vec[1] = 0;
        mdot = newfileinfo();
        vec[0] = mdot;
        vec[1] = 0;
-       if (pr && value("quiet") == NOSTR)
-               printf(greeting, version);
        dot = &message[mdot - 1];
        if (msgCount > 0 && !noheader) {
                inithdr++;
        dot = &message[mdot - 1];
        if (msgCount > 0 && !noheader) {
                inithdr++;