* contrib/groffer/Makefile.sub (install): Reference groffer2.sh
[s-roff.git] / contrib / groffer / ChangeLog
blob94a99c14642c5438a1b69cc0aa7ac4811c5c144a
1 2005-08-07  Keith Marshall  <keith.d.marshall@ntlworld.com>
3         * contrib/groffer/Makefile.sub (install): Reference groffer2.sh
4         as $(srcdir)/groffer2.sh, so it will install when building in a
5         different directory from the source.
7         ________________________________________________________________
9         * release of groffer 0.9.21
11 2005-08-02  Bernd Warken
13         ### @...@ constructs
15         * groffer.sh:
16         - $_AT: New variable for `@'.
17         - @...@: Replace the @...@ constructs by variables _AT_..._AT.
18         These constructs are transformed by `make' to useful information.
19         Keep all of these constructs in the first part of groffer.sh.  For
20         a run before a `make' call, the script sets these variables to
21         special values for testing purpose.
22         - $_GROFFER_LIBDIR: Variable pointing to the groffer library
23         directory @libdir@/groff/groffer.
25         ### Configuration files
27         * groffer.sh:
28         - Add test for `$()' construct.
29         - Read and transform the configuration files and execute the
30         emerging commands.  The `sed' script was heavily enlarged to
31         handle line with spaces and quotes.  The emerging script is now
32         called by `eval', so no temporary file is needed.
33         - $_CONF_FILE_ETC, $_CONF_FILE_HOME: New variables for the config
34         files.
35         - $_SQ, $_SP: Move variables for characters before the handling of
36         the configuration files.  Rename $_SQUOTE to $_SQ and $_SPACE to
37         $_SP.
38         - $GROFFER_OPT: Remove cleaning of this variable before the
39         reading of the configuration files.
41         * groffer2.sh:
42         - main_init(): Remove the getting of the configuration files.
44         ### Rewrite the shell determination
46         * groffer.sh:
47         - Get rid of all functions in `groffer.sh'.  Rewrite the shell
48         determination with `` and $().
49         - --shell: Shortest abbreviation is `--sh'.  Allow arguments for
50         the shell name.
51         - Allow an empty argument for --shell as shell name to overwrite a
52         specified shell; an empty shell name gets back to the default
53         shell.
54         - The shell determination now inludes the full handling of the
55         config files.  The `--shell' option needs no longer a line
56         starting with `-'.
58         ### Test of unset
60         * groffer.sh:
61         - Remove test of `unset'.
62         - Remove all calls of `unset'.
63         - Use one character names for all variables that are meant to be
64         local in this script.
66         * groffer2.sh:
67         - Move the test of `unset' to the testing of rudimentary shell
68         functionality without change.
70         ### Allow abbreviations for long options
72         * groffer2.sh:
73         - list_has_abbrev(): New function for checking a list having an
74         element with a given abbreviation.
75         - list_get_single_from_abbrev(): New function to retrieve the
76         element having a given abbreviation.
77         - list_from_cmd_line(): For an option abbreviation determine the
78         corresponding long option.
79         - From the man option lists remove the elements that are also in
80         a groffer list.
81         - Allow abbreviation for the early test of --debug.
83         * groffer.sh: Allow abbreviation for the early test on --shell.
84         - get_opt_shell(): Rewrite _get_opt_shell() and the shell test
85         around it.
86         - test_on_shell(): Rename function _test_on_shell().
87         - $_SHELL: global variable for the shell to run groffer2.sh.
89         ### Get rid of `sh -c'
91         * groffer2.sh:
92         - main_display(), _do_display(): Remove the `sh -c' calls.  Make
93         the cleanup working without it.
94         - _do_display(): Extend _do_display() such that it can be used for
95         the pdf mode as well.
96         - _make_pdf(): New subfunction of main_display() for running the
97         additional parts of pdf mode in _do_display().
98         - rm_file(), rm_file_with_debug(), rm_tree(): New functions for
99         removing files and directories.
101         ### Change directory
103         * groffer2.sh:
104         - $_START_DIR: New variable to store the directory at the starting
105         time of the script.
106         - main_display(): Go to the groffer temporary directory to be able
107         to process internal `groff' data like pictures.
108         - clean_up(): Get back to the starting directory.
110         ### Compatibility with strange shells
112         * groffer2.sh:
113         - clean_up(): `zsh' and `posh' had difficulties with `eval'.
114         - is_*(): Add test on empty argument.  Some shells return true on
115         `test -d' etc. with empty argument, while most shells return
116         false.
117         - echo1(); New function to print single line `cat <<EOF'.  Replace
118         all `echo x' by `echo1'.
119         - list_has_abbrev(), list_from_cmdline(): Correction.
120         - main_parse_MANOPT(): Repair and revise.
121         - --do-nothing: New option without output (for development).
122         - Rewrite rudimentary shell functionality near the beginning of
123         the script.
125         * groffer.sh, groffer2.sh:
126         - Remove `;' after the commands `if', `while', and `until'.
128         ### Debugging information
130         * groffer2.sh:
131         - $_DEBUG_PRINT_PARAMS: New variable for printing all parameters
132         from the config files, $GROFFER_OPT, and command line after they
133         have been transformed.
134         - $_DEBUG_PRINT_SHELL: New variable for printing the name of the
135         shell found in groff.sh.
136         - main(): Move the landmarks of main-*() into main().
138         ### Further checks and additions
140         * groffer.sh, groffer2.sh:
141         - $_PROGRAM_NAME: Replace this variable by `groffer'.  The program
142         name is now stable.
143         - $_GROFFER_RUN: Remove this variable.  As `groffer.sh' or
144         `groffer' is no longer rerun, this variable is not necessary any
145         more.
147         * groffer2.sh:
148         - main_set_resources(): Make the default viewers capable to use
149         arguments in the list.
150         - leave(): Add an argument for given exit code.  Use it where
151         suitable in main_*().
152         - do_filearg(): Add error messages for non-existing files and man
153         pages.
154         - _do_opt_V(): New subfunction of main_display() to handle the
155         output for option `-V'.  `groff -V' is greatly enlarged by
156         `groffer' specific information.
157         - register_title(): Handle file names with spaces.  Replace spaces
158         by `_'.
159         - is_existing(): Add `test -c' for special files.
160         - usage(): Add `=arg' to the options with an argument.  Add option
161         `--tty-viewer'.
162         - kghostview: In the default viewer list, add option
163         `--scale=1.45'.
164         - $_OPTS_CMDLINE_SHORT_NA: Correct a lacking space.
166         * Makefile.sub: Repair the installation instructions for
167         groffer2.sh.
169         * groffer.man:
170         - Add paragraph on option handling.
171         - Add option `--do-nothing'.
172         - Reorder option for development and `groff'.
173         - Rewrite documentation for option `-V'.
174         - Expand `--shell'.
175         - Reformulate sections CONFIGURATION FILES, COMPATIBILITY and SEE
176         ALSO.
177         - Make `man' italic where possible.
178         - .copyleft: Adjust the fonts.
180         * README: Update sections `Output' and `Compatibility'.
182         * README_SH:
183         - Add `mksh' as compatible shell.
184         - Add information on the scripts after the split.
186         * TODO: Remove some fulfilled parts.
188         * ChangeLog: Remove final spaces.
190         ________________________________________________________________
191         * release of groffer 0.9.20
193 2005-07-30  Bernd Warken
195         ### Split groffer.sh into two files groffer.sh and groffer2.sh.
197         * groffer.sh:
198         - Remove the second part of this script.  It is now in
199         groffer2.sh.
200         - $_GROFFER2_SH: New variable to point to the installed position
201         of `groffer2.sh'.  This position is presented using @libdir@.
203         * groffer2.sh: New script containing the second part of
204         groffer.sh. This script will be installed in the groffer library
205         directory @libdir@/groff/groffer, this might be
206         /usr/local/lib/groff/groffer/groffer2.sh for example.
208         * Makefile.sub:
209         - `groffer': Add replacement of @libdir@.
210         - `install_data': Add the installation of the groffer library
211         directory and groffer2.sh.
212         - `uninstall_sub': Delete the installed `groffer2.sh' and the
213         groffer library directory.
215         * README_SH:
216         - Remove the function list.
217         - Add argument options to the list of used commands.
218         - Documentation of the splitting of the script.
219         - Document the possible abbreviation of options.
221         ________________________________________________________________
222         * release of groffer 0.9.19
224 2005-07-07  Bernd Warken
226         * groffer.sh: extensions
227         - `mode x': Mode for the equivalent options `--x', `--mode x',
228         `--X' `--mode X', and the default mode.  The default assumes a
229         resolution of 75 dpi.  The default device for a resolution of 75
230         dpi is `X75-12', the default device for a resolution of 100 dpi is
231         `X100'.  The default geometry for the resolution of 100 dpi is set
232         to the width 800 dpi.
233         - `mode X': New mode for option -X only.
234         - `-V': Extent the `groff' output of -V by `groffer' specific
235         information (in main_display()).
236         - register_file(): Replace title `-' by `stdin'.
237         - $_DEBUG_KEEP_FILES: If set to `yes' the files in the temporary
238         directory are not deleted before the end trap.
240         * groffer.sh: get `zsh' to work as well
241         - tmp_create(): Use `: >file' for generating an empty file.
242         - rmdir: Replace `rmdir' by `rm -f -r'.
243         - eval: Add `eval' to many commands with variable arguments.
245         * groffer.sh: repair `debug'
246         - Print all debug output to stderr.
247         - $_FUNC_STACK: Built function call stack even when $_DEBUG is not
248         set.  Now the arguments are not added.
249         - $_DEBUG: If set to `yes' print 3 call stack events: the function
250         that is added with its arguments is printed with `+++ '
251         (func_push()); the call stack after the addition is printed with
252         `>>> ' (func_push()); the call stack after the removing is printed
253         with `<<< ' (func_pop()).
254         - error(): Always print the function call stack on errors.
256         * groffer.sh: Corrections
257         - $_groffer_run: Rename to $_GROFFER_RUN.
258         - $unset: Rename to $_UNSET.
259         - Repair test of `unset'.
260         - Repair test for `--shell'.  The script is now rerun under the
261         shell specified in the option argument.  This can increase the
262         speed.
264         * README_SH: `zsh' now works.
266         * groffer.man:
267         - Reformulate the information for the `groffer' specific details
268         of option `-V'.
269         - Add information on the debug process.
270         - Add information on the default devices in `x mode'.
271         - Minor corrections.
273         ________________________________________________________________
274         * release of groffer 0.9.18
276 2005-07-01  Bernd Warken
278         * groffer.sh: further shell compatibility
279         - `echo': Remove options and possible options of `echo' by
280         preceding the argument with a character `x' that is removed by
281         `sed' or replace `echo' by `cat <<EOF'.  `echo -n' seems to be not
282         portable, so it is omitted.
283         - `for': Remove `;' from within `for' (because of ksh).
284         - `ls': Old UNIX systems echoed the error message to standard
285         output.  So handle the output with `sed'.  If the output contains
286         `not found' map it to an empty string.
287         - `true': Replace `true' by command `:'.  Remove test of `true'
288         (because `ash' refuses the redefinition of builtins even in an
289         unreachable `if' branch).
290         - `false': Remove test of `false'; it isn't used any more.
291         - `test': As `test -e' does not exist in Solaris 2.5 replace it by
292         `test -f || test -d'.
293         - `unset': `unset' is said to be not portable.  As `ash' protests
294         against the definition of the function `unset()' in the test of
295         `unset' replace the test by defining `$unset' to `unset' if it
296         exists and to `:' otherwise.  Use `eval $unset' instead of the
297         direct command `unset'.
298         - _get_opt_shell(): Replace `for' loop with `shift' by `while'.
299         - man_search_section(): Replace `for f in filename*' by a test on
300         the existence of `filename*'.
301         - `zsh' interprets `$...'  as `"$..."'.  So `eval' must be called;
302         This cannot be used in `for i in $f', so it must be rewritten as
303         `for i in $(eval set x $f; shift; echo "$@")'
305         * groffer.sh:
306         - `--X', `--x', `--mode=X', `--mode=x': Make these options
307         equivalent to choosing an X device by setting `-TX75-12'.  `-X' is
308         still equivalent to `groff -X'.
309         - main_init(): Choose the name of the temporary file by adding a
310         number using `expr' if it exists and cannot be removed.
311         - main_parse_args():Repair some options by replacing `$mpa_mode'
312         by `$_OPT_MODE'.
313         - catz(): Rename it to cat_z() to avoid problem with existing
314         programs.
315         - where(): Rename to where_is().
316         - $_CONFFILES: Rename to $_CONF_FILES.
317         - $_HAS_BZIP: export and preset it.
319         * groffer.man:
320         - Document the `X mode' changes.
321         - Add `@g@' to `troff'.
323         * README, README_SH, TODO:
324         - Add date line `Latest update:'.
325         - Add `...' quoting to essential terms.
326         - Add Emacs mode at the end.
328         * README_SH:
329         - Add documentation on the above compatibility changes.
330         - Add documentation on used commands.
331         - Mention the tested shells.
333         * Makefile.sub:
334         Readd `@g@'.
336         ________________________________________________________________
337         * release of groffer 0.9.17
339 2005-06-23  Bernd Warken
341         * groffer.sh: get rid of `local' in functions (it is not POSIX)
342         - Replace local variables by variable names with a special prefix
343         that is an abbreviation of the corresponding function name (quasi-
344         local variables).
345         - Unset the quasi-local function variables before returning.
346         - _t_e_s_t_f_u_n_c_(): Remove tests for local and global
347         variables.
348         - Add quasi-local variables for saving the content of
349         single-character variables.
350         - Remove some unused local and global variables.
351         - Several variables were forgotten to make local.  They are now
352         made quasi-local.
354         * groffer.sh: other corrections
355         - $return_var: New function (after `eval') for an arbitrary
356         return value.
357         - obj*(): Add return modes.
358         - Rewrite tests for `true' and `false'.
359         - Add function names to error calls where it was forgotten.
360         - `for': Replace `for x in "$@"' by `for x'.
361         - `set': Replace `set -- ...' by `set x ...; shift'.
362         - `sed': Replace `\|.*|s|...|...|' by `s|...|...|'.
364         * README_SH:
365         - Add information on the removing of `local'.
366         - New section for non-POSIX shell restrictions.
368 2005-06-20 Keith Marshall
370         * README-SH: Information of `Portable shells' in info autoconf.
372         ________________________________________________________________
373         * release of groffer 0.9.16
375 2005-06-19  Bernd Warken
377         * groffer.sh: Place each `then', `else', and `do' on a line of its
378         own because some shells do not support the mixture mode.
380         * groffer.man: Add section `BUGS'.
382         * README_SH:
383         - Add compatibility information.
384         - Correct documentation for function arguments.
386 2005-06-18  Keith Marshall
388         * groffer.sh: $_NULL_DEV: Replace /dev/null by $_NULL_DEV which is
389         either /dev/null or NUL if /dev/null does not exist.
391 2005-06-17  Zvezdan Petkovic
393         * Makefile.sub: $(RM): Define it to `rm -f' because not all `make'
394         programs have it predefined.
396 2005-06-16  Bernd Warken
397         ________________________________________________________________
398         * release of groffer 0.9.15
400         * Makefile.sub:
401         - Use `$(RM)'.
402         - Use `sed -f $(SH_DEPS_SED_SCRIPT)'.
404 2005-05-20  Bernd Warken
405         ________________________________________________________________
406         * release of groffer 0.9.14
408         * groffer.man: correction of non-hyphenation
410 2005-05-17  Bernd Warken
411         ________________________________________________________________
412         * release of groffer 0.9.13
414         * groffer.sh:
415         - $_VIEWER_DVI: Add `kdvi'.
416         - $_VIEWER_PDF: Add `kghostview', `ggv', and `kpdf'.
417         - $_VIEWER_PS: Add `kghostview' and `ggv'.
418         - $_modefile: For the output file name, add extension .ps for ps
419         mode and .dvi for dvi mode.  This exists already for the html and
420         pdf modes.
421         - Update some parts of the documentation.
423         * README, README_SH:
424         - Move some parts on usage from README_SH to README.
425         - Reformulate several parts of both files.
427         * groffer.man: update
429 2005-05-14  Keith Marshall
431         * groffer.sh:
432         - first line: Add space to `#! /bin/sh'.
434 2004-11-15  Bernd Warken
435         ________________________________________________________________
436         * release of groffer 0.9.12
438         * groffer.sh:
439         - main_init(): Rewriting of the creation of the temporary
440         directory to ensure that it cannot be made writable apart from the
441         user.  If the directory already exists and cannot be removed then
442         append `X' to the directory name.
443         - is_non_empty_file(): fix it to use POSIX `test -s'.
444         - is_existing(): new function.
445         - POSIX `rm -f -r': use this in `clean_up()' and `main_init()'.
446         - `--macro-file': remove this unused long option.
447         - `-V', `--source', `--device': move these from groff options
448         to groffer options.
449         - `$_TMP_DIR_SUB': remove this unused variable.
451 2004-06-15  Bernd Warken
452         ________________________________________________________________
453         * release of groffer 0.9.11
455         * groffer.sh:
456         - To the search of the `--apropos-*' options, add man pages with a
457         subsection in their apropos output.
459 2004-06-02  Bernd Warken
460         ________________________________________________________________
461         * release of groffer 0.9.10
463         * groffer.sh:
464         - Remove automatic call of `ash' due to inconsistencies of
465         different ash versions.
466         - In the first run, add recognition of `--shell' lines in the
467         groffer configuration files.  To configure an external shell in
468         a configuration file, a line starting with `--shell' is
469         necessary.
470         - list_from_cmdline(): Simplify the arguments.
471         - As $POSIXLY_CORRECT is internally set to `y' by some GNU
472         `/bin/sh' shells the following 2 fixes are necessary:
473         -- `sed': Empty patterns are not allowed with $POSIXLY_CORRECT
474         set; so move the address information before the `s' command to the
475         pattern after the command, and write `.*' to the address field.
476         -- list_from_cmdline(): Remove the strange $POSIXLY_CORRECT style
477         to finish the option processing after the first non-option
478         argument; use the flexible GNU mixing of options and file names
479         instead.
481         * groffer.man:
482         - Remove any hints on `ash'.
483         - Add minus line behavior of `--shell' for configuration and add a
484         corresponding example.
485         - Update the information on $POSIXLY_CORRECT.
487 2004-05-29  Bernd Warken
488         ________________________________________________________________
489         * release of groffer 0.9.9
491         * groffer.sh:
492         Fix first run section to allow the starting shell to go on if
493         `ash' is not available.
495         * groffer.man:
496         Remove unnecessary information on groffer version.
498 2004-05-12  Bernd Warken
499         ________________________________________________________________
500         * release of groffer 0.9.8
502         * groffer.sh:
503         Fix problems of `test' by adding subs to arguments.
505         * groffer.man:
506         Write the file license as macros that are called in sections
507         AUTHOR and COPYING.
509         * .cvsignore:
510         Restore this file.
512 2004-04-30  Bernd Warken
513         ________________________________________________________________
514         * release of groffer 0.9.7
516         * groffer.sh:
517         - obj(), obj_data(), obj_from_output(), obj_set(): New object
518         oriented functions to minimize complicated `eval' commands.
519         - list_*(): Corrections.
520         - usage(): Streamlining.
522         * groffer.man, README_SH:
523         Corrections.
525 2004-04-27  Bernd Warken
526         ________________________________________________________________
527         * release of groffer 0.9.6
529         This version replaces the license of all files except ChangeLog of
530         the groffer source to the GNU General Public License (GPL) of the
531         version described in files COPYING and LICENSE in the groff top
532         source directory.
534         * groffer.man:
535         Changement from the GNU Free Documentation License (FDL) to
536         the GNU General Public License (GPL).
538         * README, README_SH, TODO:
539         Add license GNU General Public License (GPL).
541         * Makefile.sub, groffer.sh:
542         Keep the GNU General Public License (GPL), but refer to the
543         COPYING and LICENSE files.
545         * ChangeLog: Add a license in the style of Emacs ChangeLog file,
546         which is weaker than the GPL, but has its flavor.
548 2004-04-24  Bernd Warken
549         ________________________________________________________________
550         * release of groffer 0.9.5
552         This version is a rewrite of groffer in many parts, but it is kept
553         in the old single script style.
555         Overview of new options:
556         --text, --mode text, --tty-viewer,
557         --X, --mode X, --X-viewer, --html, --mode html, --html-view,
558         --apropos-data, --apropos-devel, --apropos-progs
560         New file:
561         <groffer-source>/README_SH
564         ******* Extension of the `apropos' handling
566         The output of man's `apropos' has grown immensely meanwhile, so it
567         has become inefficient.  Now `groffer' provides new options to get
568         the a selected information from this output.
570         * groffer.sh:
571         `--apropos-progs': new option for displaying only information
572         on programs (man page sections 1, 6, and 8)
573         `--apropos-data': new option for displaying only information
574         on documented data (man page sections 4, 5 and 7)
575         `--apropos-devel': new option for displaying only information
576         on development documentation (man page sections 2, 3 and 9)
577         `--apropos': still displays just the output of man's `apropos'
578         program.
579         - Specify all of these options as a single argument option; that
580         makes groffer's `--apropos' option slightly different because
581         the corresponding `man' option does not have arguments, but takes
582         all file arguments as apropos targets.  So just ignore the `man'
583         options `-k' and `--apropos' in the parsing of $MANOPT.
584         - Exit after processing one `apropos' call.
587         ******* Quasi object oriented function arguments
589         An object is the name of an environment variable.  The value of
590         this variable contains the object's content.  This allows to
591         specify function arguments and the calling syntax in a simpler way
592         by letting the first argument be a variable name, usable for input
593         or output.
595         Such an object type is `list', the string value of a shell
596         variable arranged in space-separated single-quoted elements, such
597         as $GROFFER_OPT internally.
599         * groffer.sh:
600         - Remove list_from_args(), list_element_from_arg()
601         list_from_lists(), list_length(), and list_prepend().
602         They can be replaced by list_append().
603         - All list*() functions are rearranged such that the first
604         argument is a list object, the name of a variable.
607         ******* Simplification of configuration files
609         The new syntax of the groffer configuration files is
610         - all lines starting with a `-' character are interpreted as
611         command line options for all calls of groffer; they are collected
612         and prepended to the actual value of $GROFFER_OPT; optional
613         spaces at the beginning.of the line are omitted.
614         - all other lines are interpreted as a shell command and executed
615         in the current shell of the groffer call.
617         Precedence:
618         - The command line and the external environment variables such as
619         $GROFFER_OPT of the groffer call have the highest precedence.
620         - This is overwritten by the configuration file in the user's home
621         directory.
622         - The system configuration file in /etc has the lowest
623         precedence.
625         * groffer.sh:
626         The configuration files are now called after the determination of
627         the temporary files in main_init().
630         ******* Script file name
632         The file name of the script is needed for the several calls during
633         the search for the optimal shell.
635         * groffer.sh:
636         - $_GROFFER_SH: replace $_this by $_GROFFER_SH and use $0 for
637         determining the file name of the script for the following calls,
638         instead of the cumbersome @BINDIR@ construction.
639         - Force the script to be called as an executable file, so $0 must
640         contain the program name.
643         ******* Improved temporary file names
645         Just like groff, groffer mixes all file parameters into a single
646         output file.  Its name is now constructed as a comma-separated
647         list built from the file name arguments without a leading comma.
648         So a leading comma can be used for the internal temporary file
649         names.
651         * groffer.sh:
652         - $_OUTPUT_FILE_NAME: new global variable as basis for the output
653         file name; it is set in main_set_resources().
654         - tmp_create(): use `,name' for temporary files different from
655         output file because the output file name does not start with a
656         comma.  `$$' is not needed anymore.
657         - main_display(): simplification of $_modefile in _do_display()
658         and single display modes.
659         - Add extension `.html' to output file name in html mode.
660         - base_name(): correction for strange positions of `/'.
663         ******* Mode fixes
665         * groffer.sh:
666         - Set the main default mode to `x' with groff's X Window viewer
667         `gxditview'.
668         - Allow 'x' and 'X' in `--mode' for the X Window mode; the same
669         for `--x' and `X', `--x-viewer' and `--X-viewer'.
670         - Make groff's `-X' equivalent to `mode X'.
671         - Fix `--auto', `--mode auto',  and `--default-modes'.
672         - `html' mode: new mode equivalent to `www', add `konqueror' and
673         `lynx' as viewers.
674         - `pdf' mode: fix zoom options for pdf-viewer `xpdf' in
675         main_set_resources(); in main_display() fix the display structure.
676         - Set default X Window resolution to 75dpi.  This is not optimal,
677         but with a higher value the options and resources for some viewers
678         must be optimized.
679         `--text' and `--mode text': new option for text output without a
680         pager.
681         - `--tty-viewer': new option equivalent to `--pager'.
682         - Correct the pagers for `tty' mode.
683         - Fix `groff' mode in main_set_resources() and main_display().
684         - Harmonize `--mode arg' with the equivalent options `--arg'.
687         ******* Fixes for command line options
689         * groffer.sh:
690         - list_from_cmdline(): fix the parsing of options with arguments.
691         - Rename $_OPT_TTY_DEVICE to $_OPT_TEXT_DEVICE.
692         - $_OPTS_X_*: new variables for the inhereted X Window variables.
693         - Improve the distribution of the command line options into
694         $_OPTS_GROFFER_*, $_OPTS_GROFF_*, $_OPTS_X_*, and $_OPTS_MAN_*.
695         - $_OPTS_MANOPT_*: new variables for the parsing of $MANOPT.
696         - Correct $_OPTS_CMDLINE_*.
697         - Remove some unused $_OPTS_*.
698         - `--iconic': new option from `-iconic' of the X Window toolkit.
699         - Correct `--rv' to an option without argument.
700         - Minor fixes of other  X Window toolkit options.
703         ******* Other fixes
705         * groffer.sh:
706         - is_prog(): allow 0 arguments.
707         - is_not_writable(): new function.
708         - is_*(): fix trailing return codes.
709         - Replace most `test' calls by is_*() functions.
710         - man_setup(): due to bugs in `manpath', prefer
711         manpath_set_from_path() for the determination of the man page path.
712         - man_search_section(): correction of some `for' loops.
713         - Remove export of external non-groffer variables.
716         ******* Documentation
718         * groffer.man:
719         - Reorder the option details according to the option origin as
720         groffer, groff, X, and man options.
721         - Add the programming changes information mentioned above.
722         - Support man pages with a dot in their name
724         * README_SH: new file
725         Move large parts of the documentation in `groffer.sh' into this
726         file.
728         * groffer.sh: usage():
729         - Change the output for `--help' to standard output.
730         - Restructure the information for this help output.
733         ******* Removement of the author's email address
735         Because of the extreme spam attacks, the author removed all
736         occurencies of his email address in every file of the groffer
737         source.
739 2003-01-22  Bernd Warken
740         ________________________________________________________________
741         * release of groffer 0.9.4
743         * groffer.sh: corrections for some restrictive shells
744         - Possible exit codes in actual `ash' are between 0 and 63.  To
745         handle even deeper restrictions, use 7 as maximal code instead
746         of 255 as replacement for error -1.
747         - Remove variables $_BAD2 and $_BAD3.
748         - Replace `trap' argument `EXIT' by 0 and write new fuctions
749         `trap_clean' and `trap_set' to handle the restrictions of `trap'
750         for some shells.
751         - Correct wrong $MANPATH to $_MAN_PATH in function
752         `man_do_filespec'.
753         - Test existence of directory before deleting it in the
754         `clean_up' definitions.
755         - Correct help output in `usage' (called by `--help').
757         * TODO:
758         Remove mention of `shoop' and `apropos'.
760 2002-10-21  Bernd Warken
761         ________________________________________________________________
762         * release of groffer 0.9.3
764         * groffer.sh: new temporary subdirectory
765         - Generate temporary subdirectory for storing temporary files
766         with better names in future groffer versions (name:
767         "groffer$$" in usual temporary directory).
768         - Use `umask 000' for temporary files to allow cleaning up
769         for everyone after a system break.
770         - Change both clean_up() functions (for normal shell and
771         for main_display() subshell) to handle the new subdirectory.
772         - clean_up_secondary() and $_TMP_PREFIX are unnecessary now, so
773         they were removed.
775         * Makefile.sub: `sed' commands for "groffer:"
776         - Remove "@g@" entry (not used in "groffer.sh").
777         - Add global replace for "@BINDIR@" and "@VERSION@" for future
778         usage.
780         * TODO: think about...
781         - writing part of groffer in C/C++.
782         - handling several files with different macro packages.
784 2002-10-17  Bernd Warken
785         ________________________________________________________________
786         * fixes of groffer 0.9.2
788         * groffer.sh:
789         Terminate main_parse_MANOPT() if $MANOPT is empty or consists
790         of space characters only.
792         * groffer.man: some fixes in "GROFFER OPTIONS"
793         - New macro ".Header_CB" for CB font in .TP headers; used for
794         definition of variables in option --mode.
795         - Fix some option references to refer to long options.
797         * README:
798         New file for general information on the groffer source; it is
799         not installed.
801 2002-10-14  Bernd Warken
803         * Makefile.sub:
804         add replacement "@BINDIR@" to "$(bindir)" for "groffer:"
806         * groffer.sh:
807         Define $_this as "@BINDIR@/${_PROGRAM_NAME}" to save the right
808         installation position of groffer for the special shell calling.
810         * groffer.man:
811         Remove double definition of filespec parameters.
813 2002-10-13  Bernd Warken
814         ________________________________________________________________
815         * release of groffer 0.9.2
817         * groffer.sh: fixes
818         - Fix some 'sed' functions: two in func_stack_dump(), one in
819           base_name(), add 'sed' command in list_from_cmdline().
820         - Finish main_parse_MANOPT() if $MANOPT is empty.
821         - Sort $_OPTS_GROFF_SHORT_NA like groff short options (but
822           unchanged).
823         - Fix some comments.
825         * groffer.man: make it more readable (but no additions)
826         - A shortened section "SYNOPSIS" is followed by a simplified
827           section "DESCRIPTION".
828         - The options from "SYNOPSIS" go to new section "OPTION
829           OVERVIEW" with all groffer options in a single subsection.
830         - The details of all groffer options are described in section
831           "GROFFER OPTIONS".
832         - New macro for file names ".File_name".
833         - "Option Parsing" is moved to section "COMPATIBILITY".
834         - Fix some "EXAMPLES".
836 2002-09-30  Bernd Warken
837         ________________________________________________________________
838         * release of groffer 0.9.1
840         * TODO: remove done entries
841         - Remove request for different shells.
842         - Remove the 'sed' complaints.
844 2002-07-15  Bernd Warken
846         * groffer.sh: replace `sed' interface by direct `sed'
847         - This improves the performance of the shell programming parts
848           and shortens the groffer script by about 5%.
849         - Remove functions: string_del_append(), string_del_leading(),
850           string_del_trailing(), string_flatten(), string_get_before(),
851           string_get_leading(), string_replace_all(), string_sed_s(),
852           and their auxiliary functions.
853         - Replace all calls of these functions by direct `sed' commands.
854         - Define variables for special characters to ease `sed' calls.
855         - Remove `$APPEND'.
856         - Restrict list_from_string() to single character separators.
857         - Correct list_check() and base_name().
858         - Add comments to all calls of `sed'.
860         * groffer.sh: add run-time support for several shells
861         - New option `--shell': stop execution and rerun groffer under
862           the shell specified in the argument of `--shell'.
863         - If no shell was specified at run-time, `ash' is tried first;
864           if `ash' is not available continue with the shell with which
865           groffer was called from the command line, or with the shell
866           name in the first line of the script, actually `/bin/sh'.
868 2002-07-12  Bernd Warken
869         ________________________________________________________________
870         * fixes for groffer 0.9.0
872         * groffer.sh: enhance version information
873         `groffer -v|--version' now print:
874         - groffer's version number and date
875         - the string `is part of '
876         - groff's version information (version number and copyright),
877           but not groff's `called subprograms' information.
879         * groffer.sh: minor fixes
880         - Fix the argument parser to process argument `-' correctly.
881         - Some display programs have trouble with empty input; feed a
882           line consisting of a single space character in this case for
883           all display modes (not for source or groff modes).
885         * TODO:
886         fix entry `shoop' (not 'shopt').
888 2002-06-28  Bernd Warken
889         ________________________________________________________________
890         * release of groffer 0.9.0
892         * groffer.sh: new mode `pdf'
893         - PDF (Portable Document Format):
894           -> Transform groff `ps' output into pdf using `gs'.
895           -> Pro: PDF viewers provide text searching (!).
896           -> Con: the transformation is quite slow.
897           -> Not suitable as an auto mode.
898         - New options `--pdf', `--pdf-viewer', `--mode pdf'.
899         - Standard pdf viewers `xpdf' and `acroread'.
900         - For `xpdf', choose zoom `z 3' for 100 dpi, `z 2' for 75 dpi.
902         * groffer.sh: support bzip2 decompression
903         - add test for `bzip2' with necessary options
904         - extend functions `catz()' and `save_stdin()'.
906         * TODO
907         remove entry on `bzip' decompression (done).
909         * groffer.man:
910         - Document new `pdf' features.
911         - Document new `bzip2' decompression.
912         - Fix documentation for `--auto-modes'.
914         * groffer.sh: minor fixes
915         - Improve device tests in `tty' and `dvi' modes.
916         - Internally, map mode `auto' to '' to facilitate tests.
917         - Fix auto mode sequence to: `ps,x,tty' as was intended.
919 2002-06-25  Bernd Warken
921         * groffer.sh:
922         Fix `source' mode.
924         * groffer.man:
925         Fix some indentations.
927 2002-06-23  Bernd Warken
928         ________________________________________________________________
929         * release of groffer 0.8
931         * Makefile.sub: add copyright section
933         * groffer.man:
934         - Document the new options.
935         - Revise the documentation of the modes.
936         - Document the configuration files in new section `FILES'.
937         - Redesign section `EXAMPLES'.
938         - Remove documentation for `-W'.
940         * groffer.sh: new debugging features
941         - Disabled by default; enabled by environment variables.
942         - Add landmark() to catch typos with quotes.
943         - Add a function call stack for suitable functions; implemented
944           as within the argument checker func_check().
945         - This implies the need to provide `return' with some clean-up
946           facility; implemented as `eval "$_return_..."'.
947         - Add option `--debug' to enable debugging at run-time.
948         - Actually, the groffer script uses only shell builtins found
949           in `ash' (a subset of POSIX) and POSIX `sed' as the only
950           external shell utility.
952         * groffer.sh: customization of viewers
953         - In `groff' mode, the groffer viewing facilities are disabled.
954         - The postprocessor option `-P' costumizes the viewer only in
955           some situations in the `groff' mode, so a new infrastructure
956           for viewer customization is necessary.
957         - Allow to specify arguments to the viewer programs specified
958           in `--*-viewer()'.
959         - Implement some of the essential X Toolkit resource options in
960           groffer, but with use a leading double minus.
961           -> `--bd': set border color.
962           -> `--bg', `--background': set background color.
963           -> `--bw': set border width.
964           -> `--display': set X display.
965           -> `--geometry': set size and position of viewer window.
966           -> `--fg', `--foreground': set foreground color.
967           -> `--ft', `--font': set font.
968           -> `--resolution': set X resolution in dpi.
969           -> `--title': set viewer window title.
970           -> `--xrm': set X resource.
971         - Remove misnamed option `--xrdb'.
973         * groffer.sh: new mode structure
974         - New Postcript mode `ps' (`--ps'):
975           -> default viewers: gv,ghostview,gs_x11,gs;
976           -> `--ps-viewer' sets the Postscript viewer.
977         - New mode `www' (`--www') for displaying in a web browser:
978           -> default browsers: mozilla,netscape,opera,amaya,arena;
979           -> `--www-viewer' sets the web browser.
980         - New dvi mode (`--dvi'); default viewer `xdvi':
981           -> default viewers: xdvi,dvilx;
982           -> `--dvi-viewer' sets the dvi viewer.
983         - New mode `auto':
984           -> active if no other mode is given or by new option `--auto';
985           -> selects from a sequence of modes that are tested until one
986             of them succeeds.
987           -> the default mode sequence is actually `ps', `x', `tty'.
988           -> `--default-modes' sets this mode sequence as a comma
989              separated string of program names, optionally each one
990              with arguments).
991         - New mode `groff':
992           -> process input like groff, ignore viewing options.
993           -> activated by new option `--groff'.
994           -> automatically active with one of `-V', `-X', `-Z'.
995         - Revise `tty' mode:
996           -> allow several text devices.
997           ->
998         - Reorganize the mode management:
999           -> new mode setting option `--mode'.
1000           -> logically separate source, groff, and display modes.
1001           -> intermediate output mode is now part of mode groff; remove
1002              any special features around `-Z'.
1003         - Update usage() to reflect the new option structure.
1005         * groffer.sh: add configuration files
1006         - `/etc/groff/groffer.conf' system-wide configuration.
1007         - `${HOME}/.groff/groffer.conf' user configuration.
1008         - The configuration file are shell scripts for now; later
1009           implementations can identify this from the `#! /bin/sh' line.
1011         * groffer.sh: new data structure `list':
1012         - Implement a `list' data structure as a string consisting of
1013           single-quoted elements, separated by a space character;
1014           embedded single-quotes are escaped.
1016         * groffer.sh: new option parser based on `list':
1017         - Write new option parser based on `list', compatible to both
1018           POSIX getopts() and GNU getopt().
1019         - Long options are now available on GNU and non-GNU systems.
1020         - Get rid of POSIX getopts() and GNU getopt().
1021         - the `-W--longopt' construct is now obsolete; remove it.
1022         - add test/function for `unset'.
1023         - Option strings are now implemented as `list's in order to
1024           allow unusual characters in options.
1025         - Parse $MANOPT first; translate essential arguments into
1026           groffer options.
1028         * groffer.man:
1029         - determine prompt length for `.Shell_cmd'* dynamically.
1030         - naming scheme for static strings and registers changed to
1031           `namespace:macro.variable'.
1034 2002-06-16  Werner Lemberg  <wl@gnu.org>
1036         * groffer.sh:
1037         Implement man option `--ascii' by `-mtty-char'.
1040 2002-05-31  Werner LEMBERG  <wl@gnu.org>
1042         * groffer.man (@.Shell_cmd_width):
1043         Increase to 4m (we use `sh#' as the prompt).
1046 2002-05-31  Bernd Warken
1047         ________________________________________________________________
1048         * release of groffer 0.7
1050         * groffer.sh: remove incompatibilities with the `ash' shell:
1051         - do not use `!command':
1052           -> use `else'
1053           -> write `_not_' equivalents for some functions
1054         - do not use `[^]' in `case':
1055           ->  restructure some functions.
1056         - only single-character names for loop variables:
1057           -> spoils the paradigm of leading `_' for local variables.
1058         - spurious trouble with `for i in ${var}':
1059           -> use `eval set -- ${var}' and `for i in "$@"'
1060         - do not change or use $IFS:
1061           -> define new functions string_split() and `path_split()'.
1062           -> result must be processed by `eval set --'.
1063           -> solve conflicts with existing positional parameters.
1064         - trouble with exporting external `$GROFF_*' variables:
1065           -> hope that they were exported in the calling shell.
1066         - not smart about additional blanks:
1067           -> remove unnecessary white space.
1069         * groffer.sh: improve run-time speed:
1070         - `ash' more than doubles the speed of `bash'.
1071         - speed-up `man_setup()'.
1074 2002-05-30  Werner Lemberg  <wl@gnu.org>
1076         * groffer.man:
1077         - remove some wrong `\:'.
1078         - rename macro names that start with a `[' (clashes with refer).
1079         - fix TP_header.
1082 2002-05-28  Bernd Warken
1083         ________________________________________________________________
1084         * release of groffer 0.6
1086         This is almost a complete rewrite since groffer 0.5 .
1087         ________________________________________________________________
1088         * Documentation
1090         * groffer.man:
1091         - Apply the changes done in www.tmac (.URL and .MTO)
1092         - Replace \fP by \f[].
1093         - Redesign and rewrite most macros.
1094         - Include the documentation for the new features.
1095         - Greatly enlarge section ENVIRONMENT
1096         - Add examples.
1098         * TODO:
1099         - Start a TODO file with several sections.
1101         * ChangeLog:
1102         Due to the many changes, shorten and rearrange the entries
1103         since groffer 0.5 .
1104         ________________________________________________________________
1105         * Shell compatibility
1107         * groffer.sh:
1108         - Due to possible conflicts in old BSD versions, `[]' was
1109           replaced by `test'; the `test' options `-a' and `-o' were
1110           replaced by multiple calls of `test'.
1111         - Write interface to the `sed' command `s' to become
1112           independent of the delimiter character.  Rewrite all text
1113           manipulating function to use this new scheme.  The new
1114           functions are named `string_*'.
1115         - `tr' is not needed any longer, replaced by `sed'.
1116         - `grep' is not needed any longer, mostly replaced by `case'.
1117         - Revision of test for `getopt'.
1118         - Remove `set -a'; explicitly export variables.
1119         - The only external programs used are POSIX `sed' and the
1120           fallback to `apropos'.  All other program calls were
1121           replaced by shell builtins and functions.
1123         ________________________________________________________________
1124         * Cosmetics
1126         * groffer.sh:
1127         - Implement a prefix based naming scheme for local variables
1128           and functions (OOP-like).
1129         - Introduce variables for white space (better readability with
1130           $IFS).
1131         - Store the names of the processed filespecs into a variable
1132           instead of a temporary file.
1133         - Error-prone shell constructions were replaced by functions
1134           with a simple interface.
1135         - To avoid too long pipes, replace supercat() by do_fileargs();
1136           every input file is handled independently.
1138         ________________________________________________________________
1139         * New features:
1140         - Add support for more X devices (e.g. X75-12 and X100-12).
1141         - Add long option `--intermediate_output' to `-Z'.
1142         - Make the options for mode selection clobber each other.
1143         - Add option `--mode' with an argument having the following
1144           values:
1145           `X': force displaying in X, same as options `-X';
1146           `tty': display with a pager on text terminal; same as `--tty';
1147           `source', `default', `auto', etc.
1148         - Make the handling of the X mode like in groff (e.g. -X -Tps).
1149         - Make resolution for gxditview behave like groff (default
1150           75 dpi).
1151         - Add environment variable $GROFFER_OPT to preset groffer
1152           options.
1154         ________________________________________________________________
1155         * implement most of the functionality of GNU `man'.
1157         - Add all `man' long options to groffer.
1158         - Add all `man' environment variables.
1159         - Parse and use content of `$MANOPT'.
1160         - The precedence of the options and environment variables
1161           is regulated like in GNU `man'.
1162         - Force the option `--manpath' to have a colon-separated
1163           argument like GNU `man'.
1164         - Support `man section name' calling convention.
1165         - Remove all dependencies on `man -w'.
1167         * groffer.sh:
1168         - Add the new features above.
1169         - Rewrite the search algorithm for man pages.
1170         - Remove searching with `man -w' (problems with space
1171           characters in file names).
1172         - Fix and complement usage().
1173         - The filespec parsers gets a function of its own do_manpage().
1176 2002-01-08  Bernd Warken
1178         * groffer 0.5 (beta) released
1180         * groffer.man:
1181         - Fix hyphenation problems with macros describing options.
1182         - Fix the handling of some `-' characters.
1183         - Examples of shell commands now print in font CR instead of CB.
1184         - Remove documentation for option `-X'.
1185         - Add documentation for option `--dpi'.
1187         * groffer.sh:
1188         - New method for creating temporary files, based on process
1189           IDs.  This is reliable enough and suitable for GNU and POSIX.
1190         - Run gxditview in a new shell instantiation for having a clean
1191           handling of the temporary files when running in the
1192           background.
1193         - Revision of the retrieving method for the window title.
1194         - Empty input is now tolerated.
1195         - Export the variables that are set before the call of `set -a'.
1196         - Function usage() corrected and updated.
1197         - Unnecessary stuff removed.
1198         - Comments adjusted.
1199         - Pass option `-X' to groff, i.e. force X output with 75 dpi.
1200         - Implement option `--dpi' for setting the resolution for the X
1201           viewer, which had already been documented in earlier versions.
1203 2002-01-07  Bernd Warken
1205         * groffer 0.4 (beta) released (as groff `contrib')
1207         * groffer.man:
1208         - New features documented.
1209         - Macros stream-lined.
1210         - Section EXAMPLES added.
1212         * groffer.sh:
1213         - System tests added/optimized.
1214         - Speed/memory optimizations by defining some shell functions
1215           alternatively depending on the text results.
1216         - Use `gzip' for decompression instead of `zcat'.
1217         - Signal handling added for clean exiting by `trap'.
1218         - Temporary files exist only as long as necessary.
1219         - Setup of path for man-pages moved after the option parsing.
1220         - Fixed a bug in determining the path for man-pages.
1221         - Fixed a bug in the handling of non-groffer options.
1223         * New features:
1224         - New option --tty for forcing paging on text terminal.
1225         - New option --no-man for disabling the man-page feature.
1226         - Implement reserved POSIX -W feature to simulate long options.
1227         - gxditview is now run as a background process.
1229 2002-01-05  Werner LEMBERG  <wl@gnu.org>
1231         * Integrate groffer into groff's `contrib' tree.
1233         * Makefile: Replaced by...
1234         Makefile.sub: New file.
1236         * groffer: Replaced by...
1237         groffer.sh: New file.
1239         * groffer.man (OptDef): Add missing backslashes.
1240         Update copyright.
1242 2001-12-15  Bernd Warken
1244         * groffer 0.3 (alpha) released (still stand-alone package).
1246         * GNU and POSIX are supported (POSIX without long options).
1248         * New options : --man, --mandb, --title, --xrdb
1250         * Support for command line arguments with embedded single space
1251         characters (GNU only) .
1253         * Several search methods for man-pages when no `man -w' is
1254         available ($MANPATH, mandb, a default path).
1256         * Language support for man-pages.
1258         * Recognize the following filespecs as man-page parameters:
1259           man:name(section), man:name, name.section, name.
1261 2001-12-03  Bernd Warken
1263         * Stand-alone package for groffer 0.2 (alpha) created
1264         Files: groffer, groffer.man, Makefile, TODO, ChangeLog
1266 2001-12-02  Bernd Warken
1268         * groffer 0.2 (alpha) program released.
1270         * Name changed from `groffview' to `groffer'.
1272         * Comments added.
1274         * Name changed from `groffview' to `groffer'.
1276         * Options harmonized with groff.
1277         New options : -Q --source, -T --device, -X .
1278         Other options known from groff are passed unchanged.
1280         * 100 dpi as default, 75 dpi only in emergency situations.
1282         * Bugs with temporary files fixed.
1284         * Code restructured and comments added.
1286 2001-11-28  Bernd Warken
1288         ***** groffview 0.1 (experimental) and groffview.man released
1289         (predecessor of groffer, shell script)
1291         * Options : -h --help, -v --version
1293         * Search for man-pages based on $MANPATH
1295         * development of `groffview' shell script started
1297 2001-11-28  Bernd Warken
1299         ________________________________________________________________
1300         License
1302         Copyright (C) 2001,2002,2003,2004,2005
1303         Free Software Foundation, Inc.
1304         Written by Bernd Warken
1305         
1306         Copying and distribution of this file, with or without
1307         modification, are permitted provided the copyright notice and this
1308         notice are preserved.
1310         This file is part of `groffer', which is part of the `groff'
1311         project.