blob: 1d084f5657e61208d5330773c3baf2074f706d53 [file] [log] [blame]
ichizok672776d2022-01-31 12:27:18 +00001/* vi:set ts=8 sts=4 sw=4 noet:
2 *
3 * VIM - Vi IMproved by Bram Moolenaar et al.
4 *
5 * Do ":help uganda" in Vim to read copying and usage conditions.
6 * Do ":help credits" in Vim to see a list of people who contributed.
7 * See README.txt for an overview of the Vim source code.
8 */
9
10/*
11 * create_nvcmdidxs.c: helper program for `make nvcmdidxs`
12 *
13 * This outputs the list of command characters from the nv_cmds table in
14 * decimal form, one per line.
15 */
16
17#include "vim.h"
18
19// Declare nv_cmds[].
20#include "nv_cmds.h"
21
22#include <stdio.h>
23
24int main(void)
25{
26 size_t i;
27
28 for (i = 0; i < NV_CMDS_SIZE; i++)
29 {
30 int cmdchar = nv_cmds[i];
31
32 // Special keys are negative, use the negated value for sorting.
33 if (cmdchar < 0)
34 cmdchar = -cmdchar;
35 printf("%d\n", cmdchar);
36 }
37 return 0;
38}