⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cfgfile.c

📁 一个开源著名的TDE编辑器源代码
💻 C
📖 第 1 页 / 共 3 页
字号:
/* * This file contains all the strings required to parse the configuration and * syntax highlighting files. */#include "tdestr.h"#include "config.h"#include "syntax.h"#include "define.h"/* * Group the list of available keys alphabetically. * jmh 991028: use the key defines. * jmh 020818: only store the key name; the prefixes can be tested separately. * jmh 020903: removed the shift prefix from the viewer keys (eg: "1" & "!" are *              equivalent, use "s+1" or "s+!" if that's what you mean). * jmh 021008: renamed backspace to bkspace, tab to tabkey. */const CONFIG_DEFS valid_keys[AVAIL_KEYS] = {/* available key     index into file   */   { " ",           _SPACEBAR       },   { "!",           _1              },   { "\"",          _APOSTROPHE     },   { "#",           _3              },   { "$",           _4              },   { "%",           _5              },   { "&",           _7              },   { "\'",          _APOSTROPHE     },   { "(",           _9              },   { ")",           _0              },   { "*",           _8              },   { "+",           _EQUALS         },   { ",",           _COMMA          },   { "-",           _MINUS          },   { ".",           _PERIOD         },   { "/",           _SLASH          },   { "0",           _0              },   { "1",           _1              },   { "2",           _2              },   { "3",           _3              },   { "4",           _4              },   { "5",           _5              },   { "6",           _6              },   { "7",           _7              },   { "8",           _8              },   { "9",           _9              },   { ":",           _SEMICOLON      },   { ";",           _SEMICOLON      },   { "<",           _COMMA          },   { "=",           _EQUALS         },   { ">",           _PERIOD         },   { "?",           _SLASH          },   { "@",           _2              },#ifndef __TURBOC__                              /* It seems Borland (BC3.1) */   { "[",           _LBRACKET       },          /* converts to uppercase in */   { "\\",          _BACKSLASH      },          /* stricmp, meaning these   */   { "]",           _RBRACKET       },          /* have to go after the     */   { "^",           _6              },          /* letters (jmh)            */   { "_",           _MINUS          },   { "`",           _BACKQUOTE      },#endif   { "a",           _A              },   { "b",           _B              },   { "bkspace",     _BACKSPACE      },   { "c",           _C              },   { "center",      _CENTER         },   { "d",           _D              },   { "del",         _DEL            },   { "down",        _DOWN           },   { "e",           _E              },   { "end",         _END            },   { "enter",       _ENTER          },   { "esc",         _ESC            },   { "f",           _F              },   { "f1",          _F1             },   { "f10",         _F10            },   { "f11",         _F11            },   { "f12",         _F12            },   { "f2",          _F2             },   { "f3",          _F3             },   { "f4",          _F4             },   { "f5",          _F5             },   { "f6",          _F6             },   { "f7",          _F7             },   { "f8",          _F8             },   { "f9",          _F9             },   { "g",           _G              },   { "grey*",       _GREY_STAR      },   { "grey+",       _GREY_PLUS      },   { "grey-",       _GREY_MINUS     },   { "grey/",       _GREY_SLASH     },   { "greydel",     _DEL            },   { "greydown",    _DOWN           },   { "greyend",     _END            },   { "greyenter",   _GREY_ENTER     },   { "greyhome",    _HOME           },   { "greyins",     _INS            },   { "greyleft",    _LEFT           },   { "greypgdn",    _PGDN           },   { "greypgup",    _PGUP           },   { "greyright",   _RIGHT          },   { "greyup",      _UP             },   { "h",           _H              },   { "home",        _HOME           },   { "i",           _I              },   { "ins",         _INS            },   { "j",           _J              },   { "k",           _K              },   { "l",           _L              },   { "left",        _LEFT           },   { "left\\",      _LEFT_BACKSLASH },   { "left|",       _LEFT_BACKSLASH },   { "m",           _M              },   { "n",           _N              },   { "o",           _O              },   { "p",           _P              },   { "pgdn",        _PGDN           },   { "pgup",        _PGUP           },   { "prtsc",       _PRTSC          },   { "q",           _Q              },   { "quote",       _APOSTROPHE     },   { "r",           _R              },   { "right",       _RIGHT          },   { "s",           _S              },   { "semicolon",   _SEMICOLON      },   { "space",       _SPACEBAR       },   { "t",           _T              },   { "tabkey",      _TAB            },   { "u",           _U              },   { "up",          _UP             },   { "v",           _V              },   { "w",           _W              },   { "x",           _X              },   { "y",           _Y              },   { "z",           _Z              },#ifdef __TURBOC__   { "[",           _LBRACKET       },   { "\\",          _BACKSLASH      },   { "]",           _RBRACKET       },   { "^",           _6              },   { "_",           _MINUS          },   { "`",           _BACKQUOTE      },#endif   { "{",           _LBRACKET       },   { "|",           _BACKSLASH      },   { "}",           _RBRACKET       },   { "~",           _BACKQUOTE      },};/* * list of keys to use when creating the config file for macros (jmh 020904) */const char * const cfg_key[MAX_KEYS] = {   "esc",   "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "backspace",   "tab", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[", "]", "enter",   ""/* ctrl */, "a", "s", "d", "f", "g", "h", "j", "k", "l", "semicolon", "'",   "`", ""/* lshift */, "\\", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/",   ""/* rshift */, "grey*", ""/* alt */, "space", ""/* capslock */,   "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "f10",   "greyenter", "grey/", "home", "up", "pgup", "grey-", "left",   "center", "right", "grey+", "end", "down", "pgdn", "ins", "del",   "prtsc", ""/* fake f11 */,  "left\\", "f11", "f12",};/* * sorted alphabetic list of functions that keys may be assigned to. *  add 1 to NUM_FUNCS so users may use either Macro or Playback to *  define macros.  Macro and Playback are both assigned to 126. * * jmh 980723: replaced the numbers with the defines. * jmh 980726: add another one to NUM_FUNCS due to my two-key reorganizing. * jmh 991121: add another one to NUM_FUNCS due to AbortCommand. * jmh 991125: created the f macro. * jmh 020923: added CopyWord/CopyString as aliases for (Beg)NextLine. */#define f( x ) { #x, x },const CONFIG_DEFS valid_func[CFG_FUNCS+1] = {   f( AbortCommand                   )   f( About                          )   f( AddLine                        )   f( BackSpace                      )   f( BackTab                        )   f( BalanceHorizontal              )   f( BalanceVertical                )   f( BegNextLine                    )   f( BegOfLine                      )   f( BlockBegin                     )   f( BlockBlockComment              )   f( BlockCapitalise                )   f( BlockCenterJustify             )   f( BlockCompressTabs              )   f( BlockEmailReply                )   f( BlockEnd                       )   f( BlockExpandTabs                )   f( BlockFixUUE                    )   f( BlockIndent                    )   f( BlockIndentN                   )   f( BlockIndentTabs                )   f( BlockInvertCase                )   f( BlockLeftJustify               )   f( BlockLineComment               )   f( BlockLowerCase                 )   f( BlockRightJustify              )   f( BlockRot13                     )   f( BlockStripHiBit                )   f( BlockToFile                    )   f( BlockTrimTrailing              )   f( BlockUnComment                 )   f( BlockUndent                    )   f( BlockUndentN                   )   f( BlockUpperCase                 )   f( BorderBlock                    )   f( BorderBlockEx                  )   f( BotOfScreen                    )   f( BottomLine                     )   f( CenterJustify                  )   f( CenterLine                     )   f( CenterWindow                   )   f( ChangeCurDir                   )   f( CharacterSet                   )   f( CharLeft                       )   f( CharRight                      )   f( ClearAllMacros                 )   f( CloseWindow                    )   f( ContextHelp                    )   f( CopyBlock                      )   { "CopyString",       BegNextLine },   f( CopyToClipboard                )   { "CopyWord",         NextLine    },   f( CutToClipboard                 )   f( DateTimeStamp                  )   f( DefineDiff                     )   f( DefineGrep                     )   f( DefineSearch                   )   f( DelBegOfLine                   )   f( DelEndOfLine                   )   f( DeleteBlock                    )   f( DeleteChar                     )   f( DeleteLine                     )   f( DirList                        )   f( DuplicateLine                  )   f( DynamicTabSize                 )   f( EditFile                       )   f( EditNextFile                   )   f( EndNextLine                    )   f( EndOfFile                      )   f( EndOfLine                      )   f( EraseBegOfLine                 )   f( Execute                        )   f( File                           )   f( FileAll                        )   f( FileAttributes                 )   f( FillBlock                      )   f( FillBlockDown                  )   f( FillBlockPattern               )   f( FindBackward                   )   f( FindForward                    )   f( FormatParagraph                )   f( FormatText                     )   f( GotoMark1                      )   f( GotoMark2                      )   f( GotoMark3                      )   f( GotoWindow                     )

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -