From 63dcabebc4b1e2cf69d3bc8efdf250925581a159 Mon Sep 17 00:00:00 2001 From: Gaetan Nadon Date: Fri, 20 Aug 2010 13:09:47 -0400 Subject: config: upgrade to util-macros 1.8 for additional man page support Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS The value of MAN_SUBST is the same for all X.Org packages. Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS Use the appropriate platform version of sed Signed-off-by: Gaetan Nadon --- Makefile.am | 39 +-------- configure.ac | 11 ++- luit.man | 246 -------------------------------------------------------- man/Makefile.am | 35 ++++++++ man/luit.man | 246 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 289 insertions(+), 288 deletions(-) delete mode 100644 luit.man create mode 100644 man/Makefile.am create mode 100644 man/luit.man diff --git a/Makefile.am b/Makefile.am index 2a2927d..18af96f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,10 +19,9 @@ # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. +SUBDIRS=man bin_PROGRAMS = luit -LOCALEALIASFILE = @LOCALEALIASFILE@ - AM_CFLAGS = $(CWARNFLAGS) $(LUIT_CFLAGS) \ -DLOCALE_ALIAS_FILE=\"$(LOCALEALIASFILE)\" luit_LDADD = $(LUIT_LIBS) @@ -42,20 +41,7 @@ luit_SOURCES = \ sys.c \ sys.h -appman_PRE = \ - luit.man - - -appmandir = $(APP_MAN_DIR) - -appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) - -EXTRA_DIST = $(appman_PRE) MAINTAINERCLEANFILES = ChangeLog INSTALL -CLEANFILES = $(appman_DATA) - -SED = sed - .PHONY: ChangeLog INSTALL @@ -66,26 +52,3 @@ ChangeLog: $(CHANGELOG_CMD) dist-hook: ChangeLog INSTALL - -# Strings to replace in man pages -XORGRELSTRING = @PACKAGE_STRING@ - XORGMANNAME = X Version 11 - -MAN_SUBSTS = \ - -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ - -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ - -e 's|__xservername__|Xorg|g' \ - -e 's|__xconfigfile__|xorg.conf|g' \ - -e 's|__locale_alias__|$(LOCALEALIASFILE)|g' \ - -e 's|__projectroot__|$(prefix)|g' \ - -e 's|__apploaddir__|$(appdefaultdir)|' \ - -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \ - -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \ - -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \ - -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ - -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' - -SUFFIXES = .$(APP_MAN_SUFFIX) .man - -.man.$(APP_MAN_SUFFIX): - $(AM_V_GEN)sed $(MAN_SUBSTS) < $< > $@ diff --git a/configure.ac b/configure.ac index 8063c8c..cab1f4e 100644 --- a/configure.ac +++ b/configure.ac @@ -25,10 +25,10 @@ AC_INIT(luit,[1.0.5], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE -# Require xorg-macros: XORG_DEFAULT_OPTIONS +# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS m4_ifndef([XORG_MACROS_VERSION], - [m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.4) + [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS AM_CONFIG_HEADER(config.h) @@ -97,4 +97,7 @@ LUIT_CFLAGS="$LUIT_CFLAGS $OS_CFLAGS" AC_SUBST(LUIT_CFLAGS) AC_SUBST(LUIT_LIBS) -AC_OUTPUT([Makefile]) +AC_CONFIG_FILES([Makefile + man/Makefile]) + +AC_OUTPUT diff --git a/luit.man b/luit.man deleted file mode 100644 index 636d0e3..0000000 --- a/luit.man +++ /dev/null @@ -1,246 +0,0 @@ -.\" -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds AQ \(aq -.el .ds AQ ' -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.TH LUIT 1 __vendorversion__ -.SH NAME -luit \- Locale and ISO\ 2022 support for Unicode terminals -.SH SYNOPSIS -.B luit -[ -.I options -] [ -.B \-\- -] [ -.I program -[ -.I args -] ] -.SH DESCRIPTION -.B Luit -is a filter that can be run between an arbitrary application and a -UTF-8 terminal emulator. It will convert application output from the -locale's encoding into UTF-8, and convert terminal input from UTF-8 -into the locale's encoding. - -An application may also request switching to a different output -encoding using ISO\ 2022 and ISO\ 6429 escape sequences. Use of this -feature is discouraged: multilingual applications should be modified -to directly generate UTF-8 instead. - -.B Luit -is usually invoked transparently by the terminal emulator. For -information about running -.B luit -from the command line, see EXAMPLES below. -.SH OPTIONS -.TP -.B \-h -Display some summary help and quit. -.TP -.B \-list -List the supported charsets and encodings, then quit. -.TP -.B \-V -Print luit's version and quit. -.TP -.B \-v -Be verbose. -.TP -.B \-c -Function as a simple converter from standard input to standard output. -.TP -.B \-p -In startup, establish a handshake between parent and child processes. -This is needed for some systems, e.g., FreeBSD. -.TP -.B \-x -Exit as soon as the child dies. This may cause -.B luit -to lose data at the end of the child's output. -.TP -.BI \-argv0 " name" -Set the child's name (as passed in argv[0]). -.TP -.BI \-encoding " encoding" -Set up -.B luit -to use -.I encoding -rather than the current locale's encoding. -.TP -.B +oss -Disable interpretation of single shifts in application output. -.TP -.B +ols -Disable interpretation of locking shifts in application output. -.TP -.B +osl -Disable interpretation of character set selection sequences in -application output. -.TP -.B +ot -Disable interpretation of all sequences and pass all sequences in -application output to the terminal unchanged. This may lead to -interesting results. -.TP -.B \-k7 -Generate seven-bit characters for keyboard input. -.TP -.B +kss -Disable generation of single-shifts for keyboard input. -.TP -.B +kssgr -Use GL codes after a single shift for keyboard input. By default, GR -codes are generated after a single shift when generating eight-bit -keyboard input. -.TP -.B \-kls -Generate locking shifts (SO/SI) for keyboard input. -.TP -.BI \-gl " gn" -Set the initial assignment of GL. The argument should be one of -.BR g0 , -.BR g1 , -.B g2 -or -.BR g3 . -The default depends on the locale, but is usually -.BR g0 . -.TP -.BI \-gr " gk" -Set the initial assignment of GR. The default depends on the locale, -and is usually -.B g2 -except for EUC locales, where it is -.BR g1 . -.TP -.BI \-g0 " charset" -Set the charset initially selected in G0. The default depends on -the locale, but is usually -.BR ASCII . -.TP -.BI \-g1 " charset" -Set the charset initially selected in G1. The default depends on the -locale. -.TP -.BI \-g2 " charset" -Set the charset initially selected in G2. The default depends on the -locale. -.TP -.BI \-g3 " charset" -Set the charset initially selected in G3. The default depends on the -locale. -.TP -.BI \-ilog " filename" -Log into -.I filename -all the bytes received from the child. -.TP -.BI \-olog " filename" -Log into -.I filename -all the bytes sent to the terminal emulator. -.TP -.BI \-alias " filename" -the locale alias file -.br -(default: __locale_alias__). -.TP -.B \-\- -End of options. -.SH EXAMPLES -The most typical use of -.B luit -is to adapt an instance of -.B XTerm -to the locale's encoding. Current versions of -.B XTerm -invoke -.B luit -automatically when it is needed. If you are using an older release of -.BR XTerm , -or a different terminal emulator, you may invoke -.B luit -manually: -.IP -$ xterm \-u8 \-e luit -.PP -If you are running in a UTF-8 locale but need to access a remote -machine that doesn't support UTF-8, -.B luit -can adapt the remote output to your terminal: -.IP -$ LC_ALL=fr_FR luit ssh legacy-machine -.PP -.B Luit -is also useful with applications that hard-wire an encoding that is -different from the one normally used on the system or want to use -legacy escape sequences for multilingual output. In particular, -versions of -.B Emacs -that do not speak UTF-8 well can use -.B luit -for multilingual output: -.IP -$ luit -encoding 'ISO 8859-1' emacs -nw -.PP -And then, in -.BR Emacs , -.IP -M-x set-terminal-coding-system RET iso-2022-8bit-ss2 RET -.PP -.SH FILES -.TP -.B __locale_alias__ -The file mapping locales to locale encodings. -.SH SECURITY -On systems with SVR4 (\*(``Unix-98\*('') ptys (Linux version 2.2 and later, -SVR4), -.B luit -should be run as the invoking user. - -On systems without SVR4 (\*(``Unix-98\*('') ptys (notably BSD variants), -running -.B luit -as an ordinary user will leave the tty world-writable; this is a -security hole, and luit will generate a warning (but still accept to -run). A possible solution is to make -.B luit -suid root; -.B luit -should drop privileges sufficiently early to make this safe. However, -the startup code has not been exhaustively audited, and the author -takes no responsibility for any resulting security issues. - -.B Luit -will refuse to run if it is installed setuid and cannot safely drop -privileges. -.SH BUGS -None of this complexity should be necessary. Stateless UTF-8 -throughout the system is the way to go. - -Charsets with a non-trivial intermediary byte are not yet supported. - -Selecting alternate sets of control characters is not supported and -will never be. -.SH SEE ALSO -xterm(__appmansuffix__), unicode(__miscmansuffix__), utf-8(__miscmansuffix__), charsets(__miscmansuffix__). -.nf -.br -.I Character Code Structure and Extension Techniques (ISO\ 2022, ECMA-35). -.br -.I Control Functions for Coded Character Sets (ISO\ 6429, ECMA-48). -.fi -.SH AUTHOR -The version of -.B Luit -included in this X.Org Foundation release -was originally written by Juliusz Chroboczek -for the XFree86 Project and includes additional contributions from -Thomas E. Dickey required for newer releases of xterm(__appmansuffix__). diff --git a/man/Makefile.am b/man/Makefile.am new file mode 100644 index 0000000..4844a20 --- /dev/null +++ b/man/Makefile.am @@ -0,0 +1,35 @@ +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# + +appmandir = $(APP_MAN_DIR) +appman_PRE = luit.man +appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) + +EXTRA_DIST = $(appman_PRE) +CLEANFILES = $(appman_DATA) +SUFFIXES = .$(APP_MAN_SUFFIX) .man +MAN_SUBSTS += -e 's|__locale_alias__|$(LOCALEALIASFILE)|g' + +# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure +.man.$(APP_MAN_SUFFIX): + $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ diff --git a/man/luit.man b/man/luit.man new file mode 100644 index 0000000..636d0e3 --- /dev/null +++ b/man/luit.man @@ -0,0 +1,246 @@ +.\" +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds AQ \(aq +.el .ds AQ ' +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.TH LUIT 1 __vendorversion__ +.SH NAME +luit \- Locale and ISO\ 2022 support for Unicode terminals +.SH SYNOPSIS +.B luit +[ +.I options +] [ +.B \-\- +] [ +.I program +[ +.I args +] ] +.SH DESCRIPTION +.B Luit +is a filter that can be run between an arbitrary application and a +UTF-8 terminal emulator. It will convert application output from the +locale's encoding into UTF-8, and convert terminal input from UTF-8 +into the locale's encoding. + +An application may also request switching to a different output +encoding using ISO\ 2022 and ISO\ 6429 escape sequences. Use of this +feature is discouraged: multilingual applications should be modified +to directly generate UTF-8 instead. + +.B Luit +is usually invoked transparently by the terminal emulator. For +information about running +.B luit +from the command line, see EXAMPLES below. +.SH OPTIONS +.TP +.B \-h +Display some summary help and quit. +.TP +.B \-list +List the supported charsets and encodings, then quit. +.TP +.B \-V +Print luit's version and quit. +.TP +.B \-v +Be verbose. +.TP +.B \-c +Function as a simple converter from standard input to standard output. +.TP +.B \-p +In startup, establish a handshake between parent and child processes. +This is needed for some systems, e.g., FreeBSD. +.TP +.B \-x +Exit as soon as the child dies. This may cause +.B luit +to lose data at the end of the child's output. +.TP +.BI \-argv0 " name" +Set the child's name (as passed in argv[0]). +.TP +.BI \-encoding " encoding" +Set up +.B luit +to use +.I encoding +rather than the current locale's encoding. +.TP +.B +oss +Disable interpretation of single shifts in application output. +.TP +.B +ols +Disable interpretation of locking shifts in application output. +.TP +.B +osl +Disable interpretation of character set selection sequences in +application output. +.TP +.B +ot +Disable interpretation of all sequences and pass all sequences in +application output to the terminal unchanged. This may lead to +interesting results. +.TP +.B \-k7 +Generate seven-bit characters for keyboard input. +.TP +.B +kss +Disable generation of single-shifts for keyboard input. +.TP +.B +kssgr +Use GL codes after a single shift for keyboard input. By default, GR +codes are generated after a single shift when generating eight-bit +keyboard input. +.TP +.B \-kls +Generate locking shifts (SO/SI) for keyboard input. +.TP +.BI \-gl " gn" +Set the initial assignment of GL. The argument should be one of +.BR g0 , +.BR g1 , +.B g2 +or +.BR g3 . +The default depends on the locale, but is usually +.BR g0 . +.TP +.BI \-gr " gk" +Set the initial assignment of GR. The default depends on the locale, +and is usually +.B g2 +except for EUC locales, where it is +.BR g1 . +.TP +.BI \-g0 " charset" +Set the charset initially selected in G0. The default depends on +the locale, but is usually +.BR ASCII . +.TP +.BI \-g1 " charset" +Set the charset initially selected in G1. The default depends on the +locale. +.TP +.BI \-g2 " charset" +Set the charset initially selected in G2. The default depends on the +locale. +.TP +.BI \-g3 " charset" +Set the charset initially selected in G3. The default depends on the +locale. +.TP +.BI \-ilog " filename" +Log into +.I filename +all the bytes received from the child. +.TP +.BI \-olog " filename" +Log into +.I filename +all the bytes sent to the terminal emulator. +.TP +.BI \-alias " filename" +the locale alias file +.br +(default: __locale_alias__). +.TP +.B \-\- +End of options. +.SH EXAMPLES +The most typical use of +.B luit +is to adapt an instance of +.B XTerm +to the locale's encoding. Current versions of +.B XTerm +invoke +.B luit +automatically when it is needed. If you are using an older release of +.BR XTerm , +or a different terminal emulator, you may invoke +.B luit +manually: +.IP +$ xterm \-u8 \-e luit +.PP +If you are running in a UTF-8 locale but need to access a remote +machine that doesn't support UTF-8, +.B luit +can adapt the remote output to your terminal: +.IP +$ LC_ALL=fr_FR luit ssh legacy-machine +.PP +.B Luit +is also useful with applications that hard-wire an encoding that is +different from the one normally used on the system or want to use +legacy escape sequences for multilingual output. In particular, +versions of +.B Emacs +that do not speak UTF-8 well can use +.B luit +for multilingual output: +.IP +$ luit -encoding 'ISO 8859-1' emacs -nw +.PP +And then, in +.BR Emacs , +.IP +M-x set-terminal-coding-system RET iso-2022-8bit-ss2 RET +.PP +.SH FILES +.TP +.B __locale_alias__ +The file mapping locales to locale encodings. +.SH SECURITY +On systems with SVR4 (\*(``Unix-98\*('') ptys (Linux version 2.2 and later, +SVR4), +.B luit +should be run as the invoking user. + +On systems without SVR4 (\*(``Unix-98\*('') ptys (notably BSD variants), +running +.B luit +as an ordinary user will leave the tty world-writable; this is a +security hole, and luit will generate a warning (but still accept to +run). A possible solution is to make +.B luit +suid root; +.B luit +should drop privileges sufficiently early to make this safe. However, +the startup code has not been exhaustively audited, and the author +takes no responsibility for any resulting security issues. + +.B Luit +will refuse to run if it is installed setuid and cannot safely drop +privileges. +.SH BUGS +None of this complexity should be necessary. Stateless UTF-8 +throughout the system is the way to go. + +Charsets with a non-trivial intermediary byte are not yet supported. + +Selecting alternate sets of control characters is not supported and +will never be. +.SH SEE ALSO +xterm(__appmansuffix__), unicode(__miscmansuffix__), utf-8(__miscmansuffix__), charsets(__miscmansuffix__). +.nf +.br +.I Character Code Structure and Extension Techniques (ISO\ 2022, ECMA-35). +.br +.I Control Functions for Coded Character Sets (ISO\ 6429, ECMA-48). +.fi +.SH AUTHOR +The version of +.B Luit +included in this X.Org Foundation release +was originally written by Juliusz Chroboczek +for the XFree86 Project and includes additional contributions from +Thomas E. Dickey required for newer releases of xterm(__appmansuffix__). -- cgit v1.2.3