groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff-commit] groff/contrib/groffer ChangeLog Makefile.sub ve...


From: Bernd Warken
Subject: [Groff-commit] groff/contrib/groffer ChangeLog Makefile.sub ve...
Date: Thu, 09 Nov 2006 00:11:31 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Changes by:     Bernd Warken <bwarken>  06/11/09 00:11:31

Modified files:
        contrib/groffer: ChangeLog Makefile.sub version.sh 
        contrib/groffer/perl: func.pl groffer.man groffer.pl 
        contrib/groffer/shell: groffer.man groffer2.sh 
Added files:
        contrib/groffer: roff2.man 
        contrib/groffer/perl: roff2.pl 
        contrib/groffer/shell: roff2.sh 

Log message:
        Update groffer-1.1.0
        
        New programs roff2*.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/groffer/ChangeLog?cvsroot=groff&r1=1.50&r2=1.51
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/groffer/Makefile.sub?cvsroot=groff&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/groffer/version.sh?cvsroot=groff&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/groffer/roff2.man?cvsroot=groff&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/groffer/perl/func.pl?cvsroot=groff&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/groffer/perl/groffer.man?cvsroot=groff&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/groffer/perl/groffer.pl?cvsroot=groff&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/groffer/perl/roff2.pl?cvsroot=groff&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/groffer/shell/groffer.man?cvsroot=groff&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/groffer/shell/groffer2.sh?cvsroot=groff&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/groffer/shell/roff2.sh?cvsroot=groff&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/contrib/groffer/ChangeLog,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- ChangeLog   7 Nov 2006 00:35:27 -0000       1.50
+++ ChangeLog   9 Nov 2006 00:11:30 -0000       1.51
@@ -1,3 +1,19 @@
+2006-11-07  Bernd Warken
+       ________________________________________________________________
+        * release of groffer 1.1.0
+
+       * perl/groffer.pl, perl/func.pl, perl/groffer.man, \
+       shell/groffer2.sh, shell/groffer.man: Add `--debug-grog' to
+       display the `grog' output.
+
+       * perl/roff2.pl, shell/roff2.sh: New files for creating the roff2*
+       programs to transform roff code to different formats.
+
+       * roff2.man: New file to create man pages for the roff2*
+       programs.
+
+       * Makefile.sub: Add roff2* and some minor fixes.
+
 2006-11-04  Bernd Warken
        ________________________________________________________________
         * release of groffer 1.0.3

Index: Makefile.sub
===================================================================
RCS file: /cvsroot/groff/groff/contrib/groffer/Makefile.sub,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- Makefile.sub        7 Nov 2006 00:35:27 -0000       1.23
+++ Makefile.sub        9 Nov 2006 00:11:30 -0000       1.24
@@ -5,7 +5,7 @@
 # Copyright (C) 2001,2002,2005,2006 Free Software Foundation, Inc.
 # Written by Werner Lemberg <address@hidden> and Bernd Warken.
 
-# Last update: 23 Oct 2006
+# Last update: 8 Nov 2006
 
 # This file is part of `groffer' which is part of `groff'.
 
@@ -26,8 +26,16 @@
 
 ########################################################################
 
-MAN1=groffer.n
-CLEANADD=groffer HAVE_PERL HAVE_SHELL groffer.man groffer.n
+ROFF2MODES=dvi html pdf ps text x
+ROFF2PROGS=`echo $(ROFF2MODES) | sed 's/[a-z][a-z]*/roff2&/g'`
+ROFF2MAN=`echo $(ROFF2MODES) | sed 's/[a-z][a-z]*/roff2&.man/g'`
+ROFF2MANN=`echo $(ROFF2MODES) | sed 's/[a-z][a-z]*/roff2&.n/g'`
+
+MAN1=groffer.n \
+roff2dvi.n roff2html.n roff2pdf.n roff2ps.n roff2text.n roff2x.n
+
+CLEANADD=groffer HAVE_PERL HAVE_SHELL groffer.man \
+$(MAN1) $(ROFF2MAN) $(ROFF2PROGS)
 
 # not all make programs have $(RM) predefined.
 RM=rm -f
@@ -42,6 +50,8 @@
 GROFFER_REST=$(srcdir)/version.sh \
              $(srcdir)/perl/groffer.man \
              $(srcdir)/perl/groffer.pl \
+             $(srcdir)/perl/roff2.pl \
+             $(srcdir)/shell/roff2.sh \
              $(srcdir)/shell/groffer.man \
              $(srcdir)/shell/groffer.sh
 
@@ -52,7 +62,7 @@
 
 # TODO: Add perl check to configure script.
 groffer: $(GROFFER_PERL) $(GROFFER_SHELL) \
-         $(GROFFER_REST) $(MAN1) $(SH_DEPS_SED_SCRIPT)
+         $(GROFFER_REST) $(SH_DEPS_SED_SCRIPT)
        if perl $(srcdir)/perl/perl_test.pl 2>&1 >/dev/null; then \
          : >HAVE_PERL; \
          echo "Using perl version of groffer."; \
@@ -64,6 +74,7 @@
            -e "$(SH_SCRIPT_SED_CMD)" \
            $(srcdir)/perl/groffer.pl >$@; \
          cp $(srcdir)/perl/groffer.man groffer.man; \
+         for f in $(ROFF2PROGS); do cp $(srcdir)/perl/roff2.pl $$f; done; \
        else \
          : >HAVE_SHELL; \
          echo "Using shell version of groffer."; \
@@ -75,16 +86,26 @@
            -e "$(SH_SCRIPT_SED_CMD)" \
             $(srcdir)/shell/groffer.sh >$@; \
          cp $(srcdir)/shell/groffer.man groffer.man; \
+         for f in $(ROFF2PROGS); do cp $(srcdir)/shell/roff2.sh $$f; done; \
        fi
        chmod +x $@
+       chmod +x $(ROFF2PROGS)
+       for m in $(ROFF2MODES); do \
+         cat $(srcdir)/roff2.man \
+         | sed 's/@ROFF2MODE@/'"$$m"'/g' > roff2$${m}.man; \
+       done
 
 install_data: groffer
        -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
        $(RM) $(DESTDIR)$(bindir)/groffer
        $(INSTALL_SCRIPT) groffer $(DESTDIR)$(bindir)/groffer
+       for f in $(ROFF2PROGS); do \
+         $(RM) $(DESTDIR)$(bindir)/$$f; \
+         $(INSTALL_SCRIPT) $$f $(DESTDIR)$(bindir)/$$f; \
+       done
        -test -d $(DESTDIR)$(groffer_dir) \
           || $(mkinstalldirs) $(DESTDIR)$(groffer_dir)
-       $(RM) $(DESTDIR)$(groffer_lib)/version.sh
+       $(RM) $(DESTDIR)$(groffer_dir)/version.sh
        $(INSTALL_DATA) $(srcdir)/version.sh \
           $(DESTDIR)$(groffer_dir)/version.sh
        for f in $(GROFFER_PERL_) $(GROFFER_SHELL_); do \
@@ -104,6 +125,7 @@
 
 uninstall_sub:
        $(RM) $(DESTDIR)$(bindir)/groffer
+       for f in $(ROFF2PROGS); do $(RM) $(DESTDIR)$(bindir)/$$f; done
        for f in $(GROFFER_PERL_) $(GROFFER_SHELL_) version.sh; do \
           $(RM) $(DESTDIR)$(groffer_dir)/$$f; \
         done

Index: version.sh
===================================================================
RCS file: /cvsroot/groff/groff/contrib/groffer/version.sh,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- version.sh  7 Nov 2006 00:35:27 -0000       1.12
+++ version.sh  9 Nov 2006 00:11:30 -0000       1.13
@@ -32,8 +32,8 @@
 export _PROGRAM_VERSION;
 export _LAST_UPDATE;
 
-_PROGRAM_VERSION='1.0.3';
-_LAST_UPDATE='24 Oct 2006';
+_PROGRAM_VERSION='1.1.0';
+_LAST_UPDATE='7 Nov 2006';
 
 # this setting of the groff version is only used before make is run,
 # otherwise @VERSION@ will set it, see groffer.sh.

Index: perl/func.pl
===================================================================
RCS file: /cvsroot/groff/groff/contrib/groffer/perl/func.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- perl/func.pl        7 Nov 2006 00:35:27 -0000       1.4
+++ perl/func.pl        9 Nov 2006 00:11:30 -0000       1.5
@@ -8,7 +8,7 @@
 # Copyright (C) 2006 Free Software Foundation, Inc.
 # Written by Bernd Warken.
 
-# Last update: 17 Oct 2006
+# Last update: 7 Nov 2006
 
 # This file is part of `groffer', which is part of `groff'.
 
@@ -435,6 +435,7 @@
     my $grog = `grog $tmp_file`;
     die "to_tmp(): grog error on $tmp_file;" if $?;
     chomp $grog;
+    print STDERR "grog output: $grog\n" if $main::Debug{'GROG'};
     if ($grog =~ /^.*\s-m.*$/) {
       $grog =~ s/\s+/ /g;
       $grog =~ s/ -m / -m/g;
@@ -595,7 +596,7 @@
 --sections=s1:s2:..., --systems=s1,s2,..., --where, ...
 
 Development options that are not useful for normal usage:
---debug, --debug-filenames, --debug-keep, --debug-params,
+--debug, --debug-filenames, --debug-grog, --debug-keep, --debug-params,
 --debug-tmpdir, --do-nothing, --print=text
 
 EOF

Index: perl/groffer.man
===================================================================
RCS file: /cvsroot/groff/groff/contrib/groffer/perl/groffer.man,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- perl/groffer.man    7 Nov 2006 00:35:27 -0000       1.3
+++ perl/groffer.man    9 Nov 2006 00:11:30 -0000       1.4
@@ -15,7 +15,7 @@
 Source file position:  <groff_source_top>/contrib/groffer/perl/groffer.man
 Installed position:    $prefix/share/man/man1/groffer.1
 
-Last update: 5 Oct 2006
+Last update: 7 Nov 2006
 ..
 .de author
 This file was written by
@@ -99,7 +99,7 @@
 .nr @w \w'\*[groffer:Shell_cmd.prompt]'\"
 .ft address@hidden
 .\" Full prompt width is maximum of texts plus 1m
-.nr grog:Shell_cmd_base.prompt_width (address@hidden>address@hidden)\" needed
+.nr groffer:Shell_cmd_base.prompt_width (address@hidden>address@hidden)\" 
needed
 .ft
 .rm @f
 .rm @f+
@@ -905,6 +905,7 @@
 .P
 .Opt_[alt] -- debug
 .Opt_[alt] -- debug\-filenames
+.Opt_[alt] -- debug\-grog
 .Opt_[alt] -- debug\-keep
 .Opt_[alt] -- debug\-params
 .Opt_[alt] -- debug\-tmpdir
@@ -2156,9 +2157,10 @@
 Enable all debugging options
 .Opt_long debug\-\fItype\fP .
 .
-The temporary files are kept and not deleted, the name of the
-temporary directory is printed, the displayed file names are printed,
-and the parameters are printed.
+The temporary files are kept and not deleted, the
+.B grog
+output is printed, the name of the temporary directory is printed, the
+displayed file names are printed, and the parameters are printed.
 .
 .
 .Opt_def -- debug\-filenames
@@ -2168,6 +2170,12 @@
 .BR \&groffer .
 .
 .
+.Opt_def -- debug\-grog
+Print the output of all
+.B grog
+commands.
+.
+.
 .Opt_def -- debug\-keep
 Enable two debugging informations.
 .

Index: perl/groffer.pl
===================================================================
RCS file: /cvsroot/groff/groff/contrib/groffer/perl/groffer.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- perl/groffer.pl     7 Nov 2006 00:35:27 -0000       1.4
+++ perl/groffer.pl     9 Nov 2006 00:11:31 -0000       1.5
@@ -8,7 +8,7 @@
 # Copyright (C) 2006 Free Software Foundation, Inc.
 # Written by Bernd Warken.
 
-# Last update: 23 Oct 2006
+# Last update: 7 Nov 2006
 
 # This file is part of `groffer', which is part of `groff'.
 
@@ -251,13 +251,13 @@
 
   my @opts_groffer_long_na = ('auto', 'apropos', 'apropos-data',
   'apropos-devel', 'apropos-progs', 'debug', 'debug-all',
-  'debug-filenames', 'debug-func', 'debug-not-func', 'debug-keep',
-  'debug-lm', 'debug-params', 'debug-stacks', 'debug-tmpdir',
-  'debug-user', 'default', 'do-nothing', 'dvi', 'groff', 'help',
-  'intermediate-output', 'html', 'man', 'no-location', 'no-man',
-  'no-special', 'pdf', 'ps', 'rv', 'source', 'text', 'to-stdout',
-  'text-device', 'tty', 'tty-device', 'version', 'whatis', 'where',
-  'www', 'x', 'X');
+  'debug-filenames', 'debug-func', 'debug-grog', 'debug-not-func',
+  'debug-keep', 'debug-lm', 'debug-params', 'debug-stacks',
+  'debug-tmpdir', 'debug-user', 'default', 'do-nothing', 'dvi',
+  'groff', 'help', 'intermediate-output', 'html', 'man',
+  'no-location', 'no-man', 'no-special', 'pdf', 'ps', 'rv', 'source',
+  'text', 'to-stdout', 'text-device', 'tty', 'tty-device', 'version',
+  'whatis', 'where', 'www', 'x', 'X');
 
 ### main_set_options()
   my @opts_groffer_long_arg = ('default-modes', 'device',
@@ -823,8 +823,9 @@
   my %long_opts =
     (
      '--debug' =>
-     sub { $Debug{$_} = 1 foreach (qw/FILENAMES KEEP PARAMS TMPDIR/); },
+     sub { $Debug{$_} = 1 foreach (qw/FILENAMES GROG KEEP PARAMS TMPDIR/); },
      '--debug-filenames' => sub { $Debug{'FILENAMES'} = 1; },
+     '--debug-grog' => sub { $Debug{'GROG'} = 1; },
      '--debug-keep' => sub { $Debug{'KEEP'} = 1; $Debug{'PARAMS'} = 1; },
      '--debug-params' => sub { $Debug{'PARAMS'} = 1; },
      '--debug-tmpdir' => sub { $Debug{'TMPDIR'} = 1; },
@@ -1886,6 +1887,7 @@
       $groggy = `cat $tmp_cat | grog`;
       die "main_display(): grog error;" if $?;
       chomp $groggy;
+      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
       &_do_opt_V();
       unlink $modefile;
       rename $tmp_cat, $modefile;
@@ -1908,6 +1910,7 @@
       $groggy = `cat $tmp_cat | grog -T$device`;
       die "main_display(): grog error;" if $?;
       chomp $groggy;
+      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
       if ($Display{'MODE'} eq 'text') {
        &_do_opt_V();
        system("cat $tmp_cat | $groggy $addopts");
@@ -1968,6 +1971,7 @@
       $groggy = `cat $tmp_cat | grog -Tdvi`;
       die "main_display(): grog error;" if $?;
       chomp $groggy;
+      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
       &_do_display();
       next SWITCH;
     };
@@ -1981,6 +1985,7 @@
       $groggy = `cat $tmp_cat | grog -Thtml`;
       die "main_display(): grog error;" if $?;
       chomp $groggy;
+      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
       &_do_display();
       next SWITCH;
     };
@@ -1994,6 +1999,7 @@
       $groggy = `cat $tmp_cat | grog -Tps`;
       die "main_display(): grog error;" if $?;
       chomp $groggy;
+      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
       &_do_display(\&_make_pdf);
       next SWITCH;
     };
@@ -2008,6 +2014,7 @@
       $groggy = `cat $tmp_cat | grog -Tps`;
       die "main_display(): grog error;" if $?;
       chomp $groggy;
+      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
       &_do_display();
       next SWITCH;
     };
@@ -2030,6 +2037,7 @@
       $groggy = `cat $tmp_cat | grog -T$device -Z`;
       die "main_display(): grog error;" if $?;
       chomp $groggy;
+      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
       &_do_display();
       next SWITCH;
     };
@@ -2039,17 +2047,22 @@
       if (! $Opt{'DEVICE'}) {
        $groggy = `cat $tmp_cat | grog -X`;
        die "main_display(): grog error;" if $?;
+       chomp $groggy;
+       print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
       } elsif ($Opt{'DEVICE'} =~ /^(X.*|dvi|html|lbp|lj4|ps)$/) {
        # these devices work with
        $groggy = `cat $tmp_cat | grog -T$Opt{'DEVICE'} -X`;
        die "main_display(): grog error;" if $?;
+       chomp $groggy;
+       print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
       } else {
        warn "main_display(): wrong device for " .
          "$Display{'MODE'} mode: $Opt{'DEVICE'};";
        $groggy = `cat $tmp_cat | grog -Z`;
        die "main_display(): grog error;" if $?;
-      }                                # if DEVICE
       chomp $groggy;
+       print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
+      }                                # if DEVICE
       &_do_display();
       next SWITCH;
     };

Index: shell/groffer.man
===================================================================
RCS file: /cvsroot/groff/groff/contrib/groffer/shell/groffer.man,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- shell/groffer.man   7 Nov 2006 00:35:27 -0000       1.3
+++ shell/groffer.man   9 Nov 2006 00:11:31 -0000       1.4
@@ -15,7 +15,7 @@
 Source file position:  <groff_source_top>/contrib/groffer/shell/groffer.man
 Installed position:    $prefix/share/man/man1/groffer.1
 
-Last update: 5 Oct 2006
+Last update: 7 Nov 2006
 ..
 .de author
 This file was written by
@@ -908,6 +908,7 @@
 .Opt_[alt] -- debug\-all
 .Opt_[alt] -- debug\-filenames
 .Opt_[alt] -- debug\-func
+.Opt_[alt] -- debug\-grog
 .Opt_[alt] -- debug\-keep
 .Opt_[alt] -- debug\-lm
 .Opt_[alt] -- debug\-params
@@ -2153,14 +2154,16 @@
 .\" --------------------------------------------------------------------
 .
 .Opt_def -- debug
-Enable seven debugging informations.
+Enable eight debugging informations.
 .
 The temporary files are kept and not deleted, the name of the
 temporary directory and the shell name for
 .File_name groffer2.sh
-are printed, the displayed file names are printed, the parameters are
-printed at several steps of development, and a function stack is
-output with function \f[CR]error_user()\f[] as well.
+are printed, the displayed file names are printed, the
+.B grog
+output is printed, the parameters are printed at several steps of
+development, and a function stack is output with function
+\f[CR]error_user()\f[] as well.
 .
 Neither the function call stack at the opening and closing of each
 function call nor the landmark information to determine how far the
@@ -2170,7 +2173,7 @@
 .
 .
 .Opt_def -- debug\-all
-Enable all nine debugging informations including the function call
+Enable all ten debugging informations including the function call
 stack and the landmark information.
 .
 .
@@ -2197,6 +2200,12 @@
 by large amounts.
 .
 .
+.Opt_def -- debug\-grog
+Print the output of all
+.B \&grog
+commands.
+.
+.
 .Opt_def -- debug\-keep
 Enable two debugging informations, the printing of the name of the
 temporary directory and the keeping of the temporary files.

Index: shell/groffer2.sh
===================================================================
RCS file: /cvsroot/groff/groff/contrib/groffer/shell/groffer2.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- shell/groffer2.sh   7 Nov 2006 00:35:27 -0000       1.3
+++ shell/groffer2.sh   9 Nov 2006 00:11:31 -0000       1.4
@@ -2,7 +2,7 @@
 
 # groffer - display groff files
 
-# Source file position: <groff-source>/contrib/groffer/groffer2.sh
+# Source file position: <groff-source>/contrib/groffer/shell/groffer2.sh
 # Installed position: <prefix>/lib/groff/groffer/groffer2.sh
 
 # This file should not be run independently.  It is called by
@@ -12,7 +12,7 @@
 # Free Software Foundation, Inc.
 # Written by Bernd Warken
 
-# Last update: 4 Nov 2006
+# Last update: 7 Nov 2006
 
 # This file is part of `groffer', which is part of `groff'.
 
@@ -204,6 +204,10 @@
 _DEBUG_LM='no';                        # disable landmark messages
 #_DEBUG_LM='yes';              # enable landmark messages
 
+export _DEBUG_GROG;
+_DEBUG_GROG='no';              # disable grog output
+#_DEBUG_GROG='yes';            # enable grog output
+
 export _DEBUG_KEEP_FILES;
 _DEBUG_KEEP_FILES='no'         # disable file keeping in temporary dir
 #_DEBUG_KEEP_FILES='yes'       # enable file keeping in temporary dir
@@ -228,9 +232,9 @@
 case " $*" in
 *\ --deb*|*\ --d*-*)
   # --debug-* options
-  d=' --debug-all --debug-filenames --debug-func --debug-not-func '\
-'--debug-keep --debug-lm --debug-params --debug-shell --debug-stacks '\
-'--debug-tmpdir --debug-user ';
+  d=' --debug-all --debug-filenames --debug-func --debug-grog '\
+'--debug-not-func --debug-keep --debug-lm --debug-params '\
+'--debug-shell --debug-stacks --debug-tmpdir --debug-user ';
   # non-debug options with scheme --d*-*
   n=' --do-nothing --default-modes --dvi-viewer --dvi-viewer-tty ';
   for i
@@ -241,6 +245,7 @@
       # _DEBUG_STACKS='yes';
       _DEBUG_USER_WITH_STACK='yes';
       # _DEBUG_LM='yes';
+      _DEBUG_GROG='yes';
       _DEBUG_KEEP_FILES='yes';
       _DEBUG_PRINT_PARAMS='yes';
       _DEBUG_PRINT_SHELL='yes';
@@ -281,6 +286,7 @@
         _DEBUG_FUNC_CHECK='yes';
         _DEBUG_STACKS='yes';
         _DEBUG_USER_WITH_STACK='yes';
+        _DEBUG_GROG='yes';
         _DEBUG_LM='yes';
         _DEBUG_KEEP_FILES='yes';
         _DEBUG_PRINT_PARAMS='yes';
@@ -300,6 +306,9 @@
         _DEBUG_STACKS='no';
         _DEBUG_USER_WITH_STACK='no';
        ;;
+      --debug-grog)
+        _DEBUG_GROG='yes';
+       ;;
       --debug-keep)
         _DEBUG_PRINT_TMPDIR='yes';
         _DEBUG_KEEP_FILES='yes';
@@ -527,7 +536,7 @@
 _OPTS_GROFFER_LONG_NA="'auto' \
 'apropos' 'apropos-data' 'apropos-devel' 'apropos-progs' \
 'debug' 'debug-all' 'debug-filenames' \
-'debug-func' 'debug-not-func' 'debug-keep' 'debug-lm' \
+'debug-func' 'debug-not-func' 'debug-grog' 'debug-keep' 'debug-lm' \
 'debug-params' 'debug-shell' 'debug-stacks' 'debug-tmpdir' 'debug-user' \
 'default' 'do-nothing' 'dvi' 'groff' 'help' 'intermediate-output' 'html' \
 'man' 'no-location' 'no-man' 'no-special' 'pdf' 'ps' 'rv' 'source' \
@@ -4403,6 +4412,7 @@
       then
         exit "${_ERROR}";
       fi;
+      echo2 "grog output: ${tt_grog}";
       case " ${tt_grog} " in
       *\ -m*)
         eval set x "$(echo1 " ${tt_grog} " | sed '
@@ -4715,9 +4725,10 @@
 --sections=s1:s2:..., --systems=s1,s2,..., --where, ...
 
 Development options that are not useful for normal usage:
---debug, --debug-all, --debug-filenames, --debug-func, --debug-not-func,
---debug-keep, --debug-lm, --debug-params, --debug-shell, --debug-stacks,
---debug-tmpdir, --debug-user, --do-nothing, --print=text, --shell=prog
+--debug, --debug-all, --debug-filenames, --debug-func,
+--debug-not-func, --debug-grog, --debug-keep, --debug-lm,
+--debug-params, --debug-shell, --debug-stacks, --debug-tmpdir,
+--debug-user, --do-nothing, --print=text, --shell=prog
 
 EOF
 
@@ -5541,8 +5552,8 @@
       shift;
       ;;
     --debug|--debug-all|--debug-filenames|--debug-func|--debug-not-func|\
---debug-keep|--debug-lm|--debug-params|--debug-shell|--debug-stacks|\
---debug-tmpdir|--debug-user)
+--debug-grog|--debug-keep|--debug-lm|--debug-params|--debug-shell|\
+--debug-stacks|--debug-tmpdir|--debug-user)
       # debug is handled at the beginning
       :;
       ;;
@@ -6867,6 +6878,7 @@
     then
       exit "${_ERROR}";
     fi;
+    echo2 "grog output: ${md_groggy}";
     exit_test;
     _do_opt_V;
 
@@ -6900,6 +6912,7 @@
     then
       exit "${_ERROR}";
     fi;
+    echo2 "grog output: ${md_groggy}";
     exit_test;
     if obj _DISPLAY_MODE is_equal 'text'
     then
@@ -6995,6 +7008,7 @@
     then
       exit "${_ERROR}";
     fi;
+    echo2 "grog output: ${md_groggy}";
     exit_test;
     _do_display;
     ;;
@@ -7012,6 +7026,7 @@
     then
       exit "${_ERROR}";
     fi;
+    echo2 "grog output: ${md_groggy}";
     exit_test;
     _do_display;
     ;;
@@ -7031,6 +7046,7 @@
     then
       exit "${_ERROR}";
     fi;
+    echo2 "grog output: ${md_groggy}";
     exit_test;
     _do_display _make_pdf;
     ;;
@@ -7050,6 +7066,7 @@
     then
       exit "${_ERROR}";
     fi;
+    echo2 "grog output: ${md_groggy}";
     exit_test;
     _do_display;
     ;;
@@ -7083,6 +7100,7 @@
     then
       exit "${_ERROR}";
     fi;
+    echo2 "grog output: ${md_groggy}";
     exit_test;
     _do_display;
     ;;
@@ -7095,6 +7113,7 @@
       then
         exit "${_ERROR}";
       fi;
+      echo2 "grog output: ${md_groggy}";
       exit_test;
       ;;
     X*|dvi|html|lbp|lj4|ps)
@@ -7104,6 +7123,7 @@
       then
         exit "${_ERROR}";
       fi;
+      echo2 "grog output: ${md_groggy}";
       exit_test;
       ;;
     *)
@@ -7114,6 +7134,7 @@
       then
         exit "${_ERROR}";
       fi;
+      echo2 "grog output: ${md_groggy}";
       exit_test;
       ;;
     esac;

Index: roff2.man
===================================================================
RCS file: roff2.man
diff -N roff2.man
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ roff2.man   9 Nov 2006 00:11:30 -0000       1.1
@@ -0,0 +1,329 @@
+.TH address@hidden@ @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
+.SH NAME
address@hidden@ \- transform roff code into @ROFF2MODE@ mode
+.
+.SH "SYNOPSIS"
+.\" The .SH was moved to this place in order to appease `apropos'.
+.
+.\" --------------------------------------------------------------------
+.\" Legalize
+.\" --------------------------------------------------------------------
+.
+.ig
address@hidden@.1 - man page for address@hidden@ (section 1).
+
+Source file position:  <groff_source_top>/contrib/groffer/roff2.man
+Installed position:    $prefix/share/man/man1/address@hidden@.1
+
+Last update: 8 Nov 2006
+..
+.de author
+This file was written by
+.MTO "" "Bernd Warken" .
+..
+.de copyleft
+Copyright (C) 2006 Free Software Foundation, Inc.
+.
+.P
+This file is part of
+.IR \%groffer ,
+which is part of
+.IR \%groff ,
+a free software project.
+.
+You can redistribute it and/or modify it under the terms of the
+.nh
+.B GNU General Public License
+.hy
+as published by the
+.nh
+.BR "Free Software Foundation" ,
+.hy
+either version 2, or (at your option) any later version.
+.
+.P
+You should have received a copy of the \f[CR]GNU General Public
+License\f[] along with
+.IR groff ,
+see the files \%\f[CB]COPYING\f[] and \%\f[CB]LICENSE\f[] in the top
+directory of the
+.I groff
+source package.
+.
+Or read the
+.I man\~page
+.BR gpl (1).
+You can also write to the
+.nh
+.B Free Software Foundation, 51 Franklin St - Fifth Floor, Boston,
+.BR "MA 02110-1301, USA" .
+.hy
+..
+.
+.
+.\" --------------------------------------------------------------------
+.\" Setup
+.\" --------------------------------------------------------------------
+.
+.mso www.tmac
+.
+.if n \{\
+.  mso tty-char.tmac
+.  ftr CR R
+.  ftr CI I
+.  ftr CB B
+.\}
+.
+.if '\*[.T]'dvi' \{\
+.  ftr CB CW
+.\}
+.
+.ds Ellipsis "\&.\|.\|.\""
+.
+.
+.\" --------------------------------------------------------------------
+.\" Macro definitions
+.
+.\" Ignore all arguments like a comment, even after a .eo call.
+.de c
+..
+.c --------------------------------------------------------------------
+.c .File_name  (<path_name>)
+.c
+.c Display a file or directory name in CB font.
+.c
+.de File_name
+.  Header_CB \\$@
+..
+.c --------------------------------------------------------------------
+.c .Header_CB  (<path_name>)
+.c
+.c Display a line in CB font, for example after .TP
+.c
+.de Header_CB
+.  nh
+.  Text \f[CB]\\$1\f[]\\$2
+.  hy
+..
+.c --------------------------------------------------------------------
+.c static register for inter-macro communication in `.Synopsis'*
+.nr roff2:Synopsis.level 0
+.
+.c --------------------------------------------------------------------
+.c .Synopsis  ()
+.c
+.c Begin a synopsis section, to be ended by a ./Synopsis macro.
+.c
+.de Synopsis
+.  if (\\n[roff2:Synopsis.level] > 0) \
+.    Error .\\$0: previous .Synopsis was not closed by ./Synopsis.
+.  nh
+.  ds @1 \\$1\"
+.  nr @old_indent \\n(.i
+.  ad l
+.  in +\w'address@hidden'u
+.  ti address@hidden
+.  B address@hidden
+.  rr @old_indent
+.  rm @1
+.  nr roff2:Synopsis.level +1\"        marker for ./Synopsis
+..
+.c  --------------------------------------------------------------------
+.c ./Synopsis  ()
+.c
+.c Close a synopsis section opened by the previous .Synopsis macro.
+.c
+.de /Synopsis
+.  if (\\n[roff2:Synopsis.level] <= 0) \
+.    Error .\\$0: no previous call of .Synopsis
+.  br
+.  ad
+.  in
+.  hy
+.  nr roff2:Synopsis.level -1
+..
+.c  --------------------------------------------------------------------
+.c .Text  (<text>...)
+.c
+.c Treat the arguments as text, no matter how they look.
+.c
+.de Text
+.  if (\\n[.$] == 0) \
+.    return
+.  nh
+.  nop \)\\$*\)
+.  hy
+..
+.
+.\" End of macro definitions
+.
+.
+.\" --------------------------------------------------------------------
+.\" SH "SYNOPSIS"
+.\" --------------------------------------------------------------------
+.
+.ad l
+.Synopsis address@hidden@
+.RI [ groffer_option \*[Ellipsis]]
+[\f[CB]\-\-\fP]
+.RI [ \%filespec \*[Ellipsis]]
+./Synopsis
+.
+.Synopsis address@hidden@
+\f[CB]\-h\fP\f[CR]|\fP\f[CB]\-\-help\fP
+./Synopsis
+.
+.Synopsis address@hidden@
+\f[CB]\-v\fP\f[CR]|\fP\f[CB]\-\-version\fP
+./Synopsis
+.
+.
+.P
+The options
+.B \-v
+and
+.B \%\-\-version
+print a version information of the program to standard output and stop
+the program instantly.
+.
+The options
+.B \-h
+and
+.B \%\-\-help
+print a usage information of the program to standard output and stop
+the program instantly.
+.
+.
+.P
+All other options are assumed to be
+.B \%groffer
+options.
+.
+They are internally passed to
+.BR \%groffer .
+They override the behavior of the program.
+.
+The options are optional, they can be omitted.
+.
+.
+.P
+The
+.I \%filespec
+arguments correspond to the
+.I \%filespec
+arguments of
+.BR \%groffer .
+So they are either the names of existing, readable files or
+.B \-
+for standard input or the name of a man page or a
+.BR \%groffer (@MAN1EXT@)
+man page search pattern.
+.
+If no
+.I \%filespec
+is specified standard input is assumed automatically.
+.
+.
+.\" --------------------------------------------------------------------
+.SH DESCRIPTION
+.\" --------------------------------------------------------------------
+.
+.B address@hidden@
+transforms
+.I roff
+code into
+.ie '@ROFF2MODE@'x' \{\
+.I X
+mode corresponding to the
+.I groff
+devices
+.BR X *;
+this mode is suitable for
+.BR \%gxditview (@MAN1EXT@).
+.\}
+.el address@hidden@\fP mode.
+.
+Print the result to standard output.
+.
+.
+.P
+There are more of these programs for generating other formats of
+.I \%roff
+input.
+.
+.TP
+.BR \%roff2dvi (@MAN1EXT@)
+is for
+.I dvi
+mode.
+.
+.TP
+.BR \%roff2html (@MAN1EXT@)
+generates
+.I html
+output.
+.
+.TP
+.BR \%roff2pdf (@MAN1EXT@)
+outputs
+.I pdf
+mode.
+.
+.TP
+.BR \%roff2ps (@MAN1EXT@)
+prints
+.I \%PostScript
+format to standard output.
+.TP
+.BR \%roff2text (@MAN1EXT@)
+generates text output in the
+.B groff
+device
+.IR latin1 .
+.
+.TP
+.BR \%roff2x (@MAN1EXT@)
+prints the output in the
+.B groff
+device
+.B X
+that is suitable for programs like
+.BR \%gxditview (@MAN1EXT@)
+or
+.BR \%xditview (1).
+.
+.
+.\" --------------------------------------------------------------------
+.SH "SEE ALSO"
+.\" --------------------------------------------------------------------
+.
+.BR \%groff (@MAN1EXT@),
+.BR \%groffer (@MAN1EXT@),
+.BR \%roff2dvi (@MAN1EXT@),
+.BR \%roff2html (@MAN1EXT@),
+.BR \%roff2pdf (@MAN1EXT@),
+.BR \%roff2ps (@MAN1EXT@),
+.BR \%roff2text (@MAN1EXT@),
+.BR \%roff2x (@MAN1EXT@),
+.BR \%gxditview (@MAN1EXT@).
+.
+.
+.\" --------------------------------------------------------------------
+.SH "AUTHOR"
+.\" --------------------------------------------------------------------
+.author
+.
+.
+.\" --------------------------------------------------------------------
+.SH "COPYING"
+.\" --------------------------------------------------------------------
+.copyleft
+.
+.
+.\" --------------------------------------------------------------------
+.\" Emacs settings
+.\" --------------------------------------------------------------------
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:

Index: perl/roff2.pl
===================================================================
RCS file: perl/roff2.pl
diff -N perl/roff2.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ perl/roff2.pl       9 Nov 2006 00:11:31 -0000       1.1
@@ -0,0 +1,67 @@
+#! /usr/bin/env perl
+
+# roff2* - transform roff files into other formats
+
+# Source file position: <groff-source>/contrib/groffer/perl/roff2.pl
+# Installed position: <prefix>/bin/roff2*
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# Written by Bernd Warken.
+
+# Last update: 7 Nov 2006
+
+# 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.
+
+########################################################################
+
+require v5.6;
+
+use strict;
+use warnings;
+use File::Spec;
+
+my $Mode;
+my $Name;
+{
+  my ($v, $d);
+  ($v, $d, $Name) = File::Spec->splitpath($0);
+  die "wrong program name: $Name;"
+    if $Name !~ /^roff2[a-z]/;
+}
+$Mode = $Name;
+$Mode =~ s/^roff2//;
+foreach (@ARGV) {
+  if ($_ eq '-v' || '--version' =~ m|^$_|) {
+    print $Name, ' in ', `groffer --version`;
+    exit 0;
+  }
+  if ($_ eq '-h' || '--help' =~ m|^$_|) {
+    print <<EOF;
+usage: $Name [option]... [--] [filespec]...
+
+where the optional `filespec's are either the names of existing,
+readable files or `-' for standard input or a search pattern for man
+pages.  The optional `option's are arbitrary options of `groffer'; the
+options override the behavior of this program.
+EOF
+    exit 0;
+  }
+}
+system('groffer', '--to-stdout', "--$Mode", @ARGV);
+

Index: shell/roff2.sh
===================================================================
RCS file: shell/roff2.sh
diff -N shell/roff2.sh
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ shell/roff2.sh      9 Nov 2006 00:11:31 -0000       1.1
@@ -0,0 +1,99 @@
+#! /bin/sh
+
+# roff2* - transform roff files into other formats
+
+# Source file position: <groff-source>/contrib/groffer/shell/roff2.sh
+# Installed position: <prefix>/bin/roff2*
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# Written by Bernd Warken
+
+# Last update: 7 Nov 2006
+
+# 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.
+
+########################################################################
+
+
+##############
+# echo1 (<text>*)
+#
+# Output to stdout with final line break.
+#
+# Arguments : arbitrary text including `-'.
+#
+echo1()
+{
+  cat <<EOF
+$@
+EOF
+} # echo1()
+
+
+##############
+# echo2 (<text>*)
+#
+# Output to stderr with final line break.
+#
+# Arguments : arbitrary text including `-'.
+#
+echo2()
+{
+  cat >&2 <<EOF
+$@
+EOF
+} # echo2()
+
+
+name="$(echo1 "$0" | sed 's|^.*//*\([^/]*\)$|\1|')";
+
+case "$name" in
+roff2[a-z]*)
+  mode="$(echo1 "$name" | sed 's/^roff2//')";
+  ;;
+*)
+  echo2 "wrong program name: $name";
+  exit 1;
+  ;;
+esac;
+
+for i
+do
+  case $i in
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    cat <<EOF
+$name in `groffer --version`
+EOF
+    exit 0;
+    ;;
+  -h|--h|--he|--hel|--help)
+    cat <<EOF
+usage: $name [option]... [--] [filespec]...
+
+where the optional "filespec"s are either the names of existing,
+readable files or "-" for standard input or a search pattern for man
+pages.  The optional "option"s are arbitrary options of "groffer"; the
+options override the behavior of this program.
+EOF
+    exit 0;
+    ;;
+  esac;
+done
+
+groffer --to-stdout --$mode "$@";
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]