Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 175179 | Differences between
and this patch

Collapse All | Expand All

(-)kbd-1.12.orig/man/man1/loadkeys.1.in (+13 lines)
Lines 5-10 Link Here
5
.SH SYNOPSIS
5
.SH SYNOPSIS
6
.B loadkeys
6
.B loadkeys
7
[
7
[
8
.I -b --bkeymap
9
] [
8
.I -c --clearcompose
10
.I -c --clearcompose
9
] [
11
] [
10
.I -d --default
12
.I -d --default
Lines 120-125 Link Here
120
.I /usr/src/linux\%/drivers\%/char\%/defkeymap.c,
122
.I /usr/src/linux\%/drivers\%/char\%/defkeymap.c,
121
specifying the default key bindings for a kernel
123
specifying the default key bindings for a kernel
122
(and does not modify the current keymap).
124
(and does not modify the current keymap).
125
.SH "CREATE BINARY KEYMAP"
126
If the
127
.I -b
128
(or
129
.I --bkeymap
130
) option is given
131
.B loadkeys
132
prints to the standard output a file that may be used as a binary
133
keymap as expected by Busybox
134
.B loadkmap
135
command (and does not modify the current keymap).
123
.SH "OTHER OPTIONS"
136
.SH "OTHER OPTIONS"
124
.TP
137
.TP
125
.B \-h \-\-help
138
.B \-h \-\-help
(-)kbd-1.12.orig/src/loadkeys.y (-1 / +35 lines)
Lines 64-69 Link Here
64
static void do_constant_key (int, u_short);
64
static void do_constant_key (int, u_short);
65
static void loadkeys(void);
65
static void loadkeys(void);
66
static void mktable(void);
66
static void mktable(void);
67
static void bkeymap(void);
67
static void strings_as_usual(void);
68
static void strings_as_usual(void);
68
static void keypad_as_usual(char *keyboard);
69
static void keypad_as_usual(char *keyboard);
69
static void function_keys_as_usual(char *keyboard);
70
static void function_keys_as_usual(char *keyboard);
Lines 253-258 Link Here
253
"	-d --default	  load \"" DEFMAP "\"\n"
254
"	-d --default	  load \"" DEFMAP "\"\n"
254
"	-h --help	  display this help text\n"
255
"	-h --help	  display this help text\n"
255
"	-m --mktable      output a \"defkeymap.c\" to stdout\n"
256
"	-m --mktable      output a \"defkeymap.c\" to stdout\n"
257
"	-b --bkeymap      output a binary keymap to stdout\n"
256
"	-s --clearstrings clear kernel string table\n"
258
"	-s --clearstrings clear kernel string table\n"
257
"	-u --unicode      implicit conversion to Unicode\n"
259
"	-u --unicode      implicit conversion to Unicode\n"
258
"	-v --verbose      report the changes\n"), VERSION);
260
"	-v --verbose      report the changes\n"), VERSION);
Lines 260-265 Link Here
260
}
262
}
261
263
262
char **args;
264
char **args;
265
int optb = 0;
263
int optd = 0;
266
int optd = 0;
264
int optm = 0;
267
int optm = 0;
265
int opts = 0;
268
int opts = 0;
Lines 269-276 Link Here
269
272
270
int
273
int
271
main(unsigned int argc, char *argv[]) {
274
main(unsigned int argc, char *argv[]) {
272
	const char *short_opts = "cdhmsuqvV";
275
	const char *short_opts = "bcdhmsuqvV";
273
	const struct option long_opts[] = {
276
	const struct option long_opts[] = {
277
		{ "bkeymap",    no_argument, NULL, 'b' },
274
		{ "clearcompose", no_argument, NULL, 'c' },
278
		{ "clearcompose", no_argument, NULL, 'c' },
275
	        { "default",    no_argument, NULL, 'd' },
279
	        { "default",    no_argument, NULL, 'd' },
276
		{ "help",	no_argument, NULL, 'h' },
280
		{ "help",	no_argument, NULL, 'h' },
Lines 289-294 Link Here
289
	while ((c = getopt_long(argc, argv,
293
	while ((c = getopt_long(argc, argv,
290
		short_opts, long_opts, NULL)) != -1) {
294
		short_opts, long_opts, NULL)) != -1) {
291
		switch (c) {
295
		switch (c) {
296
		        case 'b':
297
		                optb = 1;
298
				break;
292
		        case 'c':
299
		        case 'c':
293
		                nocompose = 1;
300
		                nocompose = 1;
294
				break;
301
				break;
Lines 330-335 Link Here
330
	do_constant();
337
	do_constant();
331
	if(optm)
338
	if(optm)
332
	        mktable();
339
	        mktable();
340
	else if(optb)
341
	        bkeymap();
333
	else
342
	else
334
	        loadkeys();
343
	        loadkeys();
335
	exit(0);
344
	exit(0);
Lines 1220-1222 Link Here
1220
1229
1221
	exit(0);
1230
	exit(0);
1222
}
1231
}
1232
1233
static void
1234
bkeymap () {
1235
	int i, j;
1236
1237
	u_char *p;
1238
	char flag, magic[] = "bkeymap";
1239
	unsigned short v;
1240
1241
	write(1, magic, 7);
1242
	for (i = 0; i < MAX_NR_KEYMAPS; i++) {
1243
		flag = key_map[i]? 1 : 0;
1244
		write(1, &flag, 1);
1245
	}
1246
	for (i = 0; i < MAX_NR_KEYMAPS; i++) {
1247
		if (key_map[i]) {
1248
			for (j = 0; j < NR_KEYS / 2; j++) {
1249
				v = key_map[i][j];
1250
				write(1, &v, 2);
1251
			}
1252
		}
1253
	}
1254
	exit(0);
1255
}
1256

Return to bug 175179