summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlemb <wlemb>2002-10-07 09:14:44 +0000
committerwlemb <wlemb>2002-10-07 09:14:44 +0000
commit6b518ebc7930c1594c7987e2c0390cf72c47c806 (patch)
tree41d097d24b8a42764d1d1428ecdc28928814f11c
parent0a718093b72d36a306d8954d4df78d507828d023 (diff)
downloadgroff-6b518ebc7930c1594c7987e2c0390cf72c47c806.tar.gz
* tmac/doc-common (Ss): Add final `.ns' (similar to `.Sh') to
suppress additional whitespace after the header. * tmac/doc-ditroff, tmac/doc-nroff (Am): New string to be in sync with NetBSD. * src/preproc/grn/grn.man, tmac/groff_mdoc.man, NEWS: Updated. * tmac/doc-common(doc-volume-operating-system-ateol): New flag. (Dt): Use it to improve language localization (especially Russian and French). * src/preproc/grn/gprint.h (BSPLINE, BEZIER): New macros. * src/preproc/grn/hdb.cc (DBGetType): Parse spline and bezier drawing commands. * src/preproc/grn/hgraph.cc (drawwig): Add parameter to control curve type. Call `picurve' for BSPLINE. (HGPrintElt): Handle BSPLINE. * src/preproc/grn/README: Document it.
-rw-r--r--ChangeLog27
-rw-r--r--NEWS16
-rw-r--r--src/preproc/grn/README10
-rw-r--r--src/preproc/grn/gprint.h2
-rw-r--r--src/preproc/grn/grn.man4
-rw-r--r--src/preproc/grn/hdb.cc16
-rw-r--r--src/preproc/grn/hgraph.cc28
-rw-r--r--tmac/doc-common23
-rw-r--r--tmac/doc-ditroff1
-rw-r--r--tmac/doc-nroff1
-rw-r--r--tmac/groff_mdoc.man3
11 files changed, 110 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 3757e92b..670ccf79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+2002-10-07 Werner LEMBERG <wl@gnu.org>
+
+ * tmac/doc-common (Ss): Add final `.ns' (similar to `.Sh') to
+ suppress additional whitespace after the header.
+
+ * tmac/doc-ditroff, tmac/doc-nroff (Am): New string to be in sync
+ with NetBSD.
+
+ * src/preproc/grn/grn.man, tmac/groff_mdoc.man, NEWS: Updated.
+
+2002-10-07 Ruslan Ermilov <ru@FreeBSD.org>
+
+ * tmac/doc-common(doc-volume-operating-system-ateol): New flag.
+ (Dt): Use it to improve language localization (especially Russian
+ and French).
+
+2002-10-07 Daniel Senderowicz <daniel@synchrods.com>
+
+ * src/preproc/grn/gprint.h (BSPLINE, BEZIER): New macros.
+ * src/preproc/grn/hdb.cc (DBGetType): Parse spline and bezier
+ drawing commands.
+ * src/preproc/grn/hgraph.cc (drawwig): Add parameter to control
+ curve type.
+ Call `picurve' for BSPLINE.
+ (HGPrintElt): Handle BSPLINE.
+ * src/preproc/grn/README: Document it.
+
2002-10-03 Werner LEMBERG <wl@gnu.org>
* src/roff/troff/node.cc (break_char_node::col): New variable.
diff --git a/NEWS b/NEWS
index f913f574..e8de7e96 100644
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,22 @@ Grolbp
o The option -w (--linewidth) has been added (similar to other device
drivers) to set the default line width.
+Grn
+---
+
+o Support for b-spline and Bezier curves has been added.
+
+Groffer
+-------
+
+o New option `--shell' to select the shell under which groffer shall run.
+
+Macro Packages
+--------------
+
+o The string `Am' (producing an ampersand) has been added to mdoc for
+ compatibility with NetBSD.
+
Miscellaneous
-------------
diff --git a/src/preproc/grn/README b/src/preproc/grn/README
index b5b9fc9a..7ac685e2 100644
--- a/src/preproc/grn/README
+++ b/src/preproc/grn/README
@@ -16,7 +16,15 @@ because the gremlin editor uses the conventional spline
algorithm. The Berkeley grn has the choice of different
stipples. Here, only different shades of gray will be painted
depending on the gremlin file. It is possible to upgrade this at
-a later time. (Daniel Senderowicz <daniel@synchrods.com> 12/28/99)
+a later time. (Daniel Senderowicz <daniel@synchrods.com> 12/28/99)
+
+=====================================================================
+
+Gremlin produces three types of curves: B-Splines, interpolated
+curves and Bezier. As the original Berkeley grn, now groff grn
+will honor B-Splines and interpolated curves. Bezier curves will
+be printed as B-Splines. (Daniel Senderowicz <daniel@synchrods.com>
+10/04/02)
=====================================================================
diff --git a/src/preproc/grn/gprint.h b/src/preproc/grn/gprint.h
index b25305b3..b9df60ee 100644
--- a/src/preproc/grn/gprint.h
+++ b/src/preproc/grn/gprint.h
@@ -38,6 +38,8 @@
#define ARC 4
#define CURVE 5
#define POLYGON 6
+#define BSPLINE 7
+#define BEZIER 8
#define TOPLEFT 10
#define TOPCENT 11
#define TOPRIGHT 12
diff --git a/src/preproc/grn/grn.man b/src/preproc/grn/grn.man
index c37e39d7..9722145b 100644
--- a/src/preproc/grn/grn.man
+++ b/src/preproc/grn/grn.man
@@ -46,7 +46,7 @@ the original English.
.BI \-F dir
]
[
-.IR file\.\.\.
+.IR file\.\.\.\&
]
.PP
It is possible to have whitespace between a command line option and its
@@ -507,6 +507,8 @@ nll.
4@ARC@arc
5@CURVE@curve
6@POLYGON@polygon
+7@BSPLINE@b-spline
+8@BEZIER@B\['e]zier
10@TOPLEFT@top-left-justified text
11@TOPCENT@top-center-justified text
12@TOPRIGHT@top-right-justified text
diff --git a/src/preproc/grn/hdb.cc b/src/preproc/grn/hdb.cc
index 8bbc6b5a..648a5358 100644
--- a/src/preproc/grn/hdb.cc
+++ b/src/preproc/grn/hdb.cc
@@ -211,8 +211,20 @@ DBGetType(register char *s)
case 'A':
return (ARC);
case 'C':
- if (s[1] == 'U')
- return (CURVE);
+ if (s[1] == 'U') {
+ if (s[5] == '\n')
+ return (CURVE);
+ switch (s[7]) {
+ case 'S':
+ return(BSPLINE);
+ case 'E':
+ fprintf(stderr,
+ "Warning: Bezier Curves will be printed as B-Splines\n");
+ return(BSPLINE);
+ default:
+ return(CURVE);
+ }
+ }
switch (s[4]) {
case 'L':
return (CENTLEFT);
diff --git a/src/preproc/grn/hgraph.cc b/src/preproc/grn/hgraph.cc
index 84e7104e..d307faa5 100644
--- a/src/preproc/grn/hgraph.cc
+++ b/src/preproc/grn/hgraph.cc
@@ -60,12 +60,13 @@ void tmove2(int px, int py);
void doarc(POINT cp, POINT sp, int angle);
void tmove(POINT * ptr);
void cr();
-void drawwig(POINT * ptr);
+void drawwig(POINT * ptr, int type);
void HGtline(int x1, int y1);
void dx(double x);
void dy(double y);
void HGArc(register int cx, register int cy, int px, int py, int angle);
void picurve(register int *x, register int *y, int npts);
+void HGCurve(int *x, int *y, int numpoints);
void Paramaterize(int x[], int y[], float h[], int n);
void PeriodicSpline(float h[], int z[],
float dz[], float d2z[], float d3z[],
@@ -128,8 +129,14 @@ HGPrintElt(ELT *element,
break;
case CURVE:
- length = 0; /* keep track of line length */
- drawwig(p1);
+ length = 0; /* keep track of line length */
+ drawwig(p1, CURVE);
+ cr();
+ break;
+
+ case BSPLINE:
+ length = 0; /* keep track of line length */
+ drawwig(p1, BSPLINE);
cr();
break;
@@ -535,16 +542,17 @@ line(int px,
/*----------------------------------------------------------------------------
- | Routine: drawwig (ptr)
+ | Routine: drawwig (ptr, type)
|
| Results: The point sequence found in the structure pointed by ptr is
| placed in integer arrays for further manipulation by the
- | existing routing. With the proper parameters, HGCurve is
- | called.
+ | existing routing. With the corresponding type parameter,
+ | either picurve or HGCurve are called.
*----------------------------------------------------------------------------*/
void
-drawwig(POINT * ptr)
+drawwig(POINT * ptr,
+ int type)
{
register int npts; /* point list index */
int x[MAXPOINTS], y[MAXPOINTS]; /* point list */
@@ -554,8 +562,10 @@ drawwig(POINT * ptr)
y[npts] = (int) (ptr->y * troffscale);
}
if (--npts) {
- /* HGCurve(&x[0], &y[0], npts); */ /*Gremlin looks different, so... */
- picurve(&x[0], &y[0], npts);
+ if (type == CURVE) /* Use the 2 different types of curves */
+ HGCurve(&x[0], &y[0], npts);
+ else
+ picurve(&x[0], &y[0], npts);
}
}
diff --git a/tmac/doc-common b/tmac/doc-common
index 10dc9dca..7310d191 100644
--- a/tmac/doc-common
+++ b/tmac/doc-common
@@ -231,6 +231,7 @@
.\" an alternative, more detailed scheme for naming the manual sections
.\"
.ds doc-volume-operating-system BSD
+.nr doc-volume-operating-system-ateol 0
.ds doc-volume-ds-1 General Commands Manual
.ds doc-volume-ds-2 System Calls Manual
.ds doc-volume-ds-3 Library Functions Manual
@@ -305,13 +306,20 @@
. ds doc-section \$2
. ie \B\$2 \{\
. if ((\$2 >= 1) & (\$2 <= 9)) \{\
-. ds doc-volume "\*[doc-volume-operating-system]
-. if \A\$3 \{\
-. if d doc-volume-as-\$3 \
-. as doc-volume "/\*[doc-volume-as-\$3]
-. \}
-. as doc-volume " \*[doc-volume-ds-\$2]
-. \}\}
+. ie \n[doc-volume-operating-system-ateol] \{\
+. ds doc-volume "\*[doc-volume-ds-\$2] \*[doc-volume-operating-system]
+. if \A\$3 \{\
+. if d doc-volume-as-\$3 \
+. as doc-volume "/\*[doc-volume-as-\$3]
+. \}\}
+. el \{\
+. ds doc-volume "\*[doc-volume-operating-system]
+. if \A\$3 \{\
+. if d doc-volume-as-\$3 \
+. as doc-volume "/\*[doc-volume-as-\$3]
+. \}
+. as doc-volume " \*[doc-volume-ds-\$2]
+. \}\}\}
. el \{\
. ie "\$2"unass" .ds doc-volume DRAFT
. el \{ .ie "\$2"draft" .ds doc-volume DRAFT
@@ -884,6 +892,7 @@
. if !\n[cR] \
. ne 2
. br
+. ns
. \}
..
.
diff --git a/tmac/doc-ditroff b/tmac/doc-ditroff
index 8b8bd00a..94f7e504 100644
--- a/tmac/doc-ditroff
+++ b/tmac/doc-ditroff
@@ -187,6 +187,7 @@
.ds If \[if]
.ds Na \f[I]NaN\f[]
.ds Ba \f[R]|\f[]
+.ds Am &
.
.nr gX 0
.
diff --git a/tmac/doc-nroff b/tmac/doc-nroff
index 250163c1..9c5f3075 100644
--- a/tmac/doc-nroff
+++ b/tmac/doc-nroff
@@ -165,6 +165,7 @@
.ds Pm \[+-]
.ds Na \f[I]NaN\f[]
.ds Ba \f[R]|\f[]
+.ds Am &
.
.\" Unicode TTYs have all glyph forms; for other TTY character sets we need
.\" character representations which are different from GNU troff's standard
diff --git a/tmac/groff_mdoc.man b/tmac/groff_mdoc.man
index 3ffe00d8..5033cb57 100644
--- a/tmac/groff_mdoc.man
+++ b/tmac/groff_mdoc.man
@@ -46,7 +46,7 @@
.\" for an already extremely slow package.
.\"
.
-.Dd July 20, 2001
+.Dd October 07, 2002
.Os
.Dt GROFF_MDOC 7
.
@@ -3843,6 +3843,7 @@ The following strings are predefined:
.It Li Gt Ta > Ta \*[Gt] Ta "greater than"
.It Li Pm Ta +\- Ta \*[Pm] Ta "plus minus"
.It Li If Ta infinity Ta \*[If] Ta "infinity"
+.It Li Am Ta \*[Am] Ta \*[Am] Ta "ampersand"
.It Li Na Ta \*[Na] Ta \*[Na] Ta "not a number"
.It Li Ba Ta \*[Ba] Ta \*[Ba] Ta "vertical bar"
.El