aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/kbdmap/kbdmap.c
Commit message (Collapse)AuthorAgeFilesLines
* kbdmap: fix typo preventing kbdmap to work under vtBaptiste Daroussin2024-02-011-1/+1
|
* kbdmap: remove debugBaptiste Daroussin2024-02-011-2/+0
|
* usr.sbin: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* Fix too small sscanf output buffers in kbdmapDimitry Andric2022-02-061-2/+2
| | | | | | | | | | | | | | | | | | | | | This fixes the following warnings from clang 14: usr.sbin/kbdmap/kbdmap.c:241:16: error: 'sscanf' may overflow; destination buffer in argument 5 has size 20, but the corresponding specifier may require size 21 [-Werror,-Wfortify-source] &a, &b, buf); ^ usr.sbin/kbdmap/kbdmap.c:615:8: error: 'sscanf' may overflow; destination buffer in argument 3 has size 64, but the corresponding specifier may require size 65 [-Werror,-Wfortify-source] keym, lng, desc); ^ usr.sbin/kbdmap/kbdmap.c:615:14: error: 'sscanf' may overflow; destination buffer in argument 4 has size 64, but the corresponding specifier may require size 65 [-Werror,-Wfortify-source] keym, lng, desc); ^ usr.sbin/kbdmap/kbdmap.c:615:19: error: 'sscanf' may overflow; destination buffer in argument 5 has size 256, but the corresponding specifier may require size 257 [-Werror,-Wfortify-source] keym, lng, desc); ^ In each case, the buffer being sscanf'd into is one byte too small. MFC after: 3 days
* bsddialog: import version 0.1Alfonso Siciliano2022-01-281-9/+15
| | | | | | | | | | | | | | | Import bsddialog 0.1 Utility and Library, fully refatorized, API stable, manuals completed, easier to maintain and improve. Update deps for new API: add mixedgauge consts, delete __DECONST and add bsddialog_geterror() info to avoid silent errors * tzsetup * kbdmap * distextract Differential Revision: https://reviews.freebsd.org/D34066
* kbdmap: adapt to the new libbsddialog APIAlfonso Siciliano2021-12-131-1/+1
| | | | Differential Revision: https://reviews.freebsd.org/D33398
* kbdmap: adapt to the new bsddialog apiBaptiste Daroussin2021-12-061-1/+1
|
* kbdmap: use libbsddialog instead of calling dialog(1) via system(3)Baptiste Daroussin2021-11-241-63/+43
|
* kbdmap: allow INDEX.keymaps to provide the dialog titleEd Maste2019-12-111-5/+12
| | | | | | | | | | | Previously kbdmap had a localized menu heading ("Choose your keyboard layout") but not the dialog title ("Keyboard Menu"). MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=355614
* Silence a CI warning regarding the use of strcpy().Stefan Eßer2019-01-221-2/+1
| | | | | | | | | | | While this is a false positive (a sufficiently large buffer has been allocated in the line above), the use of strdup() simplifies and clarifies the code. MFC after: 2 weeks Notes: svn path=/head/; revision=343303
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* kbdmap: include filename when reporting fopen() failureEd Maste2015-11-271-1/+1
| | | | | | | | | | Previously only one of two cases reported the file name. Use the same error string in both cases. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=291409
* vidfont: with vt(4) omit size from vidcontrol -fEd Maste2015-11-271-5/+13
| | | | | | | | | | | | | | When using syscons, vidfont extracts the font size from the filename passes it to vidcontrol -f. In vt(4) mode the size argument is not required, and some of the fonts in /usr/share/vt/fonts do not have the size in the filename, which caused vidfont to fail. Thus, just omit the size argument in vt(4) mode. MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=291377
* kbdmap(1): increase description size to 256 bytesEd Maste2015-05-141-2/+2
| | | | | | | | | | | After conversion to UTF-8 some INDEX.keymaps descriptions are longer than the previous limit of 64 bytes. PR: 193656 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=282904
* Add support for NEWCONS to kbdmap and vidfont.Stefan Eßer2014-08-141-3/+26
| | | | | | | | | | The path to keymaps and fonts is selected based on the existence and value of "sysctl kern.vty". MFC after: 1 week Notes: svn path=/head/; revision=269976
* Remove variables which are initialized but never used thereafter reported by ↵Eitan Adler2012-06-191-3/+0
| | | | | | | | | | gcc46 warning Approved by: cperciva MFC After: 3 days Notes: svn path=/head/; revision=237257
* Spelling fixes for usr.sbin/Ulrich Spörlein2011-12-301-1/+1
| | | | Notes: svn path=/head/; revision=228990
* Place quotes around the output of kbdmap(1), designed to be pasted intoNathan Whitehorn2011-10-161-1/+1
| | | | | | | | | | | /etc/rc.conf. PR: bin/161711 Submitted by: manolis MFC after: 1 week Notes: svn path=/head/; revision=226439
* Don't try to close the stream if fopen(3) fails.Jaakko Heinonen2011-06-011-1/+1
| | | | | | | | PR: bin/155349 Submitted by: Urankar Mikael Notes: svn path=/head/; revision=222568
* Use auto-sizing syntax appropriate for the new dialog(1). This shouldNathan Whitehorn2011-01-131-1/+1
| | | | | | | probably be modified to use libdialog. Notes: svn path=/head/; revision=217359
* Fix fd leak in get_fontKevin Lo2010-11-291-0/+1
| | | | Notes: svn path=/head/; revision=216047
* Output keymap choice to stderr so it is easier to parse for apps chained toMurray Stokely2007-08-271-1/+1
| | | | | | | | | | this curses based app. Submitted by: ivoras Approved by: re@ (bmah@) Notes: svn path=/head/; revision=171996
* Use sizeof() for calculating the buffer size instead of hard-coded values.Kevin Lo2007-03-061-1/+1
| | | | Notes: svn path=/head/; revision=167260
* Fix -r causing SIGSEGV due to parse_args() being called before font_current ↵Florent Thoumie2006-01-091-3/+3
| | | | | | | | | | is set. Approved by: krion MFC after: 3 days Notes: svn path=/head/; revision=154151
* Fixed two bugs in Perl to C conversion that prevented locale nameRuslan Ermilov2005-06-301-3/+3
| | | | | | | | | | | from being parsed correctly. OK'ed by: markm Approved by: re (scottl) MFC after: 3 days Notes: svn path=/head/; revision=147685
* Do not include <sys/syslimits.h> directly; it is not intended for generalGarrett Wollman2002-10-271-1/+1
| | | | | | | consumption. Notes: svn path=/head/; revision=106053
* C rewrite of kbdmap/vidfont.Mark Murray2002-07-031-0/+842
Submitted by: Jonathan Belson <jon@witchspace.com> OK'ed by: wosch (Perl code maintainer) Notes: svn path=/head/; revision=99357