Annotation of coherent/d/usr/bin/emacs/comtab.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Emacs command tables.
        !             3:  * Generated by ext.c
        !             4:  * Make any changes by changing ext.c
        !             5:  */
        !             6: 
        !             7: #include "stdio.h"
        !             8: #include "ed.h"
        !             9: 
        !            10: extern            ctrlg();     /* Abort out of things          */
        !            11: extern             quit();     /* Quit                         */
        !            12: extern           ctlxlp();     /* Begin macro                  */
        !            13: extern           ctlxrp();     /* End macro                    */
        !            14: extern            ctlxe();     /* Execute macro                */
        !            15: extern         fileread();     /* Get a file, read only        */
        !            16: extern        filevisit();     /* Get a file, read write       */
        !            17:                                /* Also F2 */
        !            18: extern        filewrite();     /* Write a file                 */
        !            19:                                /* Also F2 */
        !            20: extern         filesave();     /* Save current file            */
        !            21: extern         filename();     /* Adjust file name             */
        !            22: extern          gotobol();     /* Move to start of line        */
        !            23:                                /* Also HOME KEY */
        !            24: extern         forwchar();     /* Move forward by characters   */
        !            25:                                /* Also RIGHT ARROW */
        !            26: extern          gotoeol();     /* Move to end of line          */
        !            27:                                /* Also END KEY */
        !            28: extern         backchar();     /* Move backward by characters  */
        !            29:                                /* Also LEFT ARROW */
        !            30: extern         forwline();     /* Move forward by lines        */
        !            31:                                /* Also DOWN ARROW */
        !            32: extern         backline();     /* Move backward by lines       */
        !            33:                                /* Also UP ARROW */
        !            34: extern         forwpage();     /* Move forward by pages        */
        !            35:                                /* Also PAGE DOWN */
        !            36: extern         backpage();     /* Move backward by pages       */
        !            37:                                /* Also PAGE UP */
        !            38: extern          gotobob();     /* Move to start of buffer      */
        !            39: extern          gotoeob();     /* Move to end of buffer        */
        !            40: extern       setfillcol();     /* Set fill column to current col */
        !            41:                                /* ctl-u n set fill col to n    */
        !            42:                                /* ctl-u 0 turn off word wrap   */
        !            43: extern       fillregion();     /* apply fillcol to a region*/
        !            44: extern          setmark();     /* Set mark                     */
        !            45: extern         swapmark();     /* Swap '.' and mark            */
        !            46: extern       forwsearch();     /* Search forward               */
        !            47:                                /* Also F3 */
        !            48:                                /* ALT F3 is continue search */
        !            49: extern      forwisearch();     /* forward incremental search   */
        !            50: extern      backisearch();     /* backward incremental search  */
        !            51: extern        queryrepl();     /* query/replace                */
        !            52:                                /* Also F5 */
        !            53: extern      searchagain();     /* find next occurrance         */
        !            54: extern       backsearch();     /* Search backwards             */
        !            55:                                /* Also F4 */
        !            56: extern         showcpos();     /* Show the cursor position     */
        !            57: extern         nextwind();     /* Move to the next window      */
        !            58:                                /* Also F6 */
        !            59: extern         prevwind();     /* Move to the previous window  */
        !            60: extern         onlywind();     /* Make current window only one */
        !            61:                                /* Also F10 */
        !            62: extern        splitwind();     /* Split current window         */
        !            63:                                /* Also ALT F1 */
        !            64: extern         mvdnwind();     /* Move window down             */
        !            65: extern         mvupwind();     /* Move window up               */
        !            66: extern      enlargewind();     /* Enlarge display window.      */
        !            67: extern       shrinkwind();     /* Shrink window.               */
        !            68: extern      listbuffers();     /* Display list of buffers      */
        !            69: extern        usebuffer();     /* Switch a window to a buffer  */
        !            70: extern       killbuffer();     /* Make a buffer go away.       */
        !            71: extern       reposition();     /* Reposition dot to line ctl-u */
        !            72:                                /* if ctl-u 0 center            */
        !            73:                                /* if ctl-u < 0 repos from bottom */
        !            74: extern          refresh();     /* Refresh the screen           */
        !            75:                                /* with ctl-u recenter          */
        !            76: extern          twiddle();     /* Twiddle characters           */
        !            77: extern              tab();     /* Insert tab                   */
        !            78:                                /* ctl-u n  use n spaces per tab        */
        !            79:                                /* ctl-u -n tab is n spaces     */
        !            80: extern          newline();     /* Insert CR-LF                 */
        !            81:                                /* Same as ctl-j in autoindent mode */
        !            82: extern           indent();     /* Insert CR-LF, then indent    */
        !            83: extern         openline();     /* Open up a blank line         */
        !            84: extern          deblank();     /* Delete blank lines           */
        !            85: extern            quote();     /* Insert literal               */
        !            86: extern         quoteval();     /* Insert decimal literal        */
        !            87: extern         backword();     /* Backup by words              */
        !            88: extern         forwword();     /* Advance by words             */
        !            89: extern          forwdel();     /* Forward delete               */
        !            90:                                /* Also DELETE KEY */
        !            91: extern          backdel();     /* Backward delete              */
        !            92: extern             kill();     /* Kill forward from dot                */
        !            93:                                /* if ctl-u 0 or less backward  */
        !            94: extern             yank();     /* Yank back from killbuffer.   */
        !            95: extern        loadBinds();     /* Load flexable bindings from file. */
        !            96: extern          nameMac();     /* Bind current macro to binding. */
        !            97: extern          initMac();     /* Bind current macro to initial macro */
        !            98: extern        setPrefix();     /* Set prefix codes             */
        !            99: extern          bindFun();     /* Bind function to old function. */
        !           100: extern        storBinds();     /* Store flexable bindings on a file. */
        !           101: extern        upperword();     /* Upper case word.             */
        !           102: extern        lowerword();     /* Lower case word.             */
        !           103: extern      upperregion();     /* Upper case region.           */
        !           104: extern      lowerregion();     /* Lower case region.           */
        !           105: extern          capword();     /* Initial capitalize word.     */
        !           106: extern         delfword();     /* Delete forward word.         */
        !           107: extern         delbword();     /* Delete backward word.        */
        !           108: extern       killregion();     /* Kill region.                 */
        !           109: extern       copyregion();     /* Copy region to kill buffer.  */
        !           110: extern         spawncli();     /* Run CLI in a subjob.         */
        !           111: extern            spawn();     /* Run a command in a subjob.   */
        !           112: extern        quickexit();     /* low keystroke style exit.    */
        !           113: extern         gotoline();     /* goto line given as arg       */
        !           114: extern        gotofline();     /* goto line in file.           */
        !           115: extern          setfold();     /* set case-fold on search flag */
        !           116: extern          autoind();     /* toggle autoindent flag       */
        !           117:                                /* Also ALT F10 */
        !           118: extern          nexterr();     /* Seek the next error          */
        !           119: extern          preverr();     /* Seek the previous error      */
        !           120: extern    bracketsearch();     /* seek matching bracket char   */
        !           121: extern        bracketsw();     /* toggle bracket mode          */
        !           122: extern       lookupword();     /* Lookup a word...             */
        !           123:                                /* Also F1 */
        !           124: extern       promptlook();     /* Prompt for a word to look up */
        !           125: extern          zaphelp();     /* Zap help window              */
        !           126: extern         hlpindex();     /* Help index generator         */
        !           127: extern          zapwind();     /* Zap current window           */
        !           128: 
        !           129: FUNTAB funtab[] = {
        !           130:            ctrlg,      /* 0 */
        !           131:             quit,      /* 1 */
        !           132:           ctlxlp,      /* 2 */
        !           133:           ctlxrp,      /* 3 */
        !           134:            ctlxe,      /* 4 */
        !           135:         fileread,      /* 5 */
        !           136:        filevisit,      /* 6 */
        !           137:        filewrite,      /* 7 */
        !           138:         filesave,      /* 8 */
        !           139:         filename,      /* 9 */
        !           140:          gotobol,      /* 10 */
        !           141:         forwchar,      /* 11 */
        !           142:          gotoeol,      /* 12 */
        !           143:         backchar,      /* 13 */
        !           144:         forwline,      /* 14 */
        !           145:         backline,      /* 15 */
        !           146:         forwpage,      /* 16 */
        !           147:         backpage,      /* 17 */
        !           148:          gotobob,      /* 18 */
        !           149:          gotoeob,      /* 19 */
        !           150:       setfillcol,      /* 20 */
        !           151:       fillregion,      /* 21 */
        !           152:          setmark,      /* 22 */
        !           153:         swapmark,      /* 23 */
        !           154:       forwsearch,      /* 24 */
        !           155:      forwisearch,      /* 25 */
        !           156:      backisearch,      /* 26 */
        !           157:        queryrepl,      /* 27 */
        !           158:      searchagain,      /* 28 */
        !           159:       backsearch,      /* 29 */
        !           160:         showcpos,      /* 30 */
        !           161:         nextwind,      /* 31 */
        !           162:         prevwind,      /* 32 */
        !           163:         onlywind,      /* 33 */
        !           164:        splitwind,      /* 34 */
        !           165:         mvdnwind,      /* 35 */
        !           166:         mvupwind,      /* 36 */
        !           167:      enlargewind,      /* 37 */
        !           168:       shrinkwind,      /* 38 */
        !           169:      listbuffers,      /* 39 */
        !           170:        usebuffer,      /* 40 */
        !           171:       killbuffer,      /* 41 */
        !           172:       reposition,      /* 42 */
        !           173:          refresh,      /* 43 */
        !           174:          twiddle,      /* 44 */
        !           175:              tab,      /* 45 */
        !           176:          newline,      /* 46 */
        !           177:           indent,      /* 47 */
        !           178:         openline,      /* 48 */
        !           179:          deblank,      /* 49 */
        !           180:            quote,      /* 50 */
        !           181:         quoteval,      /* 51 */
        !           182:         backword,      /* 52 */
        !           183:         forwword,      /* 53 */
        !           184:          forwdel,      /* 54 */
        !           185:          backdel,      /* 55 */
        !           186:             kill,      /* 56 */
        !           187:             yank,      /* 57 */
        !           188:        loadBinds,      /* 58 */
        !           189:          nameMac,      /* 59 */
        !           190:          initMac,      /* 60 */
        !           191:        setPrefix,      /* 61 */
        !           192:          bindFun,      /* 62 */
        !           193:        storBinds,      /* 63 */
        !           194:        upperword,      /* 64 */
        !           195:        lowerword,      /* 65 */
        !           196:      upperregion,      /* 66 */
        !           197:      lowerregion,      /* 67 */
        !           198:          capword,      /* 68 */
        !           199:         delfword,      /* 69 */
        !           200:         delbword,      /* 70 */
        !           201:       killregion,      /* 71 */
        !           202:       copyregion,      /* 72 */
        !           203:         spawncli,      /* 73 */
        !           204:            spawn,      /* 74 */
        !           205:        quickexit,      /* 75 */
        !           206:         gotoline,      /* 76 */
        !           207:        gotofline,      /* 77 */
        !           208:          setfold,      /* 78 */
        !           209:          autoind,      /* 79 */
        !           210:          nexterr,      /* 80 */
        !           211:          preverr,      /* 81 */
        !           212:    bracketsearch,      /* 82 */
        !           213:        bracketsw,      /* 83 */
        !           214:       lookupword,      /* 84 */
        !           215:       promptlook,      /* 85 */
        !           216:          zaphelp,      /* 86 */
        !           217:         hlpindex,      /* 87 */
        !           218:          zapwind,      /* 88 */
        !           219: };
        !           220: KEYTAB keytab[] = {
        !           221: {        CTRL|'H',  55,  65 }, /* backdel          0 */
        !           222: {        CTRL|'I',  45,  78 }, /* tab              1 */
        !           223: {        CTRL|'J',  47,  79 }, /* indent           2 */
        !           224: {        CTRL|'K',  56,  44 }, /* kill             3 */
        !           225: {        CTRL|'L',  43,  80 }, /* refresh          4 */
        !           226: {        CTRL|'M',  46,  46 }, /* newline          5 */
        !           227: {        CTRL|'N',  14,  45 }, /* forwline         6 */
        !           228: {        CTRL|'O',  48,  47 }, /* openline         7 */
        !           229: {        CTRL|'P',  15,  58 }, /* backline         8 */
        !           230: {        CTRL|'Q',  50,  48 }, /* quote            9 */
        !           231: {        CTRL|'R',  26,  49 }, /* backisearch      10 */
        !           232: {        CTRL|'S',  25,  -1 }, /* forwisearch      11 */
        !           233: {        CTRL|'T',  44,  50 }, /* twiddle          12 */
        !           234: {   PFX1|CTRL|'V',   6,  -1 }, /* filevisit        13 */
        !           235: {        CTRL|'V',  16,  51 }, /* forwpage         14 */
        !           236: {        CTRL|'W',  71,  52 }, /* killregion       15 */
        !           237: {        META|'%',  27,  -1 }, /* queryrepl        16 */
        !           238: {        CTRL|'Y',  57,  53 }, /* yank             17 */
        !           239: {        CTRL|'Z',  75,  54 }, /* quickexit        18 */
        !           240: {        PFX1|'=',  30,  87 }, /* showcpos         19 */
        !           241: {        PFX1|'>',  80,  70 }, /* nexterr          20 */
        !           242: {        PFX1|'?',  85,  89 }, /* promptlook       21 */
        !           243: {      -1, 0, -1},     /* hole in table */
        !           244: {        META|'U',  64,  -1 }, /* upperword        23 */
        !           245: {        PFX1|'B',  40,  90 }, /* usebuffer        24 */
        !           246: {        META|'.',  22,  91 }, /* setmark          25 */
        !           247: {        META|'/',  28,  -1 }, /* searchagain      26 */
        !           248: {        PFX1|'E',   4,  -1 }, /* ctlxe            27 */
        !           249: {        PFX1|'F',  20,  74 }, /* setfillcol       28 */
        !           250: {        PFX1|'G',  76,  75 }, /* gotoline         29 */
        !           251: {        PFX1|'H',  21,  71 }, /* fillregion       30 */
        !           252: {        PFX1|'I',  60,  -1 }, /* initMac          31 */
        !           253: {        PFX1|'!',  74,  -1 }, /* spawn            32 */
        !           254: {        CTRL|'@',  22,  59 }, /* setmark          33 */
        !           255: {        CTRL|'A',  10,  41 }, /* gotobol          34 */
        !           256: {        CTRL|'B',  13,  42 }, /* backchar         35 */
        !           257: {        CTRL|'C',  73,  62 }, /* spawncli         36 */
        !           258: {        CTRL|'D',  54,  -1 }, /* forwdel          37 */
        !           259: {        CTRL|'E',  12,  43 }, /* gotoeol          38 */
        !           260: {        CTRL|'F',  11,  55 }, /* forwchar         39 */
        !           261: {        CTRL|'G',   0,  56 }, /* ctrlg            40 */
        !           262: {   PFX1|CTRL|'B',  39,  60 }, /* listbuffers      41 */
        !           263: {   PFX1|CTRL|'C',   1,  61 }, /* quit             42 */
        !           264: {   PFX1|CTRL|'F',   9,  63 }, /* filename         43 */
        !           265: {   PFX1|CTRL|'L',  67,  -1 }, /* lowerregion      44 */
        !           266: {   PFX1|CTRL|'O',  49,  82 }, /* deblank          45 */
        !           267: {   PFX1|CTRL|'N',  35,  66 }, /* mvdnwind         46 */
        !           268: {   PFX1|CTRL|'P',  36,  57 }, /* mvupwind         47 */
        !           269: {   PFX1|CTRL|'R',   5,  84 }, /* fileread         48 */
        !           270: {   PFX1|CTRL|'S',   8,  69 }, /* filesave         49 */
        !           271: {   PFX1|CTRL|'U',  66,  73 }, /* upperregion      50 */
        !           272: {   PFX1|CTRL|'W',   7,  86 }, /* filewrite        51 */
        !           273: {   PFX1|CTRL|'X',  23,  -1 }, /* swapmark         52 */
        !           274: {   PFX1|CTRL|'Z',  38,  -1 }, /* shrinkwind       53 */
        !           275: {        PFX1|'<',  81,  -1 }, /* preverr          54 */
        !           276: {        PFX1|'(',   2,  77 }, /* ctlxlp           55 */
        !           277: {        PFX1|')',   3,  64 }, /* ctlxrp           56 */
        !           278: {        PFX1|'1',  33,  67 }, /* onlywind         57 */
        !           279: {        PFX1|'2',  34,  68 }, /* splitwind        58 */
        !           280: {        PFX1|'K',  41,  -1 }, /* killbuffer       59 */
        !           281: {        PFX1|'L',  58,  -1 }, /* loadBinds        60 */
        !           282: {        PFX1|'M',  59,  -1 }, /* nameMac          61 */
        !           283: {        PFX1|'N',  31,  -1 }, /* nextwind         62 */
        !           284: {        PFX1|'P',  32,  -1 }, /* prevwind         63 */
        !           285: {        PFX1|'R',  62,  -1 }, /* bindFun          64 */
        !           286: {        PFX1|'S',  63,  72 }, /* storBinds        65 */
        !           287: {        PFX1|'X',  61,  81 }, /* setPrefix        66 */
        !           288: {        PFX1|'Z',  37,  -1 }, /* enlargewind      67 */
        !           289: {        PFX1|'[',  82,  83 }, /* bracketsearch    68 */
        !           290: {        PFX1|']',  83,  -1 }, /* bracketsw        69 */
        !           291: {   META|CTRL|'H',  70,  88 }, /* delbword         70 */
        !           292: {   META|CTRL|'R',  27,  -1 }, /* queryrepl        71 */
        !           293: {   META|CTRL|']',  87,  76 }, /* hlpindex         72 */
        !           294: {        META|'!',  42,  85 }, /* reposition       73 */
        !           295: {        META|'1',  88,  -1 }, /* zapwind          74 */
        !           296: {        META|'2',  86,  -1 }, /* zaphelp          75 */
        !           297: {        META|'>',  19,  -1 }, /* gotoeob          76 */
        !           298: {        META|'<',  18,  -1 }, /* gotobob          77 */
        !           299: {        META|'?',  84,  -1 }, /* lookupword       78 */
        !           300: {        META|'@',  78,  -1 }, /* setfold          79 */
        !           301: {        META|'B',  52,  93 }, /* backword         80 */
        !           302: {        META|'C',  68,  -1 }, /* capword          81 */
        !           303: {        META|'D',  69,  -1 }, /* delfword         82 */
        !           304: {        META|'F',  53,  -1 }, /* forwword         83 */
        !           305: {        META|'G',  77,  -1 }, /* gotofline        84 */
        !           306: {        META|'J',  79,  -1 }, /* autoind          85 */
        !           307: {        META|'L',  65,  -1 }, /* lowerword        86 */
        !           308: {        META|'Q',  51,  -1 }, /* quoteval         87 */
        !           309: {        META|'R',  29,  -1 }, /* backsearch       88 */
        !           310: {        META|'S',  24,  -1 }, /* forwsearch       89 */
        !           311: {        META|'V',  17,  92 }, /* backpage         90 */
        !           312: {        META|'W',  72,  -1 }, /* copyregion       91 */
        !           313: {       META|0x7F,  70,  -1 }, /* delbword         92 */
        !           314: {            0x7F,  55,  -1 }, /* backdel          93 */
        !           315: };

unix.superglobalmegacorp.com

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