From efc0358298b9b6fe666233c3967a52e514d1fa8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20H=C3=A5llberg?= Date: Thu, 1 Jan 2009 03:01:20 +0100 Subject: support different man page encodings diff --git a/ChangeLog.old b/ChangeLog.old index c5ef1dd..95af66e 100644 --- a/ChangeLog.old +++ b/ChangeLog.old @@ -1,5 +1,9 @@ 2008-12-31 dain + * powwow.6: Supprt automatically converting man page to different + encodings by setting MAN_PAGE_ENCODING when running + configure. Defaults to UTF-8 on all hosts except OS X (darwin), + where it is ISO-8859-1. * build: Fixed build out of the box on OS X by turning on --enable-bsd by default on darwin hosts. * cmd2.c: Fixed some problems related to binding keys with the diff --git a/Makefile.am b/Makefile.am index af85e1c..5da8f73 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,5 +22,14 @@ EXTRA_DIST = README README.follow README.term README.modules \ powwow.doc powwow.help powwow.6 plugtest.c debian/rules \ debian/control debian/changelog +CLEANFILES = powwow.6 + +powwow.6: powwow.6.utf-8 +if MAN_PAGE_ENCODING_IS_UTF_8 + cp $< $@ +else + iconv -f UTF-8 -t "$(MAN_PAGE_ENCODING)" < $< > $@ +endif + plugtest.so: plugtest.c gcc -shared -o plugtest.so plugtest.c diff --git a/configure.in b/configure.in index e46e902..e9f5636 100644 --- a/configure.in +++ b/configure.in @@ -48,6 +48,27 @@ AS_IF([ test "${enable_bsd}" = yes ], [ AC_DEFINE(USE_SGTTY) AC_DEFINE(BSD_LIKE) ]) +AC_MSG_CHECKING([man page encoding]) +if test -z "${MAN_PAGE_ENCODING}"; then + case "${host_os}" in + darwin*) MAN_PAGE_ENCODING=ISO-8859-1 ;; + *) MAN_PAGE_ENCODING=UTF-8 ;; + esac +fi +AC_SUBST([MAN_PAGE_ENCODING]) +AC_MSG_RESULT([${MAN_PAGE_ENCODING}]) + +if test "${MAN_PAGE_ENCODING}" != UTF-8; then + AC_CHECK_PROG([ICONV], [iconv], [iconv], []) + if test -z "${ICONV}" -a "${MAN_PAGE_ENCODING}" != UTF-8; then + AC_MSG_WARN([Forcing man page encoding to UTF-8]) + MAN_PAGE_ENCODING=UTF-8 + fi +fi + +AM_CONDITIONAL([MAN_PAGE_ENCODING_IS_UTF_8], + [test "${MAN_PAGE_ENCODING}" = UTF-8 ]) + # Checks for programs. AC_PROG_CC diff --git a/powwow.6 b/powwow.6 deleted file mode 100644 index 6e5fce2..0000000 --- a/powwow.6 +++ /dev/null @@ -1,125 +0,0 @@ -.\" -*-nroff-*- -.TH POWWOW 6 "2008 Dec 30" "powwow 1.2.13" -.SH NAME -powwow \- telnet protocol client for MUD playing -.SH SYNOPSIS -.B powwow -.RI "[ " host " " port " ] | [ " definition-file " ]" -.SH DESCRIPTION -.PP -.B powwow -is a client program that implements the telnet protocol, adding some bells -and whistles to the standard -.BR telnet (1) -communication utility, mainly intended for playing multi-user games -such as -.IR MUDs " (" "Multi User Dungeons" ")." -.PP -.B powwow -is either invoked with -.I host -and -.I port, -and then does not save any definitions, or with a -.I definition-file, -which is supposed to contain various definitions as well as the name -of the host and the port number. If the definition-file does not -exist, the user is prompted for the host name and port number which -are saved in the new file. The definition file can be edited with any -text editor, and is updated whenever a definition (action, alias, -etc.) is changed. If the environment variable POWWOWDIR is defined, -.B powwow -will look there first for definition files (and create new ones -there). - -Lines that begin with `#' are assumed to be special commands to be -processed locally. Help is available with the -.I #help -command. There is also a more detailed manual somewhere. Notably, -semicolons separate commands on a single line. To send a literal -semicolon, prefix it with a backslash. - -.B powwow -also supports the MUME editing protocol for editing texts locally. The -name of the editor is taken from the environment variable POWWOWEDITOR -or EDITOR. -.BR emacs (1) -is used by default. For text viewing, POWWOWPAGER is searched, then -PAGER and -.BR more (1) -is used by default. - -If the first character of the editor is `&' (which is then skipped), -the editor is assumed to run in another window and -.I powwow -will run concurrently with the editor without waiting for it to -finish. - -When launched, the editor program will have its TITLE environment -variable set to the document title sent from the MUD. - -.SH AUTHOR -.PP -Massimiliano Ghilardi and Gustav Hållberg are the people that added many new features to an -existing client, -.I Cancan -and transformed it into -.IR powwow . -Mattias Engdegård (f91-men@nada.kth.se) was the original author of -Cancan but many other people have contributed at least as much, -including Finn Arne Gangstad (finnag@pvv.unit.no), David Gay -(dgay@di.epfl.ch), Gary Dezern (gdezern@satelnet.org) and Lai-Chang -Woo (vivriel@scs.com.sg). - -.I powwow -moved to hoopajoo.net in 2005, and is now maintained by Steve Slaven -, please send bug reports and patches to that -address. - -The -.I powwow -WWW page is: http://hoopajoo.net/projects/powwow.html - -.I powwow -was originally inspired by Peter Unold's -.I Tintin -client, but now only bears a very remote resemblance to the -original. It aims to be a simple but very interactive client, and -contains features that are interesting for ``immortal'' players, in -particular on MUME, though any mud player should benefit from -.I powwow -as well. -.SH FILES -.TP \w'$(POWWOWDIR)/*\ \ \ 'u -powwow -The binary. -.TP -$(POWWOWDIR)/* -Definition files for aliases, etc. -.SH ENVIRONMENT -.TP -.B TERM -Your terminal type. -.TP -.B POWWOWDIR -Where powwow will store and search for its files by default. -.TP -.BR POWWOWEDITOR " or " EDITOR -Name of editor to use. -.TP -.BR POWWOWPAGER " or " PAGER -Name of pager to use. -.SH SEE ALSO -.BR telnet "(1), " more "(1), " emacs (1) -.SH DIAGNOSTICS -Most diagnostics are self-explanatory. Some are even more -self-explanatory than others, namely those who crash the program. -There is a diagnostic report called `core' which is not currently in -human-readable form. The messages from -.I powwow -are generally prefixed with a `#' to separate them from output from -the remote host. -.SH BUGS -.PP -Are you kidding? diff --git a/powwow.6.utf-8 b/powwow.6.utf-8 new file mode 100644 index 0000000..6e5fce2 --- /dev/null +++ b/powwow.6.utf-8 @@ -0,0 +1,125 @@ +.\" -*-nroff-*- +.TH POWWOW 6 "2008 Dec 30" "powwow 1.2.13" +.SH NAME +powwow \- telnet protocol client for MUD playing +.SH SYNOPSIS +.B powwow +.RI "[ " host " " port " ] | [ " definition-file " ]" +.SH DESCRIPTION +.PP +.B powwow +is a client program that implements the telnet protocol, adding some bells +and whistles to the standard +.BR telnet (1) +communication utility, mainly intended for playing multi-user games +such as +.IR MUDs " (" "Multi User Dungeons" ")." +.PP +.B powwow +is either invoked with +.I host +and +.I port, +and then does not save any definitions, or with a +.I definition-file, +which is supposed to contain various definitions as well as the name +of the host and the port number. If the definition-file does not +exist, the user is prompted for the host name and port number which +are saved in the new file. The definition file can be edited with any +text editor, and is updated whenever a definition (action, alias, +etc.) is changed. If the environment variable POWWOWDIR is defined, +.B powwow +will look there first for definition files (and create new ones +there). + +Lines that begin with `#' are assumed to be special commands to be +processed locally. Help is available with the +.I #help +command. There is also a more detailed manual somewhere. Notably, +semicolons separate commands on a single line. To send a literal +semicolon, prefix it with a backslash. + +.B powwow +also supports the MUME editing protocol for editing texts locally. The +name of the editor is taken from the environment variable POWWOWEDITOR +or EDITOR. +.BR emacs (1) +is used by default. For text viewing, POWWOWPAGER is searched, then +PAGER and +.BR more (1) +is used by default. + +If the first character of the editor is `&' (which is then skipped), +the editor is assumed to run in another window and +.I powwow +will run concurrently with the editor without waiting for it to +finish. + +When launched, the editor program will have its TITLE environment +variable set to the document title sent from the MUD. + +.SH AUTHOR +.PP +Massimiliano Ghilardi and Gustav Hållberg are the people that added many new features to an +existing client, +.I Cancan +and transformed it into +.IR powwow . +Mattias Engdegård (f91-men@nada.kth.se) was the original author of +Cancan but many other people have contributed at least as much, +including Finn Arne Gangstad (finnag@pvv.unit.no), David Gay +(dgay@di.epfl.ch), Gary Dezern (gdezern@satelnet.org) and Lai-Chang +Woo (vivriel@scs.com.sg). + +.I powwow +moved to hoopajoo.net in 2005, and is now maintained by Steve Slaven +, please send bug reports and patches to that +address. + +The +.I powwow +WWW page is: http://hoopajoo.net/projects/powwow.html + +.I powwow +was originally inspired by Peter Unold's +.I Tintin +client, but now only bears a very remote resemblance to the +original. It aims to be a simple but very interactive client, and +contains features that are interesting for ``immortal'' players, in +particular on MUME, though any mud player should benefit from +.I powwow +as well. +.SH FILES +.TP \w'$(POWWOWDIR)/*\ \ \ 'u +powwow +The binary. +.TP +$(POWWOWDIR)/* +Definition files for aliases, etc. +.SH ENVIRONMENT +.TP +.B TERM +Your terminal type. +.TP +.B POWWOWDIR +Where powwow will store and search for its files by default. +.TP +.BR POWWOWEDITOR " or " EDITOR +Name of editor to use. +.TP +.BR POWWOWPAGER " or " PAGER +Name of pager to use. +.SH SEE ALSO +.BR telnet "(1), " more "(1), " emacs (1) +.SH DIAGNOSTICS +Most diagnostics are self-explanatory. Some are even more +self-explanatory than others, namely those who crash the program. +There is a diagnostic report called `core' which is not currently in +human-readable form. The messages from +.I powwow +are generally prefixed with a `#' to separate them from output from +the remote host. +.SH BUGS +.PP +Are you kidding? -- cgit v0.10.2