Annotation of 43BSDReno/contrib/isode-beta/dsap/common/parse_error.c, revision 1.1

1.1     ! root        1: /* parse_error.c - */
        !             2: 
        !             3: #ifndef        lint
        !             4: static char *rcsid = "$Header: /f/osi/dsap/common/RCS/parse_error.c,v 7.1 90/07/09 14:34:56 mrose Exp $";
        !             5: #endif
        !             6: 
        !             7: /* 
        !             8:  * $Header: /f/osi/dsap/common/RCS/parse_error.c,v 7.1 90/07/09 14:34:56 mrose Exp $
        !             9:  *
        !            10:  *
        !            11:  * $Log:       parse_error.c,v $
        !            12:  * Revision 7.1  90/07/09  14:34:56  mrose
        !            13:  * sync
        !            14:  * 
        !            15:  * Revision 7.0  89/11/23  21:42:37  mrose
        !            16:  * Release 6.0
        !            17:  * 
        !            18:  */
        !            19: 
        !            20: /*
        !            21:  *                               NOTICE
        !            22:  *
        !            23:  *    Acquisition, use, and distribution of this module and related
        !            24:  *    materials are subject to the restrictions of a license agreement.
        !            25:  *    Consult the Preface in the User's Manual for the full terms of
        !            26:  *    this agreement.
        !            27:  *
        !            28:  */
        !            29: 
        !            30: 
        !            31: /* LINTLIBRARY */
        !            32: 
        !            33: #include "quipu/util.h"
        !            34: #include "psap.h"
        !            35: 
        !            36: int print_parse_errors = TRUE;
        !            37: int parse_status = 0;
        !            38: #ifdef TURBO_DISK
        !            39: char *parse_entry = NULL;
        !            40: #endif
        !            41: PS opt = NULLPS;
        !            42: int parse_line = 1;
        !            43: extern LLog * log_dsap;
        !            44: 
        !            45: parse_error (a,b)
        !            46: char *a, *b;
        !            47: {
        !            48: char buffer [LINESIZE];
        !            49: 
        !            50:        parse_status++;
        !            51: 
        !            52:        if (print_parse_errors) {
        !            53:                if (opt == NULLPS) {
        !            54:                        opt = ps_alloc (std_open);
        !            55:                        if (std_setup (opt,stderr) != OK) {
        !            56:                                LLOG (log_dsap,LLOG_EXCEPTIONS,("cant open error (parse)..."));
        !            57:                                LLOG (log_dsap,LLOG_EXCEPTIONS,(a,b));
        !            58:                                return;
        !            59:                        }
        !            60:                }
        !            61: #ifdef TURBO_DISK
        !            62:                if ( parse_entry != NULL )
        !            63:                        ps_printf(opt, "key (%s): ", parse_entry);
        !            64: #else
        !            65:                if (parse_line != 0)
        !            66:                        ps_printf (opt,"line %d: ",parse_line);
        !            67: #endif
        !            68:                ps_printf (opt,a,b);
        !            69:                ps_printf (opt,"\n");
        !            70:        } else {
        !            71: #ifdef TURBO_DISK
        !            72:                if ( parse_entry != NULL ) {
        !            73:                        (void) sprintf (buffer,"key (%s): ", parse_entry);
        !            74:                        (void) strcat (buffer,a);
        !            75:                        LLOG (log_dsap,LLOG_EXCEPTIONS,(buffer,b));
        !            76: #else
        !            77:                if (parse_line != 0) {
        !            78:                        (void) sprintf (buffer,"line %d: ",parse_line);
        !            79:                        (void) strcat (buffer,a);
        !            80:                        LLOG (log_dsap,LLOG_EXCEPTIONS,(buffer,b));
        !            81: #endif
        !            82:                } else
        !            83:                        LLOG (log_dsap,LLOG_EXCEPTIONS,(a,b));
        !            84:        }
        !            85: }

unix.superglobalmegacorp.com

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