head	1.18;
access;
symbols
	groff-1_19_2:1.15
	FDL:1.11
	groff-1_19_1:1.10
	groff-1_19:1.9
	groff-1_18_1:1.6
	groff-1_18:1.5;
locks; strict;
comment	@# @;


1.18
date	2006.09.26.21.57.21;	author wl;	state dead;
branches;
next	1.17;

1.17
date	2006.09.16.16.06.23;	author bwarken;	state Exp;
branches;
next	1.16;

1.16
date	2005.09.14.01.11.28;	author bwarken;	state Exp;
branches;
next	1.15;

1.15
date	2005.08.23.09.57.09;	author wl;	state Exp;
branches;
next	1.14;

1.14
date	2005.08.03.06.32.11;	author wl;	state Exp;
branches;
next	1.13;

1.13
date	2005.07.02.17.37.54;	author wl;	state Exp;
branches;
next	1.12;

1.12
date	2005.05.26.21.01.57;	author wl;	state Exp;
branches;
next	1.11;

1.11
date	2004.06.04.22.42.34;	author wlemb;	state Exp;
branches;
next	1.10;

1.10
date	2004.05.04.04.46.54;	author wlemb;	state Exp;
branches;
next	1.9;

1.9
date	2003.01.27.07.52.41;	author wlemb;	state Exp;
branches;
next	1.8;

1.8
date	2002.10.21.21.51.53;	author wlemb;	state Exp;
branches;
next	1.7;

1.7
date	2002.10.19.09.56.36;	author wlemb;	state Exp;
branches;
next	1.6;

1.6
date	2002.10.07.09.10.11;	author wlemb;	state Exp;
branches;
next	1.5;

1.5
date	2002.07.17.04.48.28;	author wlemb;	state Exp;
branches;
next	1.4;

1.4
date	2002.06.28.06.18.06;	author wlemb;	state Exp;
branches;
next	1.3;

1.3
date	2002.06.25.21.13.55;	author wlemb;	state Exp;
branches;
next	1.2;

1.2
date	2002.06.24.18.08.06;	author wlemb;	state Exp;
branches;
next	1.1;

1.1
date	2002.06.03.16.42.03;	author wlemb;	state Exp;
branches;
next	;


desc
@@


1.18
log
@*** empty log message ***
@
text
@TODO file for `groffer'

File position: <groff-source>/contrib/groffer/TODO


####### TODO

Revision:

Optimization:
- To increase the running speed write part of the `groffer' shell
  script in C/C++ or perl.

Features of external programs:
- Revise option handling of `grog'.

Documentation:


####### License

Last update: 14 Sep 2006

Copyright (C) 2003,2004,2005,2006 Free Software Foundation, Inc.
Written by Bernd Warken

This file is part of `groffer', which is part of `groff'.

`groff' is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

`groff' is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
License for more details.

You should have received a copy of the GNU General Public License
along with `groff'; see the files COPYING and LICENSE in the top
directory of the `groff' source.  If not, write to the Free Software
Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.


####### Emacs settings

Local Variables:
mode: text
End:
@


1.17
log
@Update groffer 0.9.26
@
text
@@


1.16
log
@
Update groffer 0.9.23
@
text
@a17 6
- Improve the documentation of the search algorithm for `man' pages in
  both the `groffer' scripts and the `man' page `groffer.man'.
- In `groffer.man', add more documentation for parts that were taken
  over from GNU `man'.
- The documentation in the headers for some function definitions in
  `groffer2.sh' needs to be updated.
d22 1
a22 1
Last update: 14 Sep 2005
d24 1
a24 1
Copyright (C) 2003,2004,2005 Free Software Foundation, Inc.
@


1.15
log
@

	* release of groffer 0.9.22

	### `--whatis'

	Produce a `groff' output and allow wild cards on filespec
	parameters for `--whatis'.

	* groffer2.sh:
	- $_FILESPEC_ARG: New variable for storing the actual filespec
	parameter.
	- main_do_fileargs(): Set $_FILESPEC_ARG and add
	what_is_filespec().
        - main_parse_args(): Add --all to --whatis.
	- to_tmp_line(): New function to write the arguments to the
	temorary cat file.
	- whatis_filename(): Rename of what_is().  Construct a better
	printout using $_FILESPEC_ARG.  Repair the sed sequneces.
	- whatis_filespec(): New function to print the filespec once
	during the `whatis' process.
	- whatis_header(): New funtion for printing the header of the
	`whatis' output.

	* groffer.man: Revise the documentation of --whatis.

	### `--apropos*'

	Produce `groff' for `--apropos*'.  Allow `--sections' for
	`--apropos', ignore it  with `--apropos-*'.

	* groffer2.sh:
	- --apropos*: Make these options without argument.
	- $_APROPOS_PROG: New variable for the program that is is used for
	`apropos'.
	- $_APROPOS_SECTIONS: New variable to determine the sections that
	are filtered out of `apropos' output depending on `--apropos-*'.
	- apropos_filespec(): Handling of apropos at the filespec level.
	- apropos_run(): Remove it.
	- apropos_setup(): New function.
	- main_set_mode(): Remove handling of $_OPT_APROPOS*.

	* groffer.man:
	- Revise the documentation of `--apropos*'.
	- Split section 'options for GNU man' into two sections `options
	for man pages' and `long options taken over from GNU man'.
	- Move `--apropos*', `--whatis', `--man', and `--no-man' to
	section `options for man pages'.

	### special display (apropos and whatis)

	* groffer2.sh:
	- special_setup(): New function that chooses the setup between
	apropos and whatis.
	- special_filespec(): New function that does the output at the
	filespec level for apropos or whatis.

	### handle `--sections' for man page searching

	* groffer2.sh:
	- man_do_filespec(): Use $_OPT_SECTIONS of --sections instead of
	$_MAN_AUTO_SEC if non-empty.  If a section was given on the
	filespec parameter $_OPT_SECTIONS is ignored.  This differs from
	`man' which always uses the restricted sections of --sections.
	This function works for both normal man page search and whatis.
	- apropos_filespec(): Use --sections for --apropos, but not for
	--apropos-* because these provide already their own sections.

	### wildcards in filespec arguments

	* groffer2.sh: Wildcards are now accepted.  In `--apropos*' and
	`--whatis' they are interpreted as wildcard search elements; but
	in normal display they are only handled as their own character.

	### development; new option

	* groffer2.sh:
	- --print: New option that prints just its argument for parameter
	check.
	- usage(): Add new option.
	- $_OPT_DO_NOTHING: New variable for do_nothing().  Handle it at
	the end of main_parse_Args().

	* groffer.man: Add information on --print.

	### safe exit

	* groffer2.sh:
	- error(): Always exit with $_ERROR.
	- exit_test(): New function to exit when first exit was hidden by
	().  Call it after each $().

	### automatic shell determination

	* groffer.sh:
	- If no option --shell is given perform a test of several shells
	to automatically start some shell for groffer2.sh.  `ksh' is used
	first because it can be safely terminated by Ctrl-C.
	- This can be cancelled by providing --shell=''.
	- Add test on `sed' program.

	* groffer.man: Revise information on --shell.

	### trap

	* groffer2.sh:
	- trap_set(): Remove argument.  Instead of $_ALL_EXIT use only
	signal 0.
	- trap_unset(): Rename trap_clean().  Instead of $_ALL_EXIT use
	only signal 0.
	- $_ALL_EXIT: Remove this variable.
	- Replace all direct `trap' calls by trap_set().

	* README_SH: New section `Bugs' on `trap'..

	### user errors, error output without function stack

	* groffer2.sh:
	- error_user(): New function for user errors.
	- error(): Remove call of clean_up() because the trap will do it
	with the exit.  Remove the `kill' commands.  Create a temporary
	file `.error' that can be tested by exit_test() for a better exit
	test (especially for shell `ksh').
	- $_DEBUG_USER_WITH_STACK: New variable to enable function stack
	output in error_user().
	- list_from_cmdline(), list_single_from_abbrev(), main_set_mode():
	Use error_user().

	### test modes on X and tty

	* groffer2,sh:
	- is_X(), is_not_X(): New functions for checking on X Window.
	- $_VIEWER_HTML_TTY, $_VIEWER_HTML_X: New variables that split
	$_VIEWER_HTML.  Add `galeon'.
	- main_parse_args(): Allow mode change for graphical modes only
	when in X Window.
	- _do_display() of main_display(): Create a special run for
	viewers that run on the terminal; `lynx' is the only one so far.

	### add $GROFFER_MODE to command line

	* groffer.sh:
	- After the handling of the configuration files integrate
	$GROFFER_OPT to the command line.
	- This makes a `set' in the shell determination unnecessary.

	* groffer2.sh:
	- The debug test gets simpler because quotes are vanished without
	$GROFFER_OPT.
	- main_parse_MANOPT(): Prepend $mpm_list to the command line.
	- main_parse_args(): `set' is unnecessary.

	### debug; new options

	* groffer2.sh:
	- --debug-all, --debug-lm, --debug-params, --debug-shell,
	--debug-stacks, --debug-tmpdir, --debug-user: New options.
	- --debug: Enable all debug variables except $_DEBUG_STACKS and
	$_DEBUG_LM.  By the new options the smallest abbreviation is now
	`--debug'.
	- $_DEBUG_STACKS: Rename $_DEBUG.
	- $_DEBUG_PRINT_TMPDIR: New debug variable for printing the name
	of the temporary directory in main_init().
	- $_OPT_DEBUG: Remove this variable because debug is handled at
	the early part of the script.
	- clean_up(): Enlarge $_DEBUG_KEEP_FILES to not deleting the
	temporary directory.
	- usage(): Move all development options on a section of its own.
	- Move the test of rudimentary shell functionality at the
	beginning of the script.  Add test on `sed'.
	- Follow this by the debug section.  The determination of all
	--debug* options can be done without a function.

	* groffer.man: Revise information on --debug and add new options.

	### variables

	* groffer.sh:
	- $_ERROR: Move the definition of this variable here.
	- $_GROFF_VERSION: New variable, is set over @@...@@ construct.
	- $_OUTPUT_FILE_NAME: Move this variable to groffer2.sh.

	* groffer2.sh:
	- $_MAN_AUTO_SEC_LIST: Rename $_MAN_AUTO_SEC because it represents
	a list.
	- $_MAN_AUTO_SEC_CHARS: New read-only variable for storing
	$_MAN_AUTO_SEC_LIST in [] construct.  Use it in man_do_filespec()
	and whatis_filename().
	- $_SPACE_CASE: New read-only variable with [] on space characters
	with \ for `case' patterns.  Use it in several functions.
	- $_SPACE_SED: New read-only variable with [] on space characters
	for `sed'.  Use it in several functions.

	### options and display

	* groffer2.sh:
	- list_from_cmdline(): Add test whether the same abbreviation is
	part of long options with and without arguments.  Give handling of
	`=' a `case' pattern of its own.
	- main_display(): Remove unnecessary calls of `clean_up' in order
	to use `mozilla' without problems.  In _do_display(): Fix -X by
	providing a different process when $_DISPLAY_PROG is empty.
	- main_set_mode(): Accept options for viewers as is, without check
	for program.  Add test whether no program is given for a mode.
	This avoids unnecessary empty $_DISPLAY_PROG in main_display().

	### viewer programs that run on the terminal (tty); new options

	* groffer2.sh:
	- $_VIEWER_TERMINAL: New variable that stores whether a viewer was
	supposed to run on tty.
	- --dvi-viewer-tty, --html-viewer-tty, --pdf-viewer-tty,
	--ps-viewer-tty, --tty-viewer-tty, --X-viewer-tty, --x-viewer-tty,
	--www-viewer-tty: New options for viewers that run on a terminal.
	- main_parse_args(), _do_display() of main_display(): Use the new
	options and the new variable.
	- usage(): Add the new options.

	* groffer.man: Add information on options --*-viewer-tty.

	### other fixes

	* groffer2.sh:
	- _do_display() of main_display(): Bear errors of `groff' run.
	- is_not_file: Fix to have exactly one argument.
	- is_not_prog(): Handle no arguments.
	- list_has_not(): Fix.
	- main_do_fileargs(): Remove $mdfa_exitcode.
	- register_title(): Limit title to 4 elements.
	- version(): Print the version information to standard output just
	like `groff' does.
	- --no-special: New option to disable former calls of `--all',
	`--apropos*', and `whatis.
	- --title: Make it an option with argument.
@
text
@a10 3
- Optimize `man' path determination in manpath_add_lang_sys() for speed
  by building-up the `man' path only by and by as far as necessary
  (not trivial).
d12 1
a12 1
  script in C/C++.
d28 1
a28 1
Last update: 16 August 2005
@


1.14
log
@

* release of groffer 0.9.21

### @@...@@ constructs

* groffer.sh:
- $_AT: New variable for `@@'.
- @@...@@: Replace the @@...@@ constructs by variables _AT_..._AT.
These constructs are transformed by `make' to useful information.
Keep all of these constructs in the first part of groffer.sh.  For
a run before a `make' call, the script sets these variables to
special values for testing purpose.
- $_GROFFER_LIBDIR: Variable pointing to the groffer library
directory @@libdir@@/groff/groffer.

### Configuration files

* groffer.sh:
- Add test for `$()' construct.
- Read and transform the configuration files and execute the
emerging commands.  The `sed' script was heavily enlarged to
handle line with spaces and quotes.  The emerging script is now
called by `eval', so no temporary file is needed.
- $_CONF_FILE_ETC, $_CONF_FILE_HOME: New variables for the config
files.
- $_SQ, $_SP: Move variables for characters before the handling of
the configuration files.  Rename $_SQUOTE to $_SQ and $_SPACE to
$_SP.
- $GROFFER_OPT: Remove cleaning of this variable before the
reading of the configuration files.

* groffer2.sh:
- main_init(): Remove the getting of the configuration files.

### Rewrite the shell determination

* groffer.sh:
- Get rid of all functions in `groffer.sh'.  Rewrite the shell
determination with `` and $().
- --shell: Shortest abbreviation is `--sh'.  Allow arguments for
the shell name.
- Allow an empty argument for --shell as shell name to overwrite a
specified shell; an empty shell name gets back to the default
shell.
- The shell determination now inludes the full handling of the
config files.  The `--shell' option needs no longer a line
starting with `-'.

### Test of unset

* groffer.sh:
- Remove test of `unset'.
- Remove all calls of `unset'.
- Use one character names for all variables that are meant to be
local in this script.

* groffer2.sh:
- Move the test of `unset' to the testing of rudimentary shell
functionality without change.

        ### Allow abbreviations for long options

* groffer2.sh:
- list_has_abbrev(): New function for checking a list having an
element with a given abbreviation.
- list_get_single_from_abbrev(): New function to retrieve the
element having a given abbreviation.
- list_from_cmd_line(): For an option abbreviation determine the
corresponding long option.
- From the man option lists remove the elements that are also in
a groffer list.
- Allow abbreviation for the early test of --debug.

* groffer.sh: Allow abbreviation for the early test on --shell.
- get_opt_shell(): Rewrite _get_opt_shell() and the shell test
around it.
- test_on_shell(): Rename function _test_on_shell().
- $_SHELL: global variable for the shell to run groffer2.sh.

### Get rid of `sh -c'

* groffer2.sh:
- main_display(), _do_display(): Remove the `sh -c' calls.  Make
the cleanup working without it.
- _do_display(): Extend _do_display() such thatit can be used for
the pdf mode as well.
- _make_pdf(): New subfunction of main_display() for running the
additional parts of pdf mode in _do_display().
- rm_file(), rm_file_with_debug(), rm_tree(): New functions for
removing files and directories.

### Change directory

* groffer2.sh:
- $_START_DIR: New variable to store the directory at the starting
time of the script.
- main_display(): Go to the groffer temporary directory to be able
to process internal `groff' data like pictures.
- clean_up(): Get back to the starting directory.

### Compatibility with strange shells

* groffer2.sh:
- clean_up(): `zsh' and `posh' had difficulties with `eval'.
- is_*(): Add test on empty argument.  Some shells return true on
`test -d' etc. with empty argument, while most shells return
false.
- echo1(); New function to print single line `cat <<EOF'.  Replace
all `echo x' by `echo1'.
- list_has_abbrev(), list_from_cmdline(): Correction.
- main_parse_MANOPT(): Repair and revise.
- --do-nothing: New option without output (for development).
- Rewrite rudimentary shell functionality near the beginning of
the script.

* groffer.sh, groffer2.sh:
- Remove `;' after the commands `if', `while', and `until'.

### Debugging information

* groffer2.sh:
- $_DEBUG_PRINT_PARAMS: New variable for printing all parameters
from the config files, $GROFFER_OPT, and command line after they
have been transformed.
- $_DEBUG_PRINT_SHELL: New variable for printing the name of the
shell found in groff.sh.
- main(): Move the landmarks of main-*() into main().

### Further checks and additions

* groffer.sh, groffer2.sh:
- $_PROGRAM_NAME: Replace this variable by `groffer'.  The program
name is now stable.
- $_GROFFER_RUN: Remove this variable.  As `groffer.sh' or
`groffer' is no longer rerun, this variable is not necessary any
more.

* groffer2.sh:
- main_set_resources(): Make the default viewers capable to use
arguments in the list.
- leave(): Add an argument for given exit code.  Use it where
suitable in main_*().
- do_filearg(): Add error messages for non-existing files and man
pages.
- _do_opt_V(): New subfunction of main_display() to handle the
output for option `-V'.  `groff -V' is greatly enlarged by
`groffer' specific information.
- register_title(): Handle file names with spaces.  Replace spaces
by `_'.
- is_existing(): Add `test -c' for special files.
- usage(): Add `=arg' to the options with an argument.  Add option
`--tty-viewer'.
- kghostview: In the default viewer list, add option
`--scale=1.45'.
- $_OPTS_CMDLINE_SHORT_NA: Correct a lacking space.

* Makefile.sub: Repair the installation instructions for
groffer2.sh.

* groffer.man:
- Add paragraph on option handling.
- Add option `--do-nothing'.
- Reorder option for development and `groff'.
- Rewrite documentation for option `-V'.
- Expand `--shell'.
- Reformulate sections CONFIGURATION FILES, COMPATIBILITY and SEE
ALSO.
- Make `man' italic where possible.
- .copyleft: Adjust the fonts.

* README: Update sections `Output' and `Compatibility'.

* README_SH:
- Add `mksh' as compatible shell.
- Add information on the scripts after the split.

* TODO: Remove some fulfilled parts.

* ChangeLog: Remove final spaces.
@
text
@a9 5
- Make --apropos-* options without arguments, based on all filespecs.
  Transform the output into a `groff' file and have it viewed; maybe
  also for --version and -V.
- Make --whatis a breaking option and its output a good man-page.

d31 1
a31 1
Last update: 2 August 2005
@


1.13
log
@

* release of groffer 0.9.18

* groffer.sh: further shell compatibility
- `echo': Remove options and possible options of `echo' by
preceding the argument with a character `x' that is removed by
`sed' or replace `echo' by `cat <<EOF'.  `echo -n' seems to be not
portable, so it is omitted.
- `for': Remove `;' from within `for' (because of ksh).
- `ls': Old UNIX systems echoed the error message to standard
output.  So handle the output with `sed'.  If the output contains
`not found' map it to an empty string.
- `true': Replace `true' by command `:'.  Remove test of `true'
(because `ash' refuses the redefinition of builtins even in an
unreachable `if' branch).
- `false': Remove test of `false'; it isn't used any more.
- `test': As `test -e' does not exist in Solaris 2.5 replace it by
`test -f || test -d'.
- `unset': `unset' is said to be not portable.  As `ash' protests
against the definition of the function `unset()' in the test of
`unset' replace the test by defining `$unset' to `unset' if it
exists and to `:' otherwise.  Use `eval $unset' instead of the
direct command `unset'.
- _get_opt_shell(): Replace `for' loop with `shift' by `while'.
- man_search_section(): Replace `for f in filename*' by a test on
the existence of `filename*'.
- `zsh' interprets `$...' as `"$..."'.  So `eval' must be called;
This cannot be used in `for i in $f', so it must be rewritten as
`for i in $(eval set x $f; shift; echo "$@@")'

* groffer.sh:
- `--X', `--x', `--mode=X', `--mode=x': Make these options
equivalent to chosing an X device by setting `-TX75-12'.  `-X' is
still equivalent to `groff -X'.
- main_init(): Choose the name of the temporary file by adding a
number using `expr' if it exists and cannot be removed.
- main_parse_args():Repair some options by replacing `$mpa_mode'
by `$_OPT_MODE'.
- catz(): Rename it to cat_z() to avoid problem with existing
programs.
- where(): Rename to where_is().
- $_CONFFILES: Rename to $_CONF_FILES.
- $_HAS_BZIP: export and preset it.

* groffer.man:
- Document the `X mode' changes.
- Add `@@g@@' to `troff'.

* README, README_SH, TODO:
- Add date line `Latest update:'.
- Add `...' quoting to essential terms.
- Add Emacs mode at the end.

* README_SH:
- Add documentation on the above compatibility changes.
- Add documentation on used commands.
- Mention the tested shells.

* Makefile.sub:
Readd `@@g@@'.
@
text
@d9 5
a13 4
- Revise the `--all' feature to better reflect GNU `man'.
- The debug function stack is buggy (no effect on normal operation).
- Check main_parse_MANOPT(), not too important.
- Add long option shortcuts.
a20 2
- Split the `groffer.sh' shell script into several files for better
  tests of the shell compatibility.
d26 4
a29 4
- Improve the documentation of the search algorithm for man pages in
  both the `groffer' script and the man page `groffer.man'.
- In `groff.man', add more documentation for parts that were taken over
  from GNU `man'.
d31 1
a31 1
  `groffer.sh' needs to be updated.
d36 1
a36 1
Last update: 30 June 2005
d41 1
a41 1
This file is part of groffer, which is part of groff.
d43 1
a43 1
groff is free software; you can redistribute it and/or modify it
d48 1
a48 1
groff is distributed in the hope that it will be useful, but WITHOUT
d54 2
a55 2
along with groff; see the files COPYING and LICENSE in the top
directory of the groff source.  If not, write to the Free Software
@


1.12
log
@

* All affected files: Update postal address of FSF.
@
text
@d9 1
a9 1
- Revise the `--all' feature to better reflect GNU man.
a12 3
- The actual replacement `dash' of the POSIX `ash' shell produces
  strange errors with the groffer script, while the former `ash'
  worked successfully.  Are these errors just bugs of `dash'?
d15 2
a16 2
- Optimize man path determination in manpath_add_lang_sys() for speed
  by building-up the man path only by and by as far as necessary
d18 4
a21 4
- To increase the running speed write part of the groffer shell script
  in C/C++.
- Split the groffer.sh shell script into several files for better tests
  of the shell compatibility.
a24 1
- `gxditview' needs a complete shower.
d28 1
a28 1
  both the groffer script and the man page `groffer.man'.
d37 3
a39 1
Copyright (C) 2003,2004 Free Software Foundation, Inc.
d58 7
@


1.11
log
@

* release of groffer 0.9.10

* groffer.sh:
- Remove automatic call of `ash' due to inconsistencies of
different ash versions.
- In the first run, add recognition of `--shell' lines in the
groffer configuration files.  To configure an external shell in
a configuration file, a line starting with `--shell' is
necessary.
- list_from_cmdline(): Simplify the arguments.
- As $POSIXLY_CORRECT is internally set to `y' by some GNU
`/bin/sh' shells the following 2 fixes are necessary:
-- `sed': Empty patterns are not allowed with $POSIXLY_CORRECT
set; so move the address information before the `s' command to the
pattern after the command, and write `.*' to the address field.
-- list_from_cmdline(): Remove the strange $POSIXLY_CORRECT style
to finish the option processing after the first non-option
argument; use the flexible GNU mixing of options and file names
instead.

* groffer.man:
- Remove any hints on `ash'.
- Add minus line behavior of `--shell' for configuration and add a
corresponding example.
- Update the information on $POSIXLY_CORRECT.
@
text
@d59 1
a59 1
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@


1.10
log
@

Update to groffer 0.9.7.
@
text
@d8 9
d26 1
a26 1
Features:
a28 4

Revision:
- Revise the `--all' feature to better reflect GNU man.
- The debug function stack is buggy (no effect on normal operation).
@


1.9
log
@
* release of groffer 0.9.4

* groffer.sh: corrections for some restrictive shells
- Possible exit codes in actual `ash' are between 0 and 63.  To
handle even deeper restrictions, use 7 as maximal code instead
of 255 as replacement for error -1.
- Remove variables $_BAD2 and $_BAD3.
- Replace `trap' argument `EXIT' by 0 and write new fuctions
`trap_clean' and `trap_set' to handle the restrictions of `trap'
for some shells.
- Correct wrong $MANPATH to $_MAN_PATH in function
`man_do_filespec'.
- Test existence of directory before deleting it in the
`clean_up' definitions.
- Correct help output in `usage' (called by `--help').

* TODO:
Remove mention of `shoop' and `apropos'.
@
text
@d1 1
a1 1
# TODO file for `groffer'
d3 1
a3 1
# File position: <groff-source>/contrib/groffer/TODO
a4 1
# Last update: 22 Jan 2003
d6 1
a6 23
# Copyright (C) 2001,2002,2003 Free Software Foundation, Inc.
# Written by Bernd Warken <bwarken@@mayn.de>

# This file is part of groff.

# groff is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# groff is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
# License for more details.

# You should have received a copy of the GNU General Public License
# along with groff; see the file COPYING.  If not, write to the
# Free Software Foundation, 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.

########################################################################

TODO
d14 2
a21 1
- Should there be a native implementation for `--apropos'?
a23 3
- The actual `groff' and `grog' do not support file arguments each
of which has a different macro package (except `man' and `doc').  So
`roffer' should create several display files for such arguments.
d32 23
@


1.8
log
@
* groffer.sh: new temporary subdirectory
- Generate temporary subdirectory for storing temporary files
with better names in future groffer versions (name:
"groffer$$" in usual temporary directory).
- Use `umask 000' for temporary files to allow cleaning up
for everyone after a system break.
- Change both clean_up() functions (for normal shell and
for main_display() subshell) to handle the new subdirectory.
- clean_up_secondary() and $_TMP_PREFIX are unnecessary now, so
they were removed.

* Makefile.sub: `sed' commands for "groffer:"
- Remove "@@g@@" entry (not used in "groffer.sh").
- Add global replace for "@@BINDIR@@" and "@@VERSION@@" for future
usage.

* TODO: think about...
- writing part of groffer in C/C++.
- handling several files with different macro packages.
@
text
@d5 1
a5 1
# Last update: 17 October 2002
d7 1
a7 1
# Copyright (C) 2001,2002 Free Software Foundation, Inc.
a38 1
- Consider using the `shoop' package (OOP for `sh').
@


1.7
log
@
* fixes of groffer 0.9.2

* groffer.sh:
Terminate main_parse_MANOPT() if $MANOPT is empty or consists
of space characters only.

* groffer.man: some fixes in "GROFFER OPTIONS"
- New macro ".Header_CB" for CB font in .TP headers; used for
definition of variables in option --mode.
- Fix some option references to refer to long options.

* README:
New file for general information on the groffer source; it is
not installed.
@
text
@d47 3
@


1.6
log
@
* groffer.sh: replace `sed' interface by direct `sed'
- This improves the performance of the shell programming parts
  and shortens the groffer script by about 5%.
- Remove functions: string_del_append(), string_del_leading(),
  string_del_trailing(), string_flatten(), string_get_before(),
  string_get_leading(), string_replace_all(), string_sed_s(),
  and their auxiliary functions.
- Replace all calls of these functions by direct `sed' commands.
- Define variables for special characters to ease `sed' calls.
- Remove `$APPEND'.
- Restrict list_from_string() to single character separators.
- Correct list_check() and base_name().
- Add comments to all calls of `sed'.

* groffer.sh: add run-time support for several shells
- New option `--shell': stop execution and rerun groffer under
  the shell specified in the argument of `--shell'.
- If no shell was specified at run-time, `ash' is tried first;
  if `ash' is not available continue with the shell with which
  groffer was called from the command line, or with the shell
  name in the first line of the script, actually `/bin/sh'.
@
text
@d5 1
a5 1
# Last update: 30 Sep 2002
d35 2
a48 1
- Write a README file.
@


1.5
log
@
* groffer.sh: enhance version information
`groffer -v|--version' now print:
- groffer's version number and date
- the string `is part of '
- groff's version information (version number and copyright),
  but not groff's `called subprograms' information.

* groffer.sh: minor fixes
- Fix the argument parser to process argument `-' correctly.
- Some display programs have trouble with empty input; feed a
  line consisting of a single space character in this case for
  all display modes (not for source or groff modes).

* TODO:
fix entry for `shoop'.
@
text
@d5 1
a5 1
# Last update: 12 July 2002
a39 1
- Write an interface for choosing between different calling shells.
a43 4
- string_sed_s() has trouble with arguments that have embedded quotes,
  but it is good enough for the script so far.
- Consider to replace string_sed_s() and friends in favor of native sed
  commands or to write suitable C++ utils.
@


1.4
log
@
* release of groffer 0.9.0

* groffer.sh: new mode `pdf'
- PDF (Portable Document Format):
  -> Transform groff `ps' output into pdf using `gs'.
  -> Pro: PDF viewers provide text searching (!).
  -> Con: the transformation is quite slow.
  -> Not suitable as an auto mode.
- New options `--pdf', `--pdf-viewer', `--mode pdf'.
- Standard pdf viewers `xpdf' and `acroread'.
- For `xpdf', choose zoom `z 3' for 100 dpi, `z 2' for 75 dpi.

* groffer.sh: support bzip2 decompression
- add test for `bzip2' with necessary options
- extend functions `catz()' and `save_stdin()'.

* TODO
remove entry on `bzip' decompression (done).

* groffer.man:
- Document new `pdf' features.
- Document new `bzip2' decompression.
- Fix documentation for `--auto-modes'.

* groffer.sh: minor fixes
- Improve device tests in `tty' and `dvi' modes.
- Internally, map mode `auto' to '' to facilitate tests.
- Fix auto mode sequence to: `ps,x,tty' as was intended.
@
text
@d5 1
a5 1
# Last update: 27 June 2002
d37 1
a37 1
- Consider using `shopt' (OOP for `sh').
@


1.3
log
@
* groffer.sh:
Fix `source' mode.

* groffer.man:
Fix some indentations.
@
text
@d5 1
a5 1
# Last update: 25 June 2002
a36 1
- Support for bzip.
@


1.2
log
@
* release of groffer 0.8

* Makefile.sub: add copyright section

* groffer.man:
- Document the new options.
- Revise the documentation of the modes.
- Document the configuration files in new section `FILES'.
- Redesign section `EXAMPLES'.
- Remove documentation for `-W'.

* groffer.sh: new debugging features
- Disabled by default; enabled by environment variables.
- Add landmark() to catch typos with quotes.
- Add a function call stack for suitable functions; implemented
  as within the argument checker func_check().
- This implies the need to provide `return' with some clean-up
  facility; implemented as `eval "$_return_..."'.
- Add option `--debug' to enable debugging at run-time.
- Actually, the groffer script uses only shell builtins found
  in `ash' (a subset of POSIX) and POSIX `sed' as the only
  external shell utility.

* groffer.sh: customization of viewers
- In `groff' mode, the groffer viewing facilities are disabled.
- The postprocessor option `-P' costumizes the viewer only in
  some situations in the `groff' mode, so a new infrastructure
  for viewer customization is necessary.
- Allow to specify arguments to the viewer programs specified
  in `--*-viewer()'.
- Implement some of the essential X Toolkit resource options in
  groffer, but with use a leading double minus.
  -> `--bd': set border color.
  -> `--bg', `--background': set background color.
  -> `--bw': set border width.
  -> `--display': set X display.
  -> `--geometry': set size and position of viewer window.
  -> `--fg', `--foreground': set foreground color.
  -> `--ft', `--font': set font.
  -> `--resolution': set X resolution in dpi.
  -> `--title': set viewer window title.
  -> `--xrm': set X resource.
- Remove misnamed option `--xrdb'.

* groffer.sh: new mode structure
- New Postcript mode `ps' (`--ps'):
  -> default viewers: gv,ghostview,gs_x11,gs;
  -> `--ps-viewer' sets the Postscript viewer.
- New mode `www' (`--www') for displaying in a web browser:
  -> default browsers: mozilla,netscape,opera,amaya,arena;
  -> `--www-viewer' sets the web browser.
- New dvi mode (`--dvi'); default viewer `xdvi':
  -> default viewers: xdvi,dvilx;
  -> `--dvi-viewer' sets the dvi viewer.
- New mode `auto':
  -> active if no other mode is given or by new option `--auto';
  -> selects from a sequence of modes that are tested until one
    of them succeeds.
  -> the default mode sequence is actually `ps', `x', `tty'.
  -> `--default-modes' sets this mode sequence as a comma
     separated string of program names, optionally each one
     with arguments).
- New mode `groff':
  -> process input like groff, ignore viewing options.
  -> activated by new option `--groff'.
  -> automatically active with one of `-V', `-X', `-Z'.
- Revise `tty' mode:
  -> allow several text devices.
  ->
- Reorganize the mode management:
  -> new mode setting option `--mode'.
  -> logically separate source, groff, and display modes.
  -> intermediate output mode is now part of mode groff; remove
     any special features around `-Z'.
- Update usage() to reflect the new option structure.

* groffer.sh: add configuration files
- `/etc/groff/groffer.conf' system-wide configuration.
- `${HOME}/.groff/groffer.conf' user configuration.
- The configuration file are shell scripts for now; later
  implementations can identify this from the `#! /bin/sh' line.

* groffer.sh: new data structure `list':
- Implement a `list' data structure as a string consisting of
  single-quoted elements, separated by a space character;
  embedded single-quotes are escaped.

* groffer.sh: new option parser based on `list':
- Write new option parser based on `list', compatible to both
  POSIX getopts() and GNU getopt().
- Long options are now available on GNU and non-GNU systems.
- Get rid of POSIX getopts() and GNU getopt().
- the `-W--longopt' construct is now obsolete; remove it.
- add test/function for `unset'.
- Option strings are now implemented as `list's in order to
  allow unusual characters in options.
- Parse $MANOPT first; translate essential arguments into
  groffer options.

* groffer.man:
- determine prompt length for `.Shell_cmd'* dynamically.
- naming scheme for static strings and registers changed to
  `namespace:macro.variable'.

* groffer.sh:
Implement man option `--ascii' by `-mtty-char'.
@
text
@d5 1
a5 1
# Last update: 23 June 2002
d41 1
d50 1
@


1.1
log
@
New file.
@
text
@d5 1
a5 1
# Last update: 31 May 2002
d32 3
a34 1
- Optimize for speed (`case' instead of `sed' interface?).
d37 4
a40 3
- For each postprocessor, register its options for checking against -P.
  Maybe this should rather be done within groff.
- Support bzip.
d45 4
d52 2
a53 2
- Document the search algorithm for man pages in both the `groffer.sh'
script and the man page `groffer.man'.
d55 3
a57 3
from GNU `man'.
- Some documentations for function definitions in `groffer' need an
update.
@

