Annotation of 43BSDReno/bin/sh/msg.c, revision 1.1.1.1

1.1       root        1: #ifndef lint
                      2: static char sccsid[] = "@(#)msg.c      4.6 5/8/89";
                      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    colon           = ": ";
                     60: MSG    minus           = "-";
                     61: MSG    endoffile       = "end of file";
                     62: MSG    unexpected      = " unexpected";
                     63: MSG    atline          = " at line ";
                     64: MSG    devnull         = "/dev/null";
                     65: MSG    execpmsg        = "+ ";
                     66: MSG    readmsg         = "> ";
                     67: MSG    stdprompt       = "$ ";
                     68: MSG    supprompt       = "# ";
                     69: MSG    profile         = ".profile";
                     70: 
                     71: 
                     72: /* tables */
                     73: SYSTAB reserved = {
                     74:                {"in",          INSYM},
                     75:                {"esac",        ESSYM},
                     76:                {"case",        CASYM},
                     77:                {"for",         FORSYM},
                     78:                {"done",        ODSYM},
                     79:                {"if",          IFSYM},
                     80:                {"while",       WHSYM},
                     81:                {"do",          DOSYM},
                     82:                {"then",        THSYM},
                     83:                {"else",        ELSYM},
                     84:                {"elif",        EFSYM},
                     85:                {"fi",          FISYM},
                     86:                {"until",       UNSYM},
                     87:                { "{",          BRSYM},
                     88:                { "}",          KTSYM},
                     89:                {0,     0},
                     90: };
                     91: 
                     92: STRING sysmsg[] = {
                     93:                0,
                     94:                "Hangup",
                     95:                0,      /* Interrupt */
                     96:                "Quit",
                     97:                "Illegal instruction",
                     98:                "Trace/BPT trap",
                     99:                "IOT trap",
                    100:                "EMT trap",
                    101:                "Floating exception",
                    102:                "Killed",
                    103:                "Bus error",
                    104:                "Memory fault",
                    105:                "Bad system call",
                    106:                0,      /* Broken pipe */
                    107:                "Alarm call",
                    108:                "Terminated",
                    109:                "Urgent condition",
                    110:                "Stopped",
                    111:                "Stopped from terminal",
                    112:                "Continued",
                    113:                "Child terminated",
                    114:                "Stopped on terminal input",
                    115:                "Stopped on terminal output",
                    116:                "Asynchronous I/O",
                    117:                "Exceeded cpu time limit",
                    118:                "Exceeded file size limit",
                    119:                "Virtual time alarm",
                    120:                "Profiling time alarm",
                    121:                "Window changed",
                    122:                "Signal 29",
                    123:                "User defined signal 1",
                    124:                "User defined signal 2",
                    125:                "Signal 32",
                    126: };
                    127: INT            num_sysmsg = (sizeof sysmsg / sizeof sysmsg[0]);
                    128: 
                    129: MSG            export = "export";
                    130: MSG            readonly = "readonly";
                    131: SYSTAB commands = {
                    132:                {"cd",          SYSCD},
                    133:                {"read",        SYSREAD},
                    134: /*
                    135:                {"[",           SYSTST},
                    136: */
                    137:                {"set",         SYSSET},
                    138:                {":",           SYSNULL},
                    139:                {"trap",        SYSTRAP},
                    140:                {"login",       SYSLOGIN},
                    141:                {"wait",        SYSWAIT},
                    142:                {"eval",        SYSEVAL},
                    143:                {".",           SYSDOT},
                    144:                {readonly,      SYSRDONLY},
                    145:                {export,        SYSXPORT},
                    146:                {"chdir",       SYSCD},
                    147:                {"break",       SYSBREAK},
                    148:                {"continue",    SYSCONT},
                    149:                {"shift",       SYSSHFT},
                    150:                {"exit",        SYSEXIT},
                    151:                {"exec",        SYSEXEC},
                    152:                {"times",       SYSTIMES},
                    153:                {"umask",       SYSUMASK},
                    154:                {0,     0},
                    155: };

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.