home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / src / baseline / jove-4.14.6.lha / jove-4.14.6 / funcdefs.c < prev    next >
C/C++ Source or Header  |  1992-01-10  |  15KB  |  428 lines

  1. /***************************************************************************
  2.  * This program is Copyright (C) 1986, 1987, 1988 by Jonathan Payne.  JOVE *
  3.  * is provided to you without charge, and with no warranty.  You may give  *
  4.  * away copies of JOVE, including sources, provided that this notice is    *
  5.  * included in all the files.                                              *
  6.  ***************************************************************************/
  7.  
  8. #include "jove.h"
  9. #include "ctype.h"
  10.  
  11. #ifdef    UNIX
  12. # ifndef    SYSV
  13. #  include <sgtty.h>
  14. # endif
  15. #endif
  16.  
  17. #ifndef    TXT_TO_C
  18.  
  19. #ifdef    MAC
  20. #    define WIRED_CMD(c) (c),'\0','\0'    /* for About Jove... */
  21. #else
  22. #    define WIRED_CMD(c)    (c)
  23. #endif    /* MAC */
  24.  
  25. #else    /* TXT_TO_C */
  26.  
  27. #ifdef    MAC
  28. #    define WIRED_CMD(c) 0,'\0','\0'
  29. #else
  30. #    define WIRED_CMD(c)    0
  31. #endif
  32. #endif    /* TXT_TO_C */
  33.  
  34. /* Table of commands
  35.  *
  36.  * Note: must be kept in alphabetical order (the truth is more complicated).
  37.  */
  38.  
  39. const struct cmd    commands[] = {
  40. #ifdef    LISP
  41.     FUNCTION, "add-lisp-special", WIRED_CMD(AddSpecial),
  42. #endif
  43.     FUNCTION, "append-region", WIRED_CMD(AppReg),
  44.     FUNCTION, "apropos", WIRED_CMD(Apropos),
  45.     FUNCTION, "auto-execute-command", WIRED_CMD(CAutoExec),
  46.     FUNCTION, "auto-execute-macro", WIRED_CMD(MAutoExec),
  47.     DefMinor(Fill), "auto-fill-mode", WIRED_CMD(NULL),
  48.     DefMinor(Indent), "auto-indent-mode", WIRED_CMD(NULL),
  49.     FUNCTION, "backward-character", WIRED_CMD(BackChar),
  50.     FUNCTION, "backward-list", WIRED_CMD(BList),
  51.     FUNCTION, "backward-paragraph", WIRED_CMD(BackPara),
  52.     FUNCTION, "backward-s-expression", WIRED_CMD(BSexpr),
  53.     FUNCTION, "backward-sentence", WIRED_CMD(Bos),
  54.     FUNCTION, "backward-up-list", WIRED_CMD(BUpList),
  55.     FUNCTION, "backward-word", WIRED_CMD(BackWord),
  56.     FUNCTION, "begin-kbd-macro", WIRED_CMD(Remember),
  57.     FUNCTION, "beginning-of-file", WIRED_CMD(Bof),
  58.     FUNCTION, "beginning-of-line", WIRED_CMD(Bol),
  59.     FUNCTION, "beginning-of-window", WIRED_CMD(Bow),
  60.     FUNCTION, "bind-keymap-to-key", WIRED_CMD(KmBind),
  61.     FUNCTION, "bind-macro-to-key", WIRED_CMD(BindMac),
  62. #ifdef    ABBREV
  63.     FUNCTION, "bind-macro-to-word-abbrev", WIRED_CMD(BindMtoW),
  64. #endif
  65.     FUNCTION, "bind-to-key", WIRED_CMD(BindAKey),
  66.     FUNCTION, "buffer-position", WIRED_CMD(BufPos),
  67.     DefMajor(CMODE), "c-mode", WIRED_CMD(NULL),
  68.     MODFUNC, "case-character-capitalize", WIRED_CMD(CapChar),
  69.     MODFUNC, "case-region-lower", WIRED_CMD(CasRegLower),
  70.     MODFUNC, "case-region-upper", WIRED_CMD(CasRegUpper),
  71.     MODFUNC, "case-word-capitalize", WIRED_CMD(CapWord),
  72.     MODFUNC, "case-word-lower", WIRED_CMD(LowWord),
  73.     MODFUNC, "case-word-upper", WIRED_CMD(UppWord),
  74.     FUNCTION, "cd", WIRED_CMD(Chdir),
  75.     MODFUNC, "character-to-octal-insert", WIRED_CMD(ChrToOct),
  76.     FUNCTION, "clear-and-redraw", WIRED_CMD(ClAndRedraw),
  77. #ifndef    MAC
  78.     FUNCTION, "compile-it", WIRED_CMD(MakeErrors),
  79. #endif
  80. #ifdef    PTYPROCS
  81.     FUNCTION, "continue-process", WIRED_CMD(ProcCont),
  82. #endif
  83.     FUNCTION, "copy-region", WIRED_CMD(CopyRegion),
  84. #ifndef    MAC
  85.     FUNCTION, "current-error", WIRED_CMD(ShowErr),
  86. #endif
  87.     FUNCTION, "date", WIRED_CMD(prCTIME),
  88. #ifdef    ABBREV
  89.     FUNCTION, "define-global-word-abbrev", WIRED_CMD(DefGAbbrev),
  90. #endif
  91.     FUNCTION, "define-macro", WIRED_CMD(DefKBDMac),
  92. #ifdef    ABBREV
  93.     FUNCTION, "define-mode-word-abbrev", WIRED_CMD(DefMAbbrev),
  94. #endif
  95.     MODFUNC, "delete-blank-lines", WIRED_CMD(DelBlnkLines),
  96.     FUNCTION, "delete-buffer", WIRED_CMD(BufKill),
  97.     FUNCTION, "delete-current-window", WIRED_CMD(DelCurWindow),
  98.     FUNCTION, "delete-macro", WIRED_CMD(DelMacro),
  99.     MODFUNC, "delete-next-character", WIRED_CMD(DelNChar),
  100.     FUNCTION, "delete-other-windows", WIRED_CMD(OneWindow),
  101.     MODFUNC, "delete-previous-character", WIRED_CMD(DelPChar),
  102.     MODFUNC, "delete-white-space", WIRED_CMD(DelWtSpace),
  103.     FUNCTION, "describe-bindings", WIRED_CMD(DescBindings),
  104.     FUNCTION, "describe-command", WIRED_CMD(DescCom),
  105.     FUNCTION, "describe-key", WIRED_CMD(KeyDesc),
  106.     FUNCTION, "describe-variable", WIRED_CMD(DescCom),
  107.     FUNCTION, "digit", WIRED_CMD(Digit),
  108.     FUNCTION, "digit-0", WIRED_CMD(Digit0),
  109.     FUNCTION, "digit-1", WIRED_CMD(Digit1),
  110.     FUNCTION, "digit-2", WIRED_CMD(Digit2),
  111.     FUNCTION, "digit-3", WIRED_CMD(Digit3),
  112.     FUNCTION, "digit-4", WIRED_CMD(Digit4),
  113.     FUNCTION, "digit-5", WIRED_CMD(Digit5),
  114.     FUNCTION, "digit-6", WIRED_CMD(Digit6),
  115.     FUNCTION, "digit-7", WIRED_CMD(Digit7),
  116.     FUNCTION, "digit-8", WIRED_CMD(Digit8),
  117.     FUNCTION, "digit-9", WIRED_CMD(Digit9),
  118.     FUNCTION, "dirs", WIRED_CMD(prDIRS),
  119.     FUNCTION, "down-list", WIRED_CMD(FDownList),
  120. #ifdef    PTYPROCS
  121.     FUNCTION, "dstop-process", WIRED_CMD(ProcDStop),
  122. #endif
  123. #ifdef    ABBREV
  124.     FUNCTION, "edit-word-abbrevs", WIRED_CMD(EditAbbrevs),
  125. #endif
  126.     FUNCTION, "end-kbd-macro", WIRED_CMD(Forget),
  127.     FUNCTION, "end-of-file", WIRED_CMD(Eof),
  128.     FUNCTION, "end-of-line", WIRED_CMD(Eol),
  129.     FUNCTION, "end-of-window", WIRED_CMD(Eow),
  130. #ifdef    PTYPROCS
  131.     FUNCTION, "eof-process", WIRED_CMD(ProcEof),
  132. #endif
  133.     FUNCTION, "erase-buffer", WIRED_CMD(BufErase),
  134.     FUNCTION, "exchange-point-and-mark", WIRED_CMD(PtToMark),
  135.     FUNCTION, "execute-kbd-macro", WIRED_CMD(ExecMacro),
  136.     FUNCTION, "execute-macro", WIRED_CMD(RunMacro),
  137.     FUNCTION, "execute-named-command", WIRED_CMD(Extend),
  138.     FUNCTION, "exit-jove", WIRED_CMD(Leave),
  139. #ifdef    CMT_FMT
  140.     MODFUNC, "fill-comment", WIRED_CMD(Comment),
  141. #endif    /* CMT_FMT */
  142.     MODFUNC, "fill-paragraph", WIRED_CMD(Justify),
  143.     MODFUNC, "fill-region", WIRED_CMD(RegJustify),
  144. #ifndef    MAC
  145.     MODFUNC, "filter-region", WIRED_CMD(FilterRegion),
  146. #endif
  147.     FUNCTION, "find-file", WIRED_CMD(FindFile),
  148.     FUNCTION, "find-tag", WIRED_CMD(FindTag),
  149.     FUNCTION, "find-tag-at-point", WIRED_CMD(FDotTag),
  150.     FUNCTION, "first-non-blank", WIRED_CMD(ToIndent),
  151.     FUNCTION, "forward-character", WIRED_CMD(ForChar),
  152.     FUNCTION, "forward-list", WIRED_CMD(FList),
  153.     FUNCTION, "forward-paragraph", WIRED_CMD(ForPara),
  154.     FUNCTION, "forward-s-expression", WIRED_CMD(FSexpr),
  155.     FUNCTION, "forward-sentence", WIRED_CMD(Eos),
  156.     FUNCTION, "forward-word", WIRED_CMD(ForWord),
  157.     DefMajor(FUNDAMENTAL), "fundamental-mode", WIRED_CMD(NULL),
  158.     FUNCTION, "gather-numeric-argument", WIRED_CMD(TimesFour),
  159.     FUNCTION, "goto-line", WIRED_CMD(GoLine),
  160.     FUNCTION, "goto-window-with-buffer", WIRED_CMD(GotoWind),
  161. #ifdef    LISP
  162.     MODFUNC, "grind-s-expr", WIRED_CMD(GSexpr),
  163. #endif
  164.     FUNCTION, "grow-window", WIRED_CMD(GrowWindowCmd),
  165.     MODFUNC, "handle-tab", WIRED_CMD(Tab),
  166.     FUNCTION, "i-search-forward", WIRED_CMD(IncFSearch),
  167.     FUNCTION, "i-search-reverse", WIRED_CMD(IncRSearch),
  168. #ifdef    IPROCS
  169.     FUNCTION, "i-shell-command", WIRED_CMD(Iprocess),
  170. #endif
  171.     MODFUNC, "insert-file", WIRED_CMD(InsFile),
  172. #ifdef    IPROCS
  173.     FUNCTION, "interrupt-process", WIRED_CMD(ProcInt),
  174. #endif
  175.     MODFUNC, "kill-next-word", WIRED_CMD(DelNWord),
  176.     MODFUNC, "kill-previous-word", WIRED_CMD(DelPWord),
  177. #ifdef    IPROCS
  178.     FUNCTION, "kill-process", WIRED_CMD(ProcKill),
  179. #endif
  180.     MODFUNC, "kill-region", WIRED_CMD(DelReg),
  181.     MODFUNC, "kill-s-expression", WIRED_CMD(KillExpr),
  182.     FUNCTION, "kill-some-buffers", WIRED_CMD(KillSome),
  183.     MODFUNC, "kill-to-beginning-of-sentence", WIRED_CMD(KillBos),
  184.     MODFUNC, "kill-to-end-of-line", WIRED_CMD(KillEOL),
  185.     MODFUNC, "kill-to-end-of-sentence", WIRED_CMD(KillEos),
  186.     FUNCTION, "left-margin-here", WIRED_CMD(SetLMargin),
  187. #ifdef    LISP
  188.     DefMajor(LISPMODE), "lisp-mode", WIRED_CMD(NULL),
  189. #endif
  190.     FUNCTION, "list-buffers", WIRED_CMD(BufList),
  191. #ifdef    IPROCS
  192.     FUNCTION, "list-processes", WIRED_CMD(ProcList),
  193. #endif
  194.     FUNCTION, "make-buffer-unmodified", WIRED_CMD(NotModified),
  195.     FUNCTION, "make-keymap", WIRED_CMD(MakeKMap),
  196.     FUNCTION, "make-macro-interactive", WIRED_CMD(MacInter),
  197.     FUNCTION, "name-kbd-macro", WIRED_CMD(NameMac),
  198.     MODFUNC, "newline", WIRED_CMD(Newline),
  199.     MODFUNC, "newline-and-backup", WIRED_CMD(OpenLine),
  200.     MODFUNC, "newline-and-indent", WIRED_CMD(LineAI),
  201. #ifndef    MAC
  202.     FUNCTION, "next-error", WIRED_CMD(NextError),
  203. #endif
  204.     FUNCTION, "next-line", WIRED_CMD(NextLine),
  205.     FUNCTION, "next-page", WIRED_CMD(NextPage),
  206.     FUNCTION, "next-window", WIRED_CMD(NextWindow),
  207.     FUNCTION, "number-lines-in-window", WIRED_CMD(WNumLines),
  208.     DefMinor(OverWrite), "over-write-mode", WIRED_CMD(NULL),
  209.     FUNCTION, "page-next-window", WIRED_CMD(PageNWind),
  210.     MODFUNC, "paren-flash", WIRED_CMD(DoParen),
  211. #ifndef    MAC
  212.     FUNCTION, "parse-errors", WIRED_CMD(ErrParse),
  213. #endif
  214. #ifdef    SPELL
  215.     FUNCTION, "parse-spelling-errors-in-buffer", WIRED_CMD(SpelWords),
  216. #endif
  217. #ifdef    JOB_