groff-commit
[Top][All Lists]
Advanced

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

[Groff-commit] groff ChangeLog NEWS src/preproc/tbl/main.cpp s...


From: Werner LEMBERG
Subject: [Groff-commit] groff ChangeLog NEWS src/preproc/tbl/main.cpp s...
Date: Tue, 16 Feb 2010 21:03:55 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Changes by:     Werner LEMBERG <wl>     10/02/16 21:03:55

Modified files:
        .              : ChangeLog NEWS 
        src/preproc/tbl: main.cpp table.cpp table.h tbl.man 

Log message:
        tbl: Add `nowarn' option.
        
        * src/preproc/tbl/table.h (table): Add `NOWARN' enumeration value.
        
        * src/preproc/tbl/main.cpp (process_options),
        src/preprox/tbl/table.cpp (table::compute_expand_width,
        table::compute_separation_factor): Handle `NOWARN'.
        
        * src/preproc/tbl/tbl.man, NEWS: Document it.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1223&r2=1.1224
http://cvs.savannah.gnu.org/viewcvs/groff/NEWS?cvsroot=groff&r1=1.259&r2=1.260
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/tbl/main.cpp?cvsroot=groff&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/tbl/table.cpp?cvsroot=groff&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/tbl/table.h?cvsroot=groff&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/tbl/tbl.man?cvsroot=groff&r1=1.29&r2=1.30

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1223
retrieving revision 1.1224
diff -u -b -r1.1223 -r1.1224
--- ChangeLog   8 Feb 2010 16:22:06 -0000       1.1223
+++ ChangeLog   16 Feb 2010 21:03:54 -0000      1.1224
@@ -1,3 +1,15 @@
+2010-02-16  Larry Kollar  <address@hidden>
+
+       tbl: Add `nowarn' option.
+
+       * src/preproc/tbl/table.h (table): Add `NOWARN' enumeration value.
+
+       * src/preproc/tbl/main.cpp (process_options),
+       src/preprox/tbl/table.cpp (table::compute_expand_width,
+       table::compute_separation_factor): Handle `NOWARN'.
+
+       * src/preproc/tbl/tbl.man, NEWS: Document it.
+
 2010-02-08  Larry Kollar  <address@hidden>
 
        * tmac/www.tmac (www-li-ol): Fix indentation if more than 10 items.

Index: NEWS
===================================================================
RCS file: /cvsroot/groff/groff/NEWS,v
retrieving revision 1.259
retrieving revision 1.260
diff -u -b -r1.259 -r1.260
--- NEWS        26 Oct 2009 07:51:02 -0000      1.259
+++ NEWS        16 Feb 2010 21:03:55 -0000      1.260
@@ -1,5 +1,5 @@
     Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-                  2009
+                  2009, 2010
       Free Software Foundation, Inc.
 
     Copying and distribution of this file, with or without modification,
@@ -24,6 +24,12 @@
   request emits warnings in this category when the requested macro file does
   not exist.
 
+Tbl
+---
+
+o A new global option `nowarn' suppresses warnings if tables are longer than
+  the current line width.
+
 Macro Packages
 --------------
 

Index: src/preproc/tbl/main.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/tbl/main.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- src/preproc/tbl/main.cpp    5 Jan 2009 20:11:10 -0000       1.14
+++ src/preproc/tbl/main.cpp    16 Feb 2010 21:03:55 -0000      1.15
@@ -1,6 +1,6 @@
 // -*- C++ -*-
 /* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005,
-                 2007, 2008, 2009
+                 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
@@ -498,6 +498,11 @@
        error("`nospaces' option does not take an argument");
       opt->flags |= table::NOSPACES;
     }
+    else if (strieq(p, "nowarn")) {
+      if (arg)
+       error("`nowarn' option does not take an argument");
+      opt->flags |= table::NOWARN;
+    }
     else if (strieq(p, "decimalpoint")) {
       if (!arg)
        error("`decimalpoint' option requires argument in parentheses");

Index: src/preproc/tbl/table.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/tbl/table.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- src/preproc/tbl/table.cpp   4 Feb 2010 20:11:46 -0000       1.21
+++ src/preproc/tbl/table.cpp   16 Feb 2010 21:03:55 -0000      1.22
@@ -2079,10 +2079,11 @@
   prints("\n");
   prints(".if \\n[" EXPAND_REG "]<0 \\{");
   entry_list->set_location();
+  if (!(flags & NOWARN))
   prints(".tm1 \"warning: file `\\n[.F]', around line \\n[.c]:\n"
          ".tm1 \"  table wider than line width\n"
-        ".nr " EXPAND_REG " 0\n"
-        ".\\}\n");
+          ".nr " EXPAND_REG " 0\n");
+  prints(".\\}\n");
   if (colcount > 1)
     printfs(".nr " EXPAND_REG " \\n[" EXPAND_REG "]/%1\n",
            as_string(colcount));
@@ -2118,15 +2119,17 @@
   printfs("/%1\n", as_string(total_separation));
   prints(".ie \\n[" SEPARATION_FACTOR_REG "]<=0 \\{");
   entry_list->set_location();
+  if (!(flags & NOWARN))
   prints(".tm1 \"warning: file `\\n[.F]', around line \\n[.c]:\n"
          ".tm1 \"  column separation set to zero\n"
-        ".nr " SEPARATION_FACTOR_REG " 0\n"
-        ".\\}\n"
+          ".nr " SEPARATION_FACTOR_REG " 0\n");
+  prints(".\\}\n"
         ".el .if \\n[" SEPARATION_FACTOR_REG "]<1n \\{");
   entry_list->set_location();
+  if (!(flags & NOWARN))
   prints(".tm1 \"warning: file `\\n[.F]', around line \\n[.c]:\n"
-         ".tm1 \"  table squeezed horizontally to fit line length\n"
-        ".\\}\n");
+          ".tm1 \"  table squeezed horizontally to fit line length\n");
+  prints(".\\}\n");
 }
 
 void table::compute_column_positions()

Index: src/preproc/tbl/table.h
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/tbl/table.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- src/preproc/tbl/table.h     5 Jan 2009 20:11:10 -0000       1.16
+++ src/preproc/tbl/table.h     16 Feb 2010 21:03:55 -0000      1.17
@@ -1,6 +1,6 @@
 // -*- C++ -*-
 /* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2007,
-                 2008, 2009
+                 2008, 2009, 2010
    Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
@@ -142,6 +142,7 @@
     DOUBLEBOX    = 0x00000010,
     NOKEEP       = 0x00000020,
     NOSPACES     = 0x00000040,
+    NOWARN       = 0x00000080,
     EXPERIMENTAL = 0x80000000  // undocumented; use as a hook for experiments
     };
   char *expand;

Index: src/preproc/tbl/tbl.man
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/tbl/tbl.man,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- src/preproc/tbl/tbl.man     28 Oct 2009 18:53:43 -0000      1.29
+++ src/preproc/tbl/tbl.man     16 Feb 2010 21:03:55 -0000      1.30
@@ -1,7 +1,7 @@
 '\" t
 .ig
 Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2006, 2007, 2008,
-              2009
+              2009, 2010
   Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
@@ -167,6 +167,11 @@
 Ignore leading and trailing spaces in data items (GNU tbl only).
 .
 .TP
+.B nowarn
+Turn off warnings related to tables
+exceeding the current line width (GNU tbl only).
+.
+.TP
 .BI tab( x )
 Use the character
 .I x




reply via email to

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