kbdmap.c (154151) | kbdmap.c (167260) |
---|---|
1/*- 2 * Copyright (c) 2002 Jonathan Belson <jon@witchspace.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002 Jonathan Belson <jon@witchspace.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/usr.sbin/kbdmap/kbdmap.c 154151 2006-01-09 19:54:28Z flz $"); | 28__FBSDID("$FreeBSD: head/usr.sbin/kbdmap/kbdmap.c 167260 2007-03-06 09:32:41Z kevlo $"); |
29 30#include <sys/types.h> 31#include <sys/queue.h> 32 33#include <assert.h> 34#include <ctype.h> 35#include <dirent.h> 36#include <limits.h> --- 340 unchanged lines hidden (view full) --- 377 strcat(cmd, tmp_name); 378 379 /* Show the dialog.. */ 380 system(cmd); 381 382 fp = fopen(tmp_name, "r"); 383 if (fp) { 384 char choice[64]; | 29 30#include <sys/types.h> 31#include <sys/queue.h> 32 33#include <assert.h> 34#include <ctype.h> 35#include <dirent.h> 36#include <limits.h> --- 340 unchanged lines hidden (view full) --- 377 strcat(cmd, tmp_name); 378 379 /* Show the dialog.. */ 380 system(cmd); 381 382 fp = fopen(tmp_name, "r"); 383 if (fp) { 384 char choice[64]; |
385 if (fgets(choice, 64, fp) != NULL) { | 385 if (fgets(choice, sizeof(choice), fp) != NULL) { |
386 /* Find key for desc */ 387 for (i=0; i<num_keymaps; i++) { 388 if (!strcmp(choice, km_sorted[i]->desc)) { 389 if (!strcmp(program, "kbdmap")) 390 do_kbdcontrol(km_sorted[i]); 391 else 392 do_vidfont(km_sorted[i]); 393 break; --- 449 unchanged lines hidden --- | 386 /* Find key for desc */ 387 for (i=0; i<num_keymaps; i++) { 388 if (!strcmp(choice, km_sorted[i]->desc)) { 389 if (!strcmp(program, "kbdmap")) 390 do_kbdcontrol(km_sorted[i]); 391 else 392 do_vidfont(km_sorted[i]); 393 break; --- 449 unchanged lines hidden --- |