[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Negative patch (removed round_width)
From: |
Gaius Mulley |
Subject: |
[Groff] Negative patch (removed round_width) |
Date: |
28 Oct 2004 12:00:48 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Hi Werner,
as requested here is a patch to remove the unnecessary round_width
from all devices except grohtml. Hopefully this is a pleasant negative
line count patch!
I created the patch against the cvs of this morning and built it on
pure64 debian unstable - and it flew :-) 43sec to build (real time). I
remember when groff took 10 minutes to build on a 350 Mhz Pentium II
(without the -O2 to save time..). Anyway enough reminiscences, here
is the patch,
Gaius
--- groff-cvs/src/include/printer.h 2004-10-07 12:50:16.000000000 +0100
+++ groff-html/src/include/printer.h 2004-10-28 10:58:40.794062568 +0100
@@ -83,7 +83,6 @@
virtual void end_of_line();
virtual void special(char *arg, const environment *env,
char type = 'p');
- virtual int round_width(int);
protected:
font_pointer_list *font_list;
--- groff-cvs/src/devices/grodvi/dvi.cpp 2004-10-07 12:50:17.000000000
+0100
+++ groff-html/src/devices/grodvi/dvi.cpp 2004-10-28 11:36:29.753128360
+0100
@@ -112,11 +112,6 @@
output_font() : f(0) { }
};
-int printer::round_width(int x)
-{
- return x;
-}
-
class dvi_printer : public printer {
FILE *fp;
int max_drift;
--- groff-cvs/src/devices/grohtml/post-html.cpp 2004-10-15 06:08:35.000000000
+0100
+++ groff-html/src/devices/grohtml/post-html.cpp 2004-10-28
11:31:26.485232088 +0100
@@ -2074,6 +2074,7 @@
void handle_assertion (int minv, int minh, int maxv, int maxh,
const char *s);
void handle_state_assertion (text_glob *g);
void do_end_para (text_glob *g);
+ int round_width (int x);
// ADD HERE
public:
@@ -4786,7 +4787,7 @@
* taken from number.cpp in src/roff/troff, [hunits::hunits(units x)]
*/
-int printer::round_width(int x)
+int html_printer::round_width(int x)
{
int r = font::hor;
int n;
--- groff-cvs/src/devices/grolbp/lbp.cpp 2004-10-07 12:50:17.000000000
+0100
+++ groff-html/src/devices/grolbp/lbp.cpp 2004-10-28 11:37:08.545231064
+0100
@@ -59,11 +59,6 @@
lbp_font(const char *);
};
-int printer::round_width(int x)
-{
- return x;
-}
-
class lbp_printer : public printer {
public:
lbp_printer(int, double, double);
--- groff-cvs/src/devices/grolj4/lj4.cpp 2004-10-07 12:50:17.000000000
+0100
+++ groff-html/src/devices/grolj4/lj4.cpp 2004-10-28 11:37:25.124710600
+0100
@@ -159,11 +159,6 @@
}
}
-int printer::round_width(int x)
-{
- return x;
-}
-
class lj4_printer : public printer {
public:
lj4_printer(int);
--- groff-cvs/src/devices/grops/ps.cpp 2004-10-07 12:50:17.000000000 +0100
+++ groff-html/src/devices/grops/ps.cpp 2004-10-28 11:37:44.086827920 +0100
@@ -1778,11 +1778,6 @@
--invis_count;
}
-int printer::round_width(int x)
-{
- return x;
-}
-
printer *make_printer()
{
return new ps_printer(user_paper_length);
--- groff-cvs/src/devices/grotty/tty.cpp 2004-10-07 12:50:17.000000000
+0100
+++ groff-html/src/devices/grotty/tty.cpp 2004-10-28 11:37:51.390717560
+0100
@@ -192,11 +192,6 @@
}
}
-int printer::round_width(int x)
-{
- return x;
-}
-
class tty_printer : public printer {
int is_utf8;
glyph **lines;