Annotation of researchv10dc/ncurses/screen/maketerm.ex, revision 1.1.1.1

1.1       root        1: e caps
                      2: set noreadonly
                      3: g/^#/d
                      4: /--- begin bool/+,/--- end bool/-w bool
                      5: /--- begin num/+,/--- end num/-w num
                      6: /--- begin str/+,/--- end str/-w str
                      7: e! bool
                      8: 1,$s/" .*/", /
                      9: 1,$s/.*        "/"/
                     10: 1,10j
                     11: 2,$j
                     12: 1i
                     13: char *boolnames[] = {
                     14: .
                     15: $a
                     16: 0
                     17: };
                     18: .
                     19: w boolnames
                     20: e bool
                     21: 1,$s/^[^"]*"[^"]*".//
                     22: 1,$s/" .*/",/
                     23: 1,10j
                     24: 2,$j
                     25: 1i
                     26: char *boolcodes[] = {
                     27: .
                     28: $a
                     29: 0
                     30: };
                     31: .
                     32: w>> boolnames
                     33: e! bool
                     34: 1,$s;"[^"]*"[  ]*".."  ;/* ;
                     35: 1,$s;$; */;
                     36: 1,$s;^;        ;
                     37: 1i
                     38:     char
                     39: .
                     40: $a
                     41:        lastbool;
                     42: .
                     43: w boolvals
                     44: e num
                     45: 1,$s/" .*/", /
                     46: 1,$s/.*        "/"/
                     47: 1,$j
                     48: 1i
                     49: char *numnames[] = {
                     50: .
                     51: $a
                     52: 0
                     53: };
                     54: .
                     55: w numnames
                     56: e num
                     57: 1,$s/^[^"]*"[^"]*".//
                     58: 1,$s/" .*/",/
                     59: 1,$j
                     60: 1i
                     61: char *numcodes[] = {
                     62: .
                     63: $a
                     64: 0
                     65: };
                     66: .
                     67: w>> numnames
                     68: e! num
                     69: 1,$s;"[^"]*"[  ]*".."  ;/* ;
                     70: 1,$s;$; */;
                     71: 1,$s;^;        ;
                     72: 1i
                     73:     short
                     74: .
                     75: $a
                     76:        lastnum;
                     77: .
                     78: w numvals
                     79: e str
                     80: 1,$s/" .*/", /
                     81: 1,$s/.*        "/"/
                     82: 1,$-10g/^/.,+9j
                     83: +,$j
                     84: 1i
                     85: char *strnames[] = {
                     86: .
                     87: $a
                     88: 0
                     89: };
                     90: .
                     91: w strnames
                     92: e str
                     93: 1,$s/^[^"]*"[^"]*".//
                     94: 1,$s/" .*/",/
                     95: 1,$-10g/^/.,+9j
                     96: +,$j
                     97: 1i
                     98: char *strcodes[] = {
                     99: .
                    100: $a
                    101: 0
                    102: };
                    103: .
                    104: w>> strnames
                    105: e! str
                    106: 1,$s;"[^"]*"[  ]*".."  ;/* ;
                    107: 1,$s;$; */;
                    108: 1,$s;^;        strs.;
                    109: $a
                    110:        laststr;
                    111: .
                    112: w strvals
                    113: 1,$d
                    114: f capnames.c
                    115: r boolnames
                    116: r numnames
                    117: r strnames
                    118: w!
                    119: 1,$d
                    120: f term.h
                    121: a
                    122: typedef char *charptr;
                    123: struct strs {
                    124:     charptr
                    125: .
                    126: r strvals
                    127: 1,.s/strs\.//
                    128: $a
                    129: };
                    130: 
                    131: struct term {
                    132: .
                    133: r boolvals
                    134: r numvals
                    135: a
                    136: };
                    137: #ifndef NONSTANDARD
                    138: extern struct term *cur_term;
                    139: #endif
                    140: .
                    141: 1,$s/^ ./\U&/
                    142: 0r boolvals
                    143: .r numvals
                    144: .r strvals
                    145: .ka
                    146: 1,'av/^        /d
                    147: 1,'as/^        //
                    148: 1,.s/  [^      ].*/    /
                    149: 1,.s/,/ /
                    150: 1,.s/.*/#define &      CUR \u&/
                    151: 1,.s/strs\.//
                    152: 1,.s/Strs.\(.\)/strs.\u\1/
                    153: 1,+g/;/d
                    154: a
                    155: 
                    156: .
                    157: $;?^}?;.i
                    158:        struct strs strs;
                    159:        struct strs2 strs2;
                    160:        short Filedes;          /* file descriptor being written to */
                    161: #ifndef NONSTANDARD
                    162:        SGTTY Ottyb,            /* original state of the terminal */
                    163:              Nttyb;            /* current state of the terminal */
                    164: #endif
                    165: .
                    166: " clean up unused fields
                    167: 1,$s/[         ]*$//
                    168: /Laststr/-s/,/;/
                    169: /Laststr/d
                    170: /Lastbool/-s/,/;/
                    171: /Lastbool/d
                    172: /Lastnum/-s/,/;/
                    173: /Lastnum/d
                    174: " split strings into two groups < 100 to fit in ritchie compiler
                    175: 1;/CUR strs/+100;.,$s/CUR strs/CUR strs2/
                    176: /^struct strs/+101s/,/;/
                    177: a
                    178: };
                    179: struct strs2 {
                    180:     charptr
                    181: .
                    182: 1i
                    183: /*
                    184:  * term.h - this file is automatically made from caps and maketerm.ex.
                    185:  *
                    186:  * Guard against multiple includes.
                    187:  */
                    188: 
                    189: #ifndef auto_left_margin
                    190: 
                    191: .
                    192: $a
                    193: 
                    194: #endif auto_left_margin
                    195:  
                    196: #ifdef SINGLE
                    197: extern struct term _first_term;
                    198: # define CUR   _first_term.
                    199: #else
                    200: # define CUR   cur_term->
                    201: #endif
                    202: .
                    203: w!
                    204: q

unix.superglobalmegacorp.com

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