home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / code / microema.sit / src / efunc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-06-09  |  14.1 KB  |  456 lines  |  [TEXT/Earl]

  1. /*    EFUNC.H:    MicroEMACS function declarations and names
  2.  
  3.         This file list all the C code functions used by MicroEMACS
  4.     and the names to use to bind keys to them. To add functions,
  5.     declare it here in both the extern function list and the name
  6.     binding table.
  7.  
  8. */
  9.  
  10. /*    External function declarations        */
  11.  
  12. extern    int    ctrlg();        /* Abort out of things        */
  13. extern    int    quit();         /* Quit             */
  14. extern    int    ctlxlp();        /* Begin macro            */
  15. extern    int    ctlxrp();        /* End macro            */
  16. extern    int    ctlxe();        /* Execute macro        */
  17. extern    int    fileread();        /* Get a file, read only    */
  18. extern    int    filefind();        /* Get a file, read write    */
  19. extern    int    filewrite();        /* Write a file         */
  20. extern    int    filesave();        /* Save current file        */
  21. extern    int    filename();        /* Adjust file name        */
  22. extern    int    getccol();        /* Get current column        */
  23. extern    int    gotobol();        /* Move to start of line    */
  24. extern    int    forwchar();        /* Move forward by characters    */
  25. extern    int    gotoeol();        /* Move to end of line        */
  26. extern    int    backchar();        /* Move backward by characters    */
  27. extern    int    forwline();        /* Move forward by lines    */
  28. extern    int    backline();        /* Move backward by lines    */
  29. extern    int    forwpage();        /* Move forward by pages    */
  30. extern    int    backpage();        /* Move backward by pages    */
  31. extern    int    gotobob();        /* Move to start of buffer    */
  32. extern    int    gotoeob();        /* Move to end of buffer    */
  33. extern    int    setfillcol();        /* Set fill column.        */
  34. extern    int    setmark();        /* Set mark            */
  35. extern    int    swapmark();        /* Swap "." and mark        */
  36. extern    int    forwsearch();        /* Search forward        */
  37. extern    int    backsearch();        /* Search backwards        */
  38. extern    int    sreplace();        /* search and replace        */
  39. extern    int    qreplace();        /* search and replace w/query    */
  40. extern    int    showcpos();        /* Show the cursor position    */
  41. extern    int    nextwind();        /* Move to the next window    */
  42. extern    int    prevwind();        /* Move to the previous window    */
  43. extern    int    onlywind();        /* Make current window only one */
  44. extern    int    splitwind();        /* Split current window     */
  45. extern    int    mvdnwind();        /* Move window down        */
  46. extern    int    mvupwind();        /* Move window up        */
  47. extern    int    enlargewind();        /* Enlarge display window.    */
  48. extern    int    shrinkwind();        /* Shrink window.        */
  49. extern    int    listbuffers();        /* Display list of buffers    */
  50. extern    int    usebuffer();        /* Switch a window to a buffer    */
  51. extern    int    killbuffer();        /* Make a buffer go away.    */
  52. extern    int    reposition();        /* Reposition window        */
  53. extern    int    refresh();        /* Refresh the screen        */
  54. extern    int    twiddle();        /* Twiddle characters        */
  55. extern    int    tab();            /* Insert tab            */
  56. extern    int    newline();        /* Insert CR-LF         */
  57. extern    int    indent();        /* Insert CR-LF, then indent    */
  58. extern    int    openline();        /* Open up a blank line     */
  59. extern    int    deblank();        /* Delete blank lines        */
  60. extern    int    quote();        /* Insert literal        */
  61. extern    int    backword();        /* Backup by words        */
  62. extern    int    forwword();        /* Advance by words        */
  63. extern    int    forwdel();        /* Forward delete        */
  64. extern    int    backdel();        /* Backward delete        */
  65. extern    int    killtext();        /* Kill forward         */
  66. extern    int    yank();         /* Yank back from killbuffer.    */
  67. extern    int    upperword();        /* Upper case word.        */
  68. extern    int    lowerword();        /* Lower case word.        */
  69. extern    int    upperregion();        /* Upper case region.        */
  70. extern    int    lowerregion();        /* Lower case region.        */
  71. extern    int    capword();        /* Initial capitalize word.    */
  72. extern    int    delfword();        /* Delete forward word.     */
  73. extern    int    delbword();        /* Delete backward word.    */
  74. extern    int    killregion();        /* Kill region.         */
  75. extern    int    copyregion();        /* Copy region to kill buffer.    */
  76. #if !MAC
  77. extern    int    spawncli();        /* Run CLI in a subjob.     */
  78. extern    int    spawn();        /* Run a command in a subjob.    */
  79. #endif
  80. #if    BSD
  81. extern    int    bktoshell();        /* suspend emacs to parent shell*/
  82. extern    int    rtfrmshell();        /* return from a suspended state*/
  83. #endif
  84. extern    int    quickexit();        /* low keystroke style exit.    */
  85. extern    int    setmode();        /* set an editor mode        */
  86. extern    int    delmode();        /* delete a mode        */
  87. extern    int    gotoline();        /* go to a numbered line    */
  88. extern    int    namebuffer();        /* rename the current buffer    */
  89. #if    WORDPRO
  90. extern    int    gotobop();        /* go to beginning/paragraph    */
  91. extern    int    gotoeop();        /* go to end/paragraph        */
  92. extern    int    fillpara();        /* fill current paragraph    */
  93. #endif
  94. extern    int    help();         /* get the help file here    */
  95. extern    int    deskey();        /* describe a key's binding     */
  96. extern    int    viewfile();        /* find a file in view mode    */
  97. extern    int    insfile();        /* insert a file        */
  98. extern    int    scrnextup();        /* scroll next window back    */
  99. extern    int    scrnextdw();        /* scroll next window down    */
  100. extern    int    bindtokey();        /* bind a function to a key    */
  101. extern    int    unbindkey();        /* unbind a key's function      */
  102. extern    int    namedcmd();        /* execute named command    */
  103. extern    int    desbind();        /* describe bindings        */
  104. extern    int    execcmd();        /* execute a command line    */
  105. extern    int    execbuf();        /* exec commands from a buffer    */
  106. extern    int    execfile();        /* exec commands from a file    */
  107. extern    int    nextbuffer();        /* switch to the next buffer    */
  108. #if    WORDPRO
  109. extern    int    killpara();        /* kill the current paragraph    */
  110. #endif
  111. extern    int    setgmode();        /* set a global mode        */
  112. extern    int    delgmode();        /* delete a global mode     */
  113. extern    int    insspace();        /* insert a space forword    */
  114. extern    int    forwhunt();        /* hunt forward for next match    */
  115. extern    int    backhunt();        /* hunt backwards for next match*/
  116. #if !MAC
  117. extern    int    pipecmd();        /* pipe command into buffer    */
  118. extern    int    filter();        /* filter buffer through dos    */
  119. #endif
  120. extern    int    delwind();        /* delete the current window    */
  121. extern    int    cbuf1();        /* execute numbered comd buffer */
  122. extern    int    cbuf2();
  123. extern    int    cbuf3();
  124. extern    int    cbuf4();
  125. extern    int    cbuf5();
  126. extern    int    cbuf6();
  127. extern    int    cbuf7();
  128. extern    int    cbuf8();
  129. extern    int    cbuf9();
  130. extern    int    cbuf10();
  131. extern    int    cbuf11();
  132. extern    int    cbuf12();
  133. extern    int    cbuf13();
  134. extern    int    cbuf14();
  135. extern    int    cbuf15();
  136. extern    int    cbuf16();
  137. extern    int    cbuf17();
  138. extern    int    cbuf18();
  139. extern    int    cbuf19();
  140. extern    int    cbuf20();
  141. extern    int    cbuf21();
  142. extern    int    cbuf22();
  143. extern    int    cbuf23();
  144. extern    int    cbuf24();
  145. extern    int    cbuf25();
  146. extern    int    cbuf26();
  147. extern    int    cbuf27();
  148. extern    int    cbuf28();
  149. extern    int    cbuf29();
  150. extern    int    cbuf30();
  151. extern    int    cbuf31();
  152. extern    int    cbuf32();
  153. extern    int    cbuf33();
  154. extern    int    cbuf34();
  155. extern    int    cbuf35();
  156. extern    int    cbuf36();
  157. extern    int    cbuf37();
  158. extern    int    cbuf38();
  159. extern    int    cbuf39();
  160. extern    int    cbuf40();
  161. extern    int    storemac();        /* store text for macro     */
  162. extern    int    resize();        /* resize current window    */
  163. extern    int    clrmes();        /* clear the message line    */
  164. extern    int    meta();         /* meta prefix dummy function    */
  165. extern    int    cex();            /* ^X prefix dummy function    */
  166. extern    int    unarg();        /* ^U repeat arg dummy function */
  167. extern    int    istring();        /* insert string in text    */
  168. extern    int    unmark();        /* unmark current buffer    */
  169. #if    ISRCH
  170. extern    int    fisearch();        /* forward incremental search    */
  171. extern    int    risearch();        /* reverse incremental search    */
  172. #endif
  173. #if    WORDPRO
  174. extern    int    wordcount();        /* count words in region    */
  175. #endif
  176. extern    int    savewnd();        /* save current window        */
  177. extern    int    restwnd();        /* restore current window    */
  178. extern    int    upscreen();        /* force screen update        */
  179. extern    int    writemsg();        /* write text on message line    */
  180. #if    FLABEL
  181. extern    int    fnclabel();        /* set function key label    */
  182. #endif
  183. #if    APROP
  184. extern    int    apro();         /* apropos fuction        */
  185. #endif
  186. #if    CRYPT
  187. extern    int    setkey();        /* set encryption key        */
  188. #endif
  189. extern    int    wrapword();        /* wordwrap function        */
  190. #if    CFENCE
  191. extern    int    getfence();        /* move cursor to a matching fence */
  192. #endif
  193. extern    int    newsize();        /* change the current screen size */
  194. extern    int    setvar();        /* set a variables value */
  195. extern    int    newwidth();        /* change the current screen width */
  196. #if    AEDIT
  197. extern    int    trim();         /* trim whitespace from end of line */
  198. extern    int    detab();        /* detab rest of line */
  199. extern    int    entab();        /* entab rest of line */
  200. #endif
  201. #if    PROC
  202. extern    int    storeproc();        /* store names procedure */
  203. extern    int    execproc();        /* execute procedure */
  204. #endif
  205. extern    int    nullproc();        /* does nothing... */
  206. extern    int    ovstring();        /* overwrite a string */
  207. #if !MAC
  208. extern    int    execprg();        /* execute a program */
  209. #endif
  210. #if MAC
  211. extern    int    emacs_copy();
  212. extern    int    emacs_cut();
  213. extern    int    emacs_paste();
  214. extern    int    ins_date();
  215. #endif
  216.  
  217. extern    int    dotag();
  218. extern    int    tag();
  219.  
  220. /*    Name to function binding table
  221.  
  222.         This table gives the names of all the bindable functions
  223.     end their C function address. These are used for the bind-to-key
  224.     function.
  225. */
  226.  
  227. NBIND    names[] = {
  228. #if MAC
  229.     {"Copy",            emacs_copy},
  230.     {"Cut",             emacs_cut},
  231.     {"Insert-date",         ins_date},
  232.     {"Openâ•”",            filefind},
  233.     {"Paste",            emacs_paste},
  234.     {"Quit",            quit},        /* For Multi-Finder. */
  235. #endif
  236.     {"abort-command",        ctrlg},
  237.     {"add-mode",            setmode},
  238.     {"add-global-mode",        setgmode},
  239. #if    APROP
  240.     {"apropos",            apro},
  241. #endif
  242.     {"backward-character",        backchar},
  243.     {"begin-macro",         ctlxlp},
  244.     {"beginning-of-file",        gotobob},
  245.     {"beginning-of-line",        gotobol},
  246.     {"bind-to-key",         bindtokey},
  247.     {"buffer-position",        showcpos},
  248.     {"case-region-lower",        lowerregion},
  249.     {"case-region-upper",        upperregion},
  250.     {"case-word-capitalize",    capword},
  251.     {"case-word-lower",        lowerword},
  252.     {"case-word-upper",        upperword},
  253.     {"change-file-name",        filename},
  254.     {"change-screen-size",        newsize},
  255.     {"change-screen-width",     newwidth},
  256.     {"clear-and-redraw",        refresh},
  257.     {"clear-message-line",        clrmes},
  258.     {"copy-region",         copyregion},
  259. #if    WORDPRO
  260.     {"count-words",         wordcount},
  261. #endif
  262.     {"ctlx-prefix",         cex},
  263.     {"delete-blank-lines",        deblank},
  264.     {"delete-buffer",        killbuffer},
  265.     {"delete-mode",         delmode},
  266.     {"delete-global-mode",        delgmode},
  267.     {"delete-next-character",    forwdel},
  268.     {"delete-next-word",        delfword},
  269.     {"delete-other-windows",    onlywind},
  270.     {"delete-previous-character",    backdel},
  271.     {"delete-previous-word",    delbword},
  272.     {"delete-window",        delwind},
  273.     {"describe-bindings",        desbind},
  274.     {"describe-key",        deskey},
  275. #if    AEDIT
  276.     {"detab-line",            detab},
  277. #endif
  278.     {"dotag",            dotag},
  279.     {"end-macro",            ctlxrp},
  280.     {"end-of-file",         gotoeob},
  281.     {"end-of-line",         gotoeol},
  282. #if    AEDIT
  283.     {"entab-line",            entab},
  284. #endif
  285.     {"exchange-point-and-mark",    swapmark},
  286.     {"execute-buffer",        execbuf},
  287.     {"execute-command-line",    execcmd},
  288.     {"execute-file",        execfile},
  289.     {"execute-macro",        ctlxe},
  290.     {"execute-macro-1",        cbuf1},
  291.     {"execute-macro-2",        cbuf2},
  292.     {"execute-macro-3",        cbuf3},
  293.     {"execute-macro-4",        cbuf4},
  294.     {"execute-macro-5",        cbuf5},
  295.     {"execute-macro-6",        cbuf6},
  296.     {"execute-macro-7",        cbuf7},
  297.     {"execute-macro-8",        cbuf8},
  298.     {"execute-macro-9",        cbuf9},
  299.     {"execute-macro-10",        cbuf10},
  300.     {"execute-macro-11",        cbuf11},
  301.     {"execute-macro-12",        cbuf12},
  302.     {"execute-macro-13",        cbuf13},
  303.     {"execute-macro-14",        cbuf14},
  304.     {"execute-macro-15",        cbuf15},
  305.     {"execute-macro-16",        cbuf16},
  306.     {"execute-macro-17",        cbuf17},
  307.     {"execute-macro-18",        cbuf18},
  308.     {"execute-macro-19",        cbuf19},
  309.     {"execute-macro-20",        cbuf20},
  310.     {"execute-macro-21",        cbuf21},
  311.     {"execute-macro-22",        cbuf22},
  312.     {"execute-macro-23",        cbuf23},
  313.     {"execute-macro-24",        cbuf24},
  314.     {"execute-macro-25",        cbuf25},
  315.     {"execute-macro-26",        cbuf26},
  316.     {"execute-macro-27",        cbuf27},
  317.     {"execute-macro-28",        cbuf28},
  318.     {"execute-macro-29",        cbuf29},
  319.     {"execute-macro-30",        cbuf30},
  320.     {"execute-macro-31",        cbuf31},
  321.     {"execute-macro-32",        cbuf32},
  322.     {"execute-macro-33",        cbuf33},
  323.     {"execute-macro-34",        cbuf34},
  324.     {"execute-macro-35",        cbuf35},
  325.     {"execute-macro-36",        cbuf36},
  326.     {"execute-macro-37",        cbuf37},
  327.     {"execute-macro-38",        cbuf38},
  328.     {"execute-macro-39",        cbuf39},
  329.     {"execute-macro-40",        cbuf40},
  330.     {"execute-named-command",    namedcmd},
  331. #if    PROC
  332.     {"execute-procedure",        execproc},
  333. #endif
  334. #if !MAC
  335.     {"execute-program",        execprg},
  336. #endif
  337.     {"exit-emacs",            quit},
  338. #if    WORDPRO
  339.     {"fill-paragraph",        fillpara},
  340. #endif
  341. #if !MAC
  342.     {"filter-buffer",        filter},
  343. #endif
  344.     {"find-file",            filefind},
  345.     {"forward-character",        forwchar},
  346.     {"goto-line",            gotoline},
  347. #if    CFENCE
  348.     {"goto-matching-fence",     getfence},
  349. #endif
  350.     {"grow-window",         enlargewind},
  351.     {"handle-tab",            tab},
  352.     {"hunt-forward",        forwhunt},
  353.     {"hunt-backward",        backhunt},
  354.     {"help",            help},
  355. #if !MAC
  356.     {"i-shell",            spawncli},
  357. #endif
  358. #if    ISRCH
  359.     {"incremental-search",        fisearch},
  360. #endif
  361.     {"insert-file",         insfile},
  362.     {"insert-space",        insspace},
  363.     {"insert-string",        istring},
  364. #if    WORDPRO
  365.     {"kill-paragraph",        killpara},
  366. #endif
  367.     {"kill-region",         killregion},
  368.     {"kill-to-end-of-line",     killtext},
  369. #if    FLABEL
  370.     {"label-function-key",        fnclabel},
  371. #endif
  372.     {"list-buffers",        listbuffers},
  373.     {"meta-prefix",         meta},
  374.     {"move-window-down",        mvdnwind},
  375.     {"move-window-up",        mvupwind},
  376.     {"name-buffer",         namebuffer},
  377.     {"newline",            newline},
  378.     {"newline-and-indent",        indent},
  379.     {"next-buffer",         nextbuffer},
  380.     {"next-line",            forwline},
  381.     {"next-page",            forwpage},
  382. #if    WORDPRO
  383.     {"next-paragraph",        gotoeop},
  384. #endif
  385.     {"next-window",         nextwind},
  386.     {"next-word",            forwword},
  387.     {"nop",             nullproc},
  388.     {"open-line",            openline},
  389.     {"overwrite-string",        ovstring},
  390. #if !MAC
  391.     {"pipe-command",        pipecmd},
  392. #endif
  393.     {"previous-line",        backline},
  394.     {"previous-page",        backpage},
  395. #if    WORDPRO
  396.     {"previous-paragraph",        gotobop},
  397. #endif
  398.     {"previous-window",        prevwind},
  399.     {"previous-word",        backword},
  400.     {"query-replace-string",    qreplace},
  401.     {"quick-exit",            quickexit},
  402.     {"quote-character",        quote},
  403.     {"read-file",            fileread},
  404.     {"redraw-display",        reposition},
  405.     {"resize-window",        resize},
  406.     {"restore-window",        restwnd},
  407.     {"replace-string",        sreplace},
  408. #if    ISRCH
  409.     {"reverse-incremental-search",    risearch},
  410. #endif
  411. #if    PROC
  412.     {"run",             execproc},
  413. #endif
  414.     {"save-file",            filesave},
  415.     {"save-window",         savewnd},
  416.     {"scroll-next-up",        scrnextup},
  417.     {"scroll-next-down",        scrnextdw},
  418.     {"search-forward",        forwsearch},
  419.     {"search-reverse",        backsearch},
  420.     {"select-buffer",        usebuffer},
  421.     {"set",             setvar},
  422. #if    CRYPT
  423.     {"set-encryption-key",        setkey},
  424. #endif
  425.     {"set-fill-column",        setfillcol},
  426.     {"set-mark",            setmark},
  427. #if !MAC
  428.     {"shell-command",        spawn},
  429. #endif
  430.     {"shrink-window",        shrinkwind},
  431.     {"split-current-window",    splitwind},
  432.     {"store-macro",         storemac},
  433. #if    PROC
  434.     {"store-procedure",        storeproc},
  435. #endif
  436. #if    BSD
  437.     {"suspend-emacs",        bktoshell},
  438. #endif
  439.     {"tag",             tag},
  440.     {"transpose-characters",    twiddle},
  441. #if    AEDIT
  442.     {"trim-line",            trim},
  443. #endif
  444.     {"unbind-key",            unbindkey},
  445.     {"universal-argument",        unarg},
  446.     {"unmark-buffer",        unmark},
  447.     {"update-screen",        upscreen},
  448.     {"view-file",            viewfile},
  449.     {"wrap-word",            wrapword},
  450.     {"write-file",            filewrite},
  451.     {"write-message",        writemsg},
  452.     {"yank",            yank},
  453.  
  454.     {"",            NULL}
  455. };
  456.