summaryrefslogtreecommitdiffstats
path: root/src/ex_cmdidxs.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-04-20 21:55:44 +0200
committerBram Moolenaar <Bram@vim.org>2017-04-20 21:55:44 +0200
commit6de5e126018b6f92526795cc06b1d73fac965db1 (patch)
tree3bb672d63d10452561479a98d16ba89a42d5360f /src/ex_cmdidxs.h
parenta364cdb648ae009fa7aa05382f5659335683d349 (diff)
patch 8.0.0572: building the command table requires Perlv8.0.0572
Problem: Building the command table requires Perl. Solution: Use a Vim script solution. (Dominique Pelle, closes #1641)
Diffstat (limited to 'src/ex_cmdidxs.h')
-rw-r--r--src/ex_cmdidxs.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/ex_cmdidxs.h b/src/ex_cmdidxs.h
new file mode 100644
index 0000000000..3b6120e864
--- /dev/null
+++ b/src/ex_cmdidxs.h
@@ -0,0 +1,72 @@
+/* Automatically generated code by create_cmdidxs.vim
+ *
+ * Table giving the index of the first command in cmdnames[] to lookup
+ * based on the first letter of a command.
+ */
+static const unsigned short cmdidxs1[26] =
+{
+ /* a */ 0,
+ /* b */ 19,
+ /* c */ 42,
+ /* d */ 103,
+ /* e */ 125,
+ /* f */ 145,
+ /* g */ 161,
+ /* h */ 167,
+ /* i */ 176,
+ /* j */ 194,
+ /* k */ 196,
+ /* l */ 201,
+ /* m */ 259,
+ /* n */ 277,
+ /* o */ 297,
+ /* p */ 309,
+ /* q */ 348,
+ /* r */ 351,
+ /* s */ 370,
+ /* t */ 437,
+ /* u */ 472,
+ /* v */ 483,
+ /* w */ 501,
+ /* x */ 516,
+ /* y */ 525,
+ /* z */ 526
+};
+
+/*
+ * Table giving the index of the first command in cmdnames[] to lookup
+ * based on the first 2 letters of a command.
+ * Values in cmdidxs2[c1][c2] are relative to cmdidxs1[c1] so that they
+ * fit in a byte.
+ */
+static const unsigned char cmdidxs2[26][26] =
+{ /* a b c d e f g h i j k l m n o p q r s t u v w x y z */
+ /* a */ { 0, 1,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 0, 0, 2, 5, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0 },
+ /* y */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ /* z */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+};
+
+static const int command_count = 539;