libkeymap: note about --unicode use
Note to the generated file that we used --unicode.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Jiri Slaby
3 years ago
122 | 122 | long func_table_offs[MAX_NR_FUNC]; |
123 | 123 | long func_buf_offset = 0; |
124 | 124 | struct lk_kbdiacr *kddiac; |
125 | int unicode = ctx->flags & LK_FLAG_PREFER_UNICODE; | |
125 | 126 | |
126 | 127 | if (lk_add_constants(ctx) < 0) |
127 | 128 | return -1; |
128 | 129 | |
129 | 130 | fprintf(fd, |
130 | 131 | /* not to be translated... */ |
131 | "/* Do not edit this file! It was automatically generated by */\n"); | |
132 | fprintf(fd, "/* loadkeys --mktable defkeymap.map > defkeymap.c */\n\n"); | |
132 | "/* Do not edit this file! It was automatically generated by */\n"); | |
133 | fprintf(fd, "/* loadkeys --mktable %sdefkeymap.map > defkeymap.c %*c*/\n\n", | |
134 | unicode ? "--unicode " : "", unicode ? 1 : 11, ' '); | |
133 | 135 | fprintf(fd, "#include <linux/keyboard.h>\n"); |
134 | 136 | fprintf(fd, "#include <linux/kd.h>\n\n"); |
135 | 137 | |
209 | 211 | fprintf(fd, "\t0,\n"); |
210 | 212 | fprintf(fd, "};\n"); |
211 | 213 | |
212 | if (ctx->flags & LK_FLAG_PREFER_UNICODE) { | |
214 | if (unicode) { | |
213 | 215 | fprintf(fd, "\nstruct kbdiacruc accent_table[MAX_DIACR] = {\n"); |
214 | 216 | for (i = 0; i < ctx->accent_table->count; i++) { |
215 | 217 | kddiac = lk_array_get_ptr(ctx->accent_table, i); |