Commit graph

142 commits

Author SHA1 Message Date
Warner Losh 24115b70d6 Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit b2c76c41be)
2023-08-23 11:43:32 -06:00
Warner Losh b144e70a33 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit fa9896e082)
2023-08-23 11:43:31 -06:00
Warner Losh 023fc80ee3 Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit d0b2dbfa0e)
2023-08-23 11:43:30 -06:00
Warner Losh 3d497e17eb Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in main:
(cherry picked from commit 1d386b48a5)
2023-08-23 11:43:26 -06:00
Warner Losh 8ad303d68c Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/

Similar commit in main:
(cherry picked from commit 2a63c3be15)
2023-08-23 11:43:23 -06:00
Warner Losh 17da660ad5 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit b3e7694832)
2023-08-23 11:43:21 -06:00
Warner Losh caa41f6417 spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
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

(cherry picked from commit 4d846d260e)
2023-07-25 09:13:49 -06:00
Stefan Eßer 1412836cbd kbdcontrol.c: make pre-Unicode compatibility conditional
Support for the full range of Unicode character codes has been added
to the main keymap back in 2009, with compatibility shims added in
2011 (to support an older kbdcontrol command on a new kernel during
an upgrade from FreeBSD-8 to FreeBSD-9).

Unicode support for accented characters that are reached via dead key
combinations has been added just recently, again with compatibility
shims to allow all combinations of old/new kernel and old/new
kbdcontrol command to load and display the keymaps including the dead
key table. (But full Unicode in the dead key table requires both a new
kernel and kbdcontrol command.)

This commit makes the compatibility shims depend on the respective
compatibility ioctls (OGIO_KEYMAP, OPIO_KEYMAP, OGIO_DEADKEYMAP, and
OPIO_DEADKEYMAP) being defined in sys/kbio.h. This is true for all of
them in 13-STABLE, none in 12-STABLE (as of now), and will become
optional due to a follow-up commit to sys/kbio.h in -CURRENT.

This commit is the only part of review D38465 that should be merged
back to 12-STABLE and 13-STABLE.

(cherry picked from commit b4eab621f2)
2023-04-10 23:31:24 +02:00
Stefan Eßer 6693d527a4 usr.sbin/kbdcontrol.c: Add backwards compatibility functions
This commit allows a kbdcontrol binary built with a version of kbio.h
that supports Unicode characters in dead key maps to load and display
keymaps including the dead key tables on a kernel built with a
previous version of kbio.h (that only supported 8 bit characters in
the dead key map).

This commit is meant as a temporary compatibility shim that will be
reverted when it can be assumed that all relevant systems have been
upgraded to a kernel that uses the updated kbio.h.

MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D38388

(cherry picked from commit b92f8e5c0d)
2023-02-09 22:36:09 +01:00
Baptiste Daroussin bcba42d1f8 Stop linking to libl by specifying we do not need yywrap
MFC after: 3 days
2019-09-10 07:26:38 +00:00
Warner Losh 73701bbe9d kbdcontrol -h prints two error messages.
We loop through getopt(3) twice. Once for -P args and once for the
rest. Catch '?' and print usage when that happens.
2019-06-24 21:05:14 +00:00
Stefan Eßer 96329ce7e2 Silence Clang Scan warning about use of unitialized variable.
While the warning is a false positive, it is possible to clarify the code by
always initializing the variable. This does also allow to make the sending
of the "beep" control sequence depend on the validity of its parameters.

I have left the redundant assignment of 0 to the now initialized variables
in place since this makes the code simpler to understand and does not add
any run-time overhead (the compiler completely removes the "else if" test
and the assignments).

There was an embedded literal escape character in a string, which messes up
diplaying the source code on a terminal that interprets ANSI sequences. The
literal escape has been replaced by \e (non-standard, but supported by all
relevant compilers, and already used in other source files in base).

MFC after:	2 weeks
2019-01-23 10:05:27 +00:00
Pedro F. Giffuni 1de7b4b805 various: general adoption of SPDX licensing ID tags.
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.
2017-11-27 15:37:16 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Ed Maste 8c0d1b4798 kbdcontrol: add -P path option to add keymap search paths
PR:		193865
Reviewed by:	cem
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5645
2016-03-16 04:05:02 +00:00
Bryan Drewery bd18fd57db DIRDEPS_BUILD: Regenerate without local dependencies.
These are no longer needed after the recent 'beforebuild: depend' changes
and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports
skipping 'make depend'.

Sponsored by:	EMC / Isilon Storage Division
2016-02-24 17:20:11 +00:00
Ed Maste 647129e382 kbdmap.5: Use current names for ASCII control codes lf, ff, us
Refer to the old names nl, np, ns as historical aliases.

PR:		205776, 205778
MFC After:	1 week
Sponsored by:	The FreeBSD Foundation
2016-01-02 18:35:11 +00:00
Simon J. Gerraty ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty 44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty 98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Joel Dahl f7e00d4bbd mdoc: remove EOL whitespace. 2014-12-29 13:50:59 +00:00
Baptiste Daroussin c6db8143ed Convert usr.sbin to LIBADD
Reduce overlinking
2014-11-25 16:57:27 +00:00
Simon J. Gerraty 9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Stefan Eßer dd281ebb46 Update man-pages to correctly refer to changed pathes and naming conventions
for systems with vt(4) consoles.

MFC after:	3 days
2014-08-26 09:40:14 +00:00
Stefan Eßer 0ae9426c10 Remove band.aid that made kbdcontrol lookup keymap files in the syscons
path even under vt, which is no longer useful, since the syscons keymap
files have been converted and committed for use by vt.
2014-08-26 09:37:43 +00:00
Simon J. Gerraty ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Stefan Eßer 895a99ef10 The previous commit (r269119) introduced a regression: It removed the
ability to specify the the full path name of the keymap file.

Instead leave the original search order intact, but insert the path for
newcons-specific fonts (if run on a system using newcons):

	- KEYMAP_PATH in environment
	- full path name
	- /usr/share/vt/keymaps		(only if newcons is in use!)
	- /usr/share/syscons/keymaps	(also as fall-back for newcons)

MFC after:	1 week
2014-07-26 13:14:28 +00:00
Stefan Eßer e34c3e1817 Fix obvious off by one error: prefix[1] should be set to the path of the
newcons specific keymap files, not prefix[2]. The result of this bug was
that kbdcontrol ignored the files in the syscons keymap directory, which
apparently still work under newcons, for most locales.

MFC after:	1 week
2014-07-26 12:17:26 +00:00
Ed Maste 6c79f78813 Fix vt(4) detection in kbdcontrol and vidcontrol
As sc(4) and vt(4) coexist and are both enabled in GENERIC, the existence
of a vt(4) sysctl is not sufficient to determine that vt(4) is in use.

Reported by:	Trond Endrestøl
2014-07-02 20:40:59 +00:00
Baptiste Daroussin 01c2b8ac0d use .Mt to mark up email addresses consistently (part2)
PR:		191174
Submitted by:	Franco Fichtner  <franco@lastsummer.de>
2014-06-20 09:57:27 +00:00
Aleksandr Rybalko 2f11ee6205 Enable kbdcontrol(1) to use maps from vt(4) keymaps dir /usr/share/vt/keymaps
if vt(4) is present.

MFC after:	7 days
Sponsored by:	The FreeBSD Foundation
2014-05-29 14:39:25 +00:00
Simon J. Gerraty fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty 76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty d1d0158641 Merge from head 2013-09-05 20:18:59 +00:00
Jung-uk Kim a7880d59c9 Improve compatibility with recent flex from flex.sourceforge.net. 2013-05-03 23:51:32 +00:00
Simon J. Gerraty 7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar 7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Ulrich Spörlein f76b319989 Reencode files to UTF-8. Drop CP1252 em-dash. 2011-12-30 00:59:08 +00:00
Ed Schouten 4d9a3537ff Add missing static and const keywords to kbdcontrol.
None of the symbols provided by kbdcontrol.c are used by other source
files of this binary. Slightly reduce the binary size and make much more
symbols read-only by adding proper static and const keywords.
2011-12-12 12:33:38 +00:00
Rebecca Cran e267ef95d5 Don't generate input() since it's not used. 2010-11-22 14:16:22 +00:00
Oliver Fromme 863ae04c61 Fix some typos: flush vs. flash, and some others.
Approved by:	des (mentor, implicit)
MFC after:	1 week
2010-08-11 08:26:15 +00:00
Ed Schouten 9a958de54c ANSIfy some more tools in usr.sbin/.
Most of these tools build with WARNS=6, except for their use of K&R
function declarations.
2010-01-02 11:05:34 +00:00
Ed Schouten b05f9c86d1 Make the keyboard layer Unicode aware.
Just take keyent_t to use an u_int to store the Unicode codepoints.
Unfortunately the keymap is now too big to be loaded using an ioctl
argument, so change the ioctl to pick a pointer.

This change breaks kbdcontrol ABI. It doesn't break X11, because X11
doesn't do anything with syscons keymaps. It just switches the device
out of K_XLATE.

Obtained from:	//depot/user/ed/newcons/...
2009-09-19 17:56:26 +00:00
Ed Schouten daf4075a30 Unhardcode 0x100 inside kbdcontrol.
In preparation for Unicode support for the keyboard layer, we'd better
get rid of all the hardcoded 0x100/0xff constants in kbdcontrol.
Instead, add a flag called SPECIAL stored in the top bit of the integer.

Adding Unicode support is very simple now; just change u_char map[] to
u_int map[] in keyent_t, change the bounds checking in kbdcontrol to
0x1FFFFF and modify the ioctls to allow loading these new keymaps.
2009-08-24 09:17:01 +00:00
Tom Rhodes c01d5f7d0f Some clarifications to make keyboard configuration under syscons.
PR:		89325
Submitted by:	Oliver Fromme <olli@secnetix.de>
Reviewed by:	emax
2008-01-29 18:28:50 +00:00
Ruslan Ermilov c5233647e2 Grammar fix from Ceri. 2006-11-16 13:43:05 +00:00
Ruslan Ermilov b59cc9bbf4 Document that visual bell is the global setting, while
other bell types can be set individually for each vty.
2006-11-16 12:37:35 +00:00
Ruslan Ermilov 5a66b66324 Replace magic numbers for console bell types with defines. 2006-11-16 12:27:51 +00:00
Ruslan Ermilov bc84aa4ba3 Markup fixes. 2006-09-29 17:57:04 +00:00