# 2.11BSD#431 - /usr/src/bin/sh/msg.c

       1: #ifndef lint
       2: static char sccsid[] = "@(#)msg.c	4.4 5/22/85";
       3: #endif
       4:
       5: #
       6: /*
       7:  *	UNIX shell
       8:  *
       9:  *	S. R. Bourne
      10:  *	Bell Telephone Laboratories
      11:  *
      12:  */
      13:
      14:
      15: #include    "defs.h"
      16: #include    "sym.h"
      17:
      18: MSG     version = "\nVERSION sys137	DATE 1978 Nov 6 14:29:22\n";
      19:
      20: /* error messages */
      21: MSG badopt      = "bad option(s)";
      22: MSG mailmsg     = "you have mail\n";
      23: MSG nospace     = "no space";
      24: MSG synmsg      = "syntax error";
      25:
      26: MSG badnum      = "bad number";
      27: MSG badparam    = "parameter not set";
      28: MSG badsub      = "bad substitution";
      29: MSG badcreate   = "cannot create";
      30: MSG illegal     = "illegal io";
      31: MSG restricted  = "restricted";
      32: MSG piperr      = "cannot make pipe";
      33: MSG badopen     = "cannot open";
      34: MSG coredump    = " - core dumped";
      35: MSG arglist     = "arg list too long";
      36: MSG txtbsy      = "text busy";
      37: MSG toobig      = "too big";
      38: MSG badexec     = "cannot execute";
      39: MSG notfound    = "not found";
      40: MSG badfile     = "bad file number";
      41: MSG badshift    = "cannot shift";
      42: MSG baddir      = "bad directory";
      43: MSG badtrap     = "bad trap";
      44: MSG wtfailed    = "is read only";
      45: MSG notid       = "is not an identifier";
      46:
      47: /* built in names */
      48: MSG pathname    = "PATH";
      49: MSG homename    = "HOME";
      50: MSG mailname    = "MAIL";
      51: MSG fngname     = "FILEMATCH";
      52: MSG ifsname     = "IFS";
      53: MSG ps1name     = "PS1";
      54: MSG ps2name     = "PS2";
      55:
      56: /* string constants */
      57: MSG nullstr     = "";
      58: MSG sptbnl      = " \t\n";
      59: MSG defpath     = ":/bin:/usr/bin";
      60: MSG colon       = ": ";
      61: MSG minus       = "-";
      62: MSG endoffile   = "end of file";
      63: MSG unexpected  = " unexpected";
      64: MSG atline      = " at line ";
      65: MSG devnull     = "/dev/null";
      66: MSG execpmsg    = "+ ";
      67: MSG readmsg     = "> ";
      68: MSG stdprompt   = "$ ";
      69: MSG supprompt   = "# ";
      70: MSG profile     = ".profile";
      71:
      72:
      73: /* tables */
      74: SYSTAB reserved = {
      75:         {"in",      INSYM},
      76:         {"esac",    ESSYM},
      77:         {"case",    CASYM},
      78:         {"for",     FORSYM},
      79:         {"done",    ODSYM},
      80:         {"if",      IFSYM},
      81:         {"while",   WHSYM},
      82:         {"do",      DOSYM},
      83:         {"then",    THSYM},
      84:         {"else",    ELSYM},
      85:         {"elif",    EFSYM},
      86:         {"fi",      FISYM},
      87:         {"until",   UNSYM},
      88:         { "{",      BRSYM},
      89:         { "}",      KTSYM},
      90:         {0, 0},
      91: };
      92:
      93: STRING  sysmsg[] = {
      94:         0,
      95:         "Hangup",
      96:         0,  /* Interrupt */
      97:         "Quit",
      98:         "Illegal instruction",
      99:         "Trace/BPT trap",
     100:         "IOT trap",
     101:         "EMT trap",
     102:         "Floating exception",
     103:         "Killed",
     104:         "Bus error",
     105:         "Memory fault",
     106:         "Bad system call",
     107:         0,  /* Broken pipe */
     108:         "Alarm call",
     109:         "Terminated",
     110:         "Urgent condition",
     111:         "Stopped",
     112:         "Stopped from terminal",
     113:         "Continued",
     114:         "Child terminated",
     115:         "Stopped on terminal input",
     116:         "Stopped on terminal output",
     117:         "Asynchronous I/O",
     118:         "Exceeded cpu time limit",
     119:         "Exceeded file size limit",
     120:         "Virtual time alarm",
     121:         "Profiling time alarm",
     122:         "Window changed",
     123:         "Signal 29",
     124:         "User defined signal 1",
     125:         "User defined signal 2",
     126:         "Signal 32",
     127: };
     128: INT     num_sysmsg = (sizeof sysmsg / sizeof sysmsg[0]);
     129:
     130: MSG     export = "export";
     131: MSG     readonly = "readonly";
     132: SYSTAB  commands = {
     133:         {"cd",      SYSCD},
     134:         {"read",    SYSREAD},
     135: /*
     136: 		{"[",		SYSTST},
     137: */
     138:         {"set",     SYSSET},
     139:         {":",       SYSNULL},
     140:         {"trap",    SYSTRAP},
     141:         {"login",   SYSLOGIN},
     142:         {"wait",    SYSWAIT},
     143:         {"eval",    SYSEVAL},
     144:         {".",       SYSDOT},
     145:         {readonly,  SYSRDONLY},
     146:         {export,    SYSXPORT},
     147:         {"chdir",   SYSCD},
     148:         {"break",   SYSBREAK},
     149:         {"continue",    SYSCONT},
     150:         {"shift",   SYSSHFT},
     151:         {"exit",    SYSEXIT},
     152:         {"exec",    SYSEXEC},
     153:         {"times",   SYSTIMES},
     154:         {"umask",   SYSUMASK},
     155:         {0, 0},
     156: };

#### Defined variables

sccsid defined in line 2; never used

Last modified: 1987-01-11 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 527 |