groff-commit
[Top][All Lists]
Advanced

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

[groff] 01/01: grog: new option --warnings


From: Bernd Warken
Subject: [groff] 01/01: grog: new option --warnings
Date: Fri, 04 Jul 2014 11:58:03 +0000

bwarken pushed a commit to branch master
in repository groff.

commit 0cfe13506ae1de08b1df6236ea133bde2588d685
Author: Bernd Warken <address@hidden>
Date:   Fri Jul 4 13:57:53 2014 +0200

    grog: new option --warnings
---
 ChangeLog              |    8 +++++++-
 src/roff/grog/grog.man |   34 ++++++++++++++++------------------
 src/roff/grog/grog.pl  |    2 +-
 src/roff/grog/subs.pl  |   30 ++++++++++++++++++++----------
 4 files changed, 44 insertions(+), 30 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ec9a229..47dbd60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
+2014-07-04  Bernd Warken  <address@hidden>
+
+       * grog.pl, subs.pl: Add option `--warnings'.  Rename
+       `--with_ligatures' to `--ligatures', but keep `--with_ligatures'
+       for compatibility.
+
 2014-07-03  Bernd Warken  <address@hidden>
 
-       * MAkefile.in: Remove directories `groffer/perl' and
+       * Makefile.in: Remove directories `groffer/perl' and
        `groffer.shell', which don't exist any more.
 
 2014-07-03  Bernd Warken  <address@hidden>
diff --git a/src/roff/grog/grog.man b/src/roff/grog/grog.man
index aadd2a6..fccf697 100644
--- a/src/roff/grog/grog.man
+++ b/src/roff/grog/grog.man
@@ -16,10 +16,10 @@ grog.1 - man page for grog (section 1)
 Source file position:  <groff_source_top>/src/roff/grog/grog.man
 Installed position:    $prefix/share/man/man1/grog.1
 
-Last Update: 17 Jun 2014
+Last Update: 4 Jul 2014
 ..
 .de copying
-Copyright (C) 1989\[en]2003, 2006\[en]7, 2009\[en]12, 2014
+Copyright (C) 1989\[en]2003, 2006\[en]2007, 2009\[en]2012, 2014
 Free Software Foundation, Inc.
 .
 Written by James Clark.
@@ -71,24 +71,18 @@ GPL2
 .UE .
 ..
 .
-.
-.\" --------------------------------------------------------------------
-.\" Local macros
-.de FN
-.I \\$1
-..
-.
-.
 .\" --------------------------------------------------------------------
 .SH SYNOPSIS
 .
 .SY grog
 .OP \-C
 .OP \-\-run
+.OP \-\-warnings
 .OP \-\-with_ligatures
 .RI [ \%groff\-option\~ .\|.\|.\&]
 .OP \-\-
 .RI [ \%filespec\~ .\|.\|.]
+.YS
 .
 .SY grog
 .B \-h
@@ -166,18 +160,22 @@ compatibility mode, which is also transfered to the 
generated
 command line.
 .
 .TP
-.B \-\-run
-with this option, the command line is output at standard error and
-then run on the computer.
-.
-.TP
-.B \-\-with_ligatures
+.B \-\-ligatures
 this option forces to include the arguments
 .B -P-y -PU
 within the generated
 .B groff
 command line.
 .
+.TP
+.B \-\-run
+with this option, the command line is output at standard error and
+then run on the computer.
+.
+.TP
+.B \-\-warnings
+with this option, some more warnings are output to standard error.
+.
 .
 .P
 All other specified short options (words starting with one minus
@@ -383,7 +381,7 @@ groff \-me meintro.me
 So
 .B grog
 recognized that the file
-.FN meintro.me
+.B meintro.me
 is written with the
 .B \-me
 macro package.
@@ -415,7 +413,7 @@ Besides determining the macro package
 .BR \-ms ,
 .B grog
 recognized that the file
-.FN pic.ms
+.B pic.ms
 additionally needs
 .BR \-pte ,
 the combination of
diff --git a/src/roff/grog/grog.pl b/src/roff/grog/grog.pl
index 5b6186a..f8914f9 100644
--- a/src/roff/grog/grog.pl
+++ b/src/roff/grog/grog.pl
@@ -30,7 +30,7 @@
 # <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
-our $Last_Update = '18 Jun 2014';
+our $Last_Update = '4 Jul 2014';
 ########################################################################
 
 require v5.6;
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index 1465bcf..165972b 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -30,7 +30,7 @@
 # <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
-# Last_Update = '18 Jun 2014';
+# Last_Update = '4 Jul 2014';
 ########################################################################
 
 require v5.6;
@@ -54,6 +54,7 @@ my @Command;                  # stores the final output
 my @Mparams;                   # stores the options `-m*'
 my $do_run = 0;                        # run generated `groff' command
 my $pdf_with_ligatures = 0;    # `-P-y -PU' for `pdf' device
+my $with_warnings = 0;
 my $device = '';
 
 our $Prog;
@@ -162,12 +163,18 @@ sub args_with_minus {
       &version() if $arg =~ /^--?v/;   # --version, with exit
       &help() if $arg  =~ /--?h/;      # --help, with exit
 
-      if ( $arg =~ /^--?r/ ) {         #  --run, no exit
+      if ( $arg =~ /^--r/ ) {          #  --run, no exit
        $do_run = 1;
        next;
       }
 
-      if ( $arg =~ /^--?w/ ) {         #  --with_ligatures, no exit
+      if ( $arg =~ /^--wa/ ) {         #  --warnings, no exit
+       $with_warnings = 1;
+       next;
+      }
+
+      if ( $arg =~ /^--(wi|l)/ ) { # --ligatures, no exit
+       # the old --with_ligatures is only kept for compatibility
        $pdf_with_ligatures = 1;
        next;
       }
@@ -672,13 +679,15 @@ sub make_groff_line {
       if ( $pdf_with_ligatures ) {     # with ligature argument
        push( @Command, '-P-y -PU' );
       } else { # no ligature argument
-       print STDERR <<EOF;
+        if ( $with_warnings ) {
+          print STDERR <<EOF;
 If you have trouble with ligatures like `fi' in the `groff' output, you
 can proceed as one of
 - add `grog' option `--with_ligatures' or
 - use the `grog' option combination `-P-y -PU' or
 - try to remove the font named similar to `fonts-texgyre' from your system.
 EOF
+        }
       }        # end of ligature
     }  # end of pdf device
   } else {     # wrong device
@@ -913,13 +922,14 @@ names, even if they start with a `-' character.
 
 `option' is either a `groff' option or one of these:
 
--h --help              print this uasge message and exit
--v --version           print version information and exit
+-h|--help      print this uasge message and exit
+-v|--version   print version information and exit
 
--C                     compatibility mode
---run                  run the checked-out groff command
---with_ligatures       include options `-P-y -PU' for internal font,
-                       which preserverses the ligatures like `fi'
+-C             compatibility mode
+--ligatures    include options `-P-y -PU' for internal font, which
+               preserverses the ligatures like `fi'
+--run          run the checked-out groff command
+--warnings     display more warnings to standard error
 
 All other options should be `groff' 1-character options.  These are then
 appended to the generated `groff' command line.  The `-m' options will



reply via email to

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