gperfnotes.txt

来自「一个著名的SIP协议栈」· 文本 代码 · 共 21 行

TXT
21
字号
// -k '*' forces gperf to choose a hash for each size category instead of giving up.
//        required if characters appear in the same position in several keywords
// -D forces gperf to cough up a non-perfect hash when it can't produce a perfect hash
//        required if several keywords are anagrams
//
//      gnu
//      |  class name
//      |  |            constants
//      |  |            |  language
//      |  |            |  |      custom struct
//      |  |            |  |      |  all characters
//      |  |            |  |      |  |      deal with anagrams
//      |  |            |  |      |  |      |
% gperf -g -Z ParamHash -E -L C++ -t -k '*' -D parametersA.gperf

// replace-regexp
str\[\([0-9]+\)\] => tolower(str[\1])
\*str == \*s => tolower(\*str) == \*s
//replace-not-regexp
!strcmp (str + 1, s + 1) => !strncasecmp (str + 1, s + 1, len-1)

⌨️ 快捷键说明

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