Annotation of coherent/g/usr/lib/ncurses/compiler.h, revision 1.1.1.1

1.1       root        1: /*********************************************************************
                      2: *                         COPYRIGHT NOTICE                           *
                      3: **********************************************************************
                      4: *        This software is copyright (C) 1982 by Pavel Curtis         *
                      5: *                                                                    *
                      6: *        Permission is granted to reproduce and distribute           *
                      7: *        this file by any means so long as no fee is charged         *
                      8: *        above a nominal handling fee and so long as this            *
                      9: *        notice is always included in the copies.                    *
                     10: *                                                                    *
                     11: *        Other rights are reserved except as explicitly granted      *
                     12: *        by written permission of the author.                        *
                     13: *                Pavel Curtis                                        *
                     14: *                Computer Science Dept.                              *
                     15: *                405 Upson Hall                                      *
                     16: *                Cornell University                                  *
                     17: *                Ithaca, NY 14853                                    *
                     18: *                                                                    *
                     19: *                Ph- (607) 256-4934                                  *
                     20: *                                                                    *
                     21: *                Pavel.Cornell@Udel-Relay   (ARPAnet)                *
                     22: *                decvax!cornell!pavel       (UUCPnet)                *
                     23: *********************************************************************/
                     24: 
                     25: /*
                     26:  *     compiler.h - Global variables and structures for the terminfo
                     27:  *                     compiler.
                     28:  *
                     29:  *  $Header: /src386/usr/lib/ncurses/RCS/compiler.h,v 1.7 93/04/12 14:10:47 bin Exp Locker: bin $
                     30:  *
                     31:  *  $Log:      compiler.h,v $
                     32:  * Revision 1.7  93/04/12  14:10:47  bin
                     33:  * udo: 3rd color update
                     34:  * 
                     35:  * Revision 1.2  92/04/13  14:39:59  bin
                     36:  * *** empty log message ***
                     37:  * 
                     38:  * Revision 2.1  82/10/25  14:46:04  pavel
                     39:  * Added Copyright Notice
                     40:  * 
                     41:  * Revision 2.0  82/10/24  15:17:20  pavel
                     42:  * Beta-one Test Release
                     43:  * 
                     44:  * Revision 1.3  82/08/23  22:30:09  pavel
                     45:  * The REAL Alpha-one Release Version
                     46:  * 
                     47:  * Revision 1.2  82/08/19  19:10:10  pavel
                     48:  * Alpha Test Release One
                     49:  * 
                     50:  * Revision 1.1  82/08/12  18:38:11  pavel
                     51:  * Initial revision
                     52:  *
                     53:  */
                     54: 
                     55: #include <stdio.h>
                     56: 
                     57: #ifndef TRUE
                     58: #define TRUE   1
                     59: #define FALSE  0
                     60: #endif
                     61: 
                     62: #define SINGLE                 /* only one terminal (actually none) */
                     63: 
                     64: extern char *destination;      /* destination directory for object files */
                     65: 
                     66: long   start_time;             /* time at start of compilation */
                     67: long   time();
                     68: 
                     69: int    curr_line;              /* current line # in input */
                     70: long   curr_file_pos;          /* file offset of current line */
                     71: 
                     72: int    debug_level;            /* level of debugging output */
                     73: 
                     74: #define DEBUG(level, fmt, a1) \
                     75:                if (debug_level >= level)\
                     76:                    fprintf(stderr, fmt, a1);
                     77: 
                     78:        /*
                     79:         *      These are the types of tokens returned by the scanner.
                     80:         *      The first three are also used in the hash table of capability
                     81:         *      names.  The scanner returns one of these values after loading
                     82:         *      the specifics into the global structure curr_token.
                     83:         *
                     84:         */
                     85: 
                     86: #define BOOLEAN 0              /* Boolean capability */
                     87: #define NUMBER 1               /* Numeric capability */
                     88: #define STRING 2               /* String-valued capability */
                     89: #define CANCEL 3               /* Capability to be cancelled in following tc's */
                     90: #define NAMES  4               /* The names for a terminal type */
                     91: 
                     92:        /*
                     93:         *      The global structure in which the specific parts of a
                     94:         *      scanned token are returned.
                     95:         *
                     96:         */
                     97: 
                     98: struct token
                     99: {
                    100:        char    *tk_name;               /* name of capability */
                    101:        int     tk_valnumber;   /* value of capability (if a number) */
                    102:        char    *tk_valstring;  /* value of capability (if a string) */
                    103: };
                    104: 
                    105: struct token   curr_token;
                    106: 
                    107:        /*
                    108:         *      The file comp_captab.c contains an array of these structures,
                    109:         *      one per possible capability.  These are then made into a hash
                    110:         *      table array of the same structures for use by the parser.
                    111:         *
                    112:         */
                    113: 
                    114: struct name_table_entry
                    115: {
                    116:        struct name_table_entry *nte_link;
                    117:        char    *nte_name;      /* name to hash on */
                    118:        int     nte_type;       /* BOOLEAN, NUMBER or STRING */
                    119:        short   nte_index;      /* index of associated variable in its array */
                    120: };
                    121: 
                    122: extern struct name_table_entry cap_table[];
                    123: extern struct name_table_entry *cap_hash_table[];
                    124: 
                    125: extern int     Captabsize;
                    126: extern int     Hashtabsize;
                    127: 
                    128: #define NOTFOUND       ((struct name_table_entry *) 0)
                    129:        /*
                    130:         *      Function types
                    131:         *
                    132:         */
                    133: 
                    134: struct name_table_entry        *find_entry();  /* look up entry in hash table */
                    135: 
                    136: char   next_char();
                    137: char   trans_string();

unix.superglobalmegacorp.com

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