Annotation of 42BSD/etc/config/config.h, revision 1.1.1.1

1.1       root        1: /*     config.h        1.13    83/06/16        */
                      2: 
                      3: /*
                      4:  * Config.
                      5:  */
                      6: #include <sys/types.h>
                      7: 
                      8: #define        NODEV   ((dev_t)-1)
                      9: 
                     10: struct file_list {
                     11:        struct  file_list *f_next;      
                     12:        char    *f_fn;                  /* the name */
                     13:        u_char  f_type;                 /* see below */
                     14:        u_char  f_flags;                /* see below */
                     15:        short   f_special;              /* requires special make rule */
                     16:        char    *f_needs;
                     17:        /*
                     18:         * Random values:
                     19:         *      swap space parameters for swap areas
                     20:         *      root device, etc. for system specifications
                     21:         */
                     22:        union {
                     23:                struct {                /* when swap specification */
                     24:                        dev_t   fuw_swapdev;
                     25:                        int     fuw_swapsize;
                     26:                } fuw;
                     27:                struct {                /* when system specification */
                     28:                        dev_t   fus_rootdev;
                     29:                        dev_t   fus_argdev;
                     30:                        dev_t   fus_dumpdev;
                     31:                } fus;
                     32:        } fun;
                     33: #define        f_swapdev       fun.fuw.fuw_swapdev
                     34: #define        f_swapsize      fun.fuw.fuw_swapsize
                     35: #define        f_rootdev       fun.fus.fus_rootdev
                     36: #define        f_argdev        fun.fus.fus_argdev
                     37: #define        f_dumpdev       fun.fus.fus_dumpdev
                     38: };
                     39: 
                     40: /*
                     41:  * Types.
                     42:  */
                     43: #define DRIVER         1
                     44: #define NORMAL         2
                     45: #define        INVISIBLE       3
                     46: #define        PROFILING       4
                     47: #define        SYSTEMSPEC      5
                     48: #define        SWAPSPEC        6
                     49: 
                     50: /*
                     51:  * Attributes (flags).
                     52:  */
                     53: #define        CONFIGDEP       1
                     54: 
                     55: struct idlst {
                     56:        char    *id;
                     57:        struct  idlst *id_next;
                     58: };
                     59: 
                     60: struct device {
                     61:        int     d_type;                 /* CONTROLLER, DEVICE, UBA or MBA */
                     62:        struct  device *d_conn;         /* what it is connected to */
                     63:        char    *d_name;                /* name of device (e.g. rk11) */
                     64:        struct  idlst *d_vec;           /* interrupt vectors */
                     65:        int     d_pri;                  /* interrupt priority */
                     66:        int     d_addr;                 /* address of csr */
                     67:        int     d_unit;                 /* unit number */
                     68:        int     d_drive;                /* drive number */
                     69:        int     d_slave;                /* slave number */
                     70: #define QUES   -1      /* -1 means '?' */
                     71: #define        UNKNOWN -2      /* -2 means not set yet */
                     72:        int     d_dk;                   /* if init 1 set to number for iostat */
                     73:        int     d_flags;                /* nlags for device init */
                     74:        struct  device *d_next;         /* Next one in list */
                     75: };
                     76: #define TO_NEXUS       (struct device *)-1
                     77: 
                     78: struct config {
                     79:        char    *c_dev;
                     80:        char    *s_sysname;
                     81: };
                     82: 
                     83: /*
                     84:  * Config has a global notion of which machine type is
                     85:  * being used.  It uses the name of the machine in choosing
                     86:  * files and directories.  Thus if the name of the machine is ``vax'',
                     87:  * it will build from ``makefile.vax'' and use ``../vax/asm.sed''
                     88:  * in the makerules, etc.
                     89:  */
                     90: int    machine;
                     91: char   *machinename;
                     92: #define        MACHINE_VAX     1
                     93: #define        MACHINE_SUN     2
                     94: 
                     95: /*
                     96:  * For each machine, a set of CPU's may be specified as supported.
                     97:  * These and the options (below) are put in the C flags in the makefile.
                     98:  */
                     99: struct cputype {
                    100:        char    *cpu_name;
                    101:        struct  cputype *cpu_next;
                    102: } *cputype;
                    103: 
                    104: /*
                    105:  * A set of options may also be specified which are like CPU types,
                    106:  * but which may also specify values for the options.
                    107:  */
                    108: struct opt {
                    109:        char    *op_name;
                    110:        char    *op_value;
                    111:        struct  opt *op_next;
                    112: } *opt;
                    113: 
                    114: char   *ident;
                    115: char   *ns();
                    116: char   *tc();
                    117: char   *qu();
                    118: char   *get_word();
                    119: char   *path();
                    120: char   *raise();
                    121: 
                    122: int    do_trace;
                    123: 
                    124: char   *index();
                    125: char   *rindex();
                    126: char   *malloc();
                    127: char   *strcpy();
                    128: char   *strcat();
                    129: char   *sprintf();
                    130: 
                    131: #if MACHINE_VAX
                    132: int    seen_mba, seen_uba;
                    133: #endif
                    134: 
                    135: struct device *connect();
                    136: struct device *dtab;
                    137: dev_t  nametodev();
                    138: char   *devtoname();
                    139: 
                    140: char   errbuf[80];
                    141: int    yyline;
                    142: 
                    143: struct file_list *ftab, *conf_list, **confp;
                    144: char   *PREFIX;
                    145: 
                    146: int    timezone, hadtz;
                    147: int    dst;
                    148: int    profiling;
                    149: 
                    150: int    maxusers;
                    151: 
                    152: #define eq(a,b)        (!strcmp(a,b))

unix.superglobalmegacorp.com

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