Annotation of researchv9/cmd/emacs/emacs_cmds.h, revision 1.1.1.1

1.1       root        1: /* word and sentence stuff */
                      2: 
                      3: /* EMACS_MODES: c !fill */
                      4: 
                      5: #define WRDSEP 01                      /* separates words */
                      6: #define WRDCHR 02                      /* makes words */
                      7: #define WHITE 04                       /* white space */
                      8: #define SENTE 010                      /* ends sentences */
                      9: 
                     10: char bits[128] = {
                     11:        05,     01,     01,     01,     01,     01,     01,     01,
                     12:        01,     05,     05,     01,     01,     05,     01,     01,
                     13:        01,     01,     01,     01,     01,     01,     01,     01,
                     14:        01,     01,     01,     01,     01,     01,     01,     01,
                     15:        05,     011,    01,     01,     01,     01,     01,     03,
                     16:        01,     01,     01,     01,     01,     01,     011,    01,
                     17:        02,     02,     02,     02,     02,     02,     02,     02,
                     18:        02,     02,     011,    01,     01,     01,     01,     011,
                     19:        03,     02,     02,     02,     02,     02,     02,     02,
                     20:        02,     02,     02,     02,     02,     02,     02,     02,
                     21:        02,     02,     02,     02,     02,     02,     02,     02,
                     22:        02,     02,     02,     01,     01,     01,     01,     01,
                     23:        02,     02,     02,     02,     02,     02,     02,     02,
                     24:        02,     02,     02,     02,     02,     02,     02,     02,
                     25:        02,     02,     02,     02,     02,     02,     02,     02,
                     26:        02,     02,     02,     01,     01,     01,     01,     01,
                     27: };
                     28: 
                     29: char casem[128];
                     30: 
                     31: 
                     32: /* mark stuff */
                     33: 
                     34: #define MARK struct markst
                     35: 
                     36: struct markst {
                     37:        int markl;
                     38:        int markc;
                     39: };
                     40: 
                     41: #define NMARKS 16
                     42: struct markst marks[NMARKS];
                     43: 
                     44: /* command execution status */
                     45: 
                     46: int cstatus;                           /* status from command */
                     47: 
                     48: /* modes */
                     49: 
                     50: int FILLMD = 1;
                     51: int FILLCOL = 72;
                     52: int SAVEMD = 0;
                     53: int SAVECHAR = 256;
                     54: int NSCHAR = 0;
                     55: int NLINS = 0;
                     56: int NOCASE = 0;                                /* caseless search */
                     57: int CKMAIL = 100;                      /* check mail interval */
                     58: int NLRUN = 0;
                     59: int USILENT = 0;                       /* invisible unix commands */
                     60: int NOECHO = 0;                                /* don't echo unix commands */
                     61: int srch_nl = 0;                               /* Terminate search on newline */
                     62: 
                     63: /* C mode stuff */
                     64: 
                     65: int comcol = 40;
                     66: int comln = 0;
                     67: int TABMD = 0;
                     68: int BACKP = 0;
                     69: int AUTOLOAD = 1;
                     70: 
                     71: /* mode edit data */
                     72: 
                     73: struct mdata {
                     74:        char *modename;
                     75:        int *modeloc;
                     76:        char modetype;
                     77:        char moderset;
                     78: };
                     79: 
                     80: #define ONOFF 1
                     81: #define INT 2
                     82: 
                     83: /* parameters that describe what should be reset following mode display */
                     84: 
                     85: #define DISPLAY 1                      /* re-display */
                     86: #define DSIZE 2                                /* re-format display */
                     87: #define CSE 4                          /* re-compute case map */
                     88: #define CTYPE 8                                /* Need to recompute display types */
                     89: 
                     90: extern int BINMODE;
                     91: extern int LNOWID;
                     92: extern int LNOMOD;
                     93: extern int TABSTOP;
                     94: extern int NOBEL;
                     95: extern int keepg;
                     96: extern int kbapp;
                     97: extern int ttywarp;
                     98: extern int NOTABS;
                     99: extern int ctlify;
                    100: extern int CONCHAR;
                    101: extern int PMODE;
                    102: extern int FLOWMIN;
                    103: extern int EOFNL;
                    104: extern int ttcnt;
                    105: #ifdef PC
                    106: extern int NORMATB;
                    107: #endif
                    108: int savelink = 0;
                    109: int timemd = 0;
                    110: int VERBOSE = 1;
                    111: int OVERW = 0;
                    112: int READONLY = 0;
                    113: extern int bit8;
                    114: extern int hcol;
                    115: 
                    116: struct mdata mdata[] = {
                    117:        "save",&SAVEMD,ONOFF,0,
                    118:        "savetype",&SAVECHAR,INT,0,
                    119:        "fill",&FILLMD,ONOFF,0,
                    120:        "lnumb",&LNOMOD,ONOFF,DISPLAY,
                    121:        "c",&TABMD,ONOFF,0,
                    122:        "tabstop",&TABSTOP,INT,DISPLAY,
                    123:        "comcol",&comcol,INT,0,
                    124:        "fillcol",&FILLCOL,INT,0,
                    125:        "height",&SCRLINES,INT,DISPLAY+DSIZE,
                    126:        "width", &SCRWID,INT,DISPLAY+DSIZE,
                    127:        "backspace",&BACKP,ONOFF,DISPLAY|CTYPE,
                    128:        "time",&timemd,ONOFF,0,
                    129:        "verbose",&VERBOSE,ONOFF,0,
                    130:        "overwrite",&OVERW,ONOFF,0,
                    131:        "nobell", &NOBEL, ONOFF,0,
                    132:        "lnowid", &LNOWID, INT,DISPLAY,
                    133:        "keepscroll", &keepg, INT,DISPLAY,
                    134:        "rigid_newline", &NLINS, ONOFF, 0,
                    135:        "caseless", &NOCASE, ONOFF, CSE,
                    136:        "mailtype",&CKMAIL, INT, 0,
                    137:        "end_newline",&NLRUN, ONOFF, 0,
                    138: #ifdef PC
                    139:        "binary",&BINMODE, ONOFF, 0,
                    140:        "attrib",&NORMATB, INT, DISPLAY,
                    141: #else
                    142:        "tspeed",&ttywarp, INT, 0,
                    143: #endif PC      
                    144:        "usilent",&USILENT, ONOFF, 0,
                    145:        "noecho",&NOECHO, ONOFF, 0,
                    146:        "readonly",&READONLY, ONOFF, 0,
                    147:        "notabs",&NOTABS, ONOFF, DISPLAY|CTYPE,
                    148:        "controlify",&ctlify,ONOFF,0,
                    149:        "ctl_char",&CONCHAR, INT, 0,
                    150:        "display_percent",&PMODE,ONOFF,0,
                    151:        "picture",&PICMODE,ONOFF,DISPLAY,
                    152:        "nodelete",&NODEL,ONOFF,0,
                    153:        "flow_lim",&FLOWMIN,INT,0,
                    154:        "eofnl",&EOFNL,ONOFF,0,
                    155:        "savelink",&savelink,ONOFF,0,
                    156:        "search_newline",&srch_nl,ONOFF,0,
                    157:        "autoload",&AUTOLOAD,ONOFF,0,
                    158:        "7bit_ascii",&bit8,ONOFF,DISPLAY|CTYPE,
                    159:        "leftmargin",&hcol,INT,DISPLAY,
                    160: };
                    161: #define NMODES (sizeof(mdata) / sizeof(struct mdata))
                    162: 
                    163: 
                    164: 
                    165: #define NMAC 31                                /* Macro hash table size */
                    166: 
                    167: int machash[NMAC];
                    168: 
                    169: #define MACEXIT if (infrn>=0) return(0)
                    170: 
                    171: /* saved search and replace strings */
                    172: 
                    173: char presst[128];
                    174: char rstring[128];
                    175: 
                    176: /* function defns */
                    177: 
                    178: MARK *markptr();
                    179: extern int junked;
                    180: extern int numarg;
                    181: char *mstrcpy();
                    182: char *expenv();
                    183: char *getenv();
                    184: extern FILE *fdopen();
                    185: extern int loc2;
                    186: extern char *endput;
                    187: extern int macptr;
                    188: extern int fbkno;
                    189: extern char *inget();
                    190: extern char *nscan();
                    191: extern char *hmap();
                    192: extern int curbf;
                    193: extern int nln;
                    194: extern int ncol;
                    195: extern int wbase;
                    196: extern int etrace;
                    197: extern char ctype[];
                    198: extern int metal;

unix.superglobalmegacorp.com

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