Annotation of coherent/a/usr/bob/uusrc/modemcap/merror.c, revision 1.1.1.1

1.1       root        1: #include <stdio.h>
                      2: 
                      3: int merrno;                    /* modem error return code              */
                      4: 
                      5: char *_merr_list[] = {
                      6:        "No error",
                      7:        "Interrupt occurred",                           /*  M_INTRPT    */
                      8:        "Dialer Hung",                                  /*  M_D_HUNG    */
                      9:        "No answer",                                    /*  M_NO_ANS    */
                     10:        "Illegal baud rate",                            /*  M_ILL_BD    */
                     11:        "ACU Problem",                                  /*  M_A_PROB    */
                     12:        "Line Problem",                                 /*  M_L_PROB    */
                     13:        "Can't open LDEVS file",                        /*  M_NO_LDV    */
                     14:        "Requested device not available",               /*  M_DV_NT_A   */
                     15:        "Requested device not known",                   /*  M_DV_NT_K   */
                     16:        "No device available at requested baud",        /*  M_NO_BD_A   */
                     17:        "No device known at requested baud",            /*  M_NO_BD_K   */
                     18:        "Incompatible telephone num and device chosen"  /*  M_DEV_TEL   */
                     19: };
                     20: 
                     21: int    _msys_nerr = (sizeof (_merr_list) / sizeof (char *));
                     22: 
                     23: merror (s)
                     24: char   *s;
                     25: {
                     26:        int     i = -merrno;
                     27: 
                     28:        if (0 <= i && i < _msys_nerr)
                     29:                fprintf (stderr, "%s: %s\n", s, _merr_list[i]);
                     30:        else
                     31:                fprintf (stderr, "%s: Error %d\n", s, merrno);
                     32: }

unix.superglobalmegacorp.com

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