summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlemb <wlemb>2001-11-16 20:03:41 +0000
committerwlemb <wlemb>2001-11-16 20:03:41 +0000
commitba35c4a4941639c12b09cd92b01df28df1936b4f (patch)
treeace44958dc4f74c76100b0244ae8f5f813f9978b
parent6277e9b4bbcab510013f15d5963150e8b354e004 (diff)
downloadgroff-ba35c4a4941639c12b09cd92b01df28df1936b4f.tar.gz
* NEWS, man/groff_differences.man, doc/groff.texinfo: Updated.
* man/Makefile.sub: Include groff_differences.man. * VERSION: Set to 1.18. * REVISION: Set to 0. * src/roff/troff/input.cc (do_define_macro): Allow whitespace before the second dot (or ending macro name) to end a macro. * doc/groff.texinfo: Doc fix. * tmac/doc-common (doc-header): Handle very long document titles better. * tmac/doc.tmac (doc-do-Bl-args): Fix .substring requests.
-rw-r--r--ChangeLog22
-rw-r--r--NEWS13
-rw-r--r--REVISION2
-rw-r--r--VERSION2
-rw-r--r--doc/groff.texinfo45
-rw-r--r--man/.cvsignore1
-rw-r--r--man/Makefile.sub1
-rwxr-xr-xman/groff_differences.man18
-rw-r--r--src/roff/troff/input.cc16
-rw-r--r--tmac/doc-common13
-rw-r--r--tmac/doc.tmac4
11 files changed, 108 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index 78b3801b..7749a788 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2001-11-16 Werner LEMBERG <wl@gnu.org>
+
+ * NEWS, man/groff_differences.man, doc/groff.texinfo: Updated.
+ * man/Makefile.sub: Include groff_differences.man.
+ * VERSION: Set to 1.18.
+ * REVISION: Set to 0.
+
+2001-11-16 Bernd Warken <bwarken@mayn.de>
+
+ * src/roff/troff/input.cc (do_define_macro): Allow whitespace before
+ the second dot (or ending macro name) to end a macro.
+ * doc/groff.texinfo: Doc fix.
+
+2001-11-16 Ruslan Ermilov <ru@FreeBSD.org>
+
+ * tmac/doc-common (doc-header): Handle very long document titles
+ better.
+
+2001-11-16 Werner LEMBERG <wl@gnu.org>
+
+ * tmac/doc.tmac (doc-do-Bl-args): Fix .substring requests.
+
2001-11-15 Werner LEMBERG <wl@gnu.org>
* src/roff/troff/troff.man: Revised and split into troff.man and...
diff --git a/NEWS b/NEWS
index f9661595..b77b68f3 100644
--- a/NEWS
+++ b/NEWS
@@ -11,7 +11,7 @@ o Color support has been added to troff and pic (and to two device drivers,
grops and grohtml -- other preprocessors and drivers will follow). A new
function `defcolor' defines colors; the escape sequence `\m' sets the
drawing color, the escape sequence `\M' specifies the background color for
- clsed objects created with \D'...' commands. Similar to fonts, `\mP' and
+ closed objects created with \D'...' commands. Similar to fonts, `\mP' and
`\MP' switch back to the previous color. `\m' and `\M' correspond to the
new troff output commands `m' and `DF'.
@@ -25,6 +25,17 @@ o Color support has been added to troff and pic (and to two device drivers,
More details can be found in the troff manual page.
+o It is now possible to have whitespace between the first and second dot (or
+ the name of the ending macro) to end a macro definition. Example:
+
+ .de foo
+ . nop Hello, I'm `foo'.
+ . nop I will now define `bar'.
+ . de bar
+ . nop Hello, I'm `bar'.
+ . .
+ ..
+
o Two macros `AT' (AT&T) and `UC' (Univ. of California) have been added to
the man macros for compatibility with older BSD releases.
diff --git a/REVISION b/REVISION
index 00750edc..573541ac 100644
--- a/REVISION
+++ b/REVISION
@@ -1 +1 @@
-3
+0
diff --git a/VERSION b/VERSION
index b48f3226..adc97d8e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.17
+1.18
diff --git a/doc/groff.texinfo b/doc/groff.texinfo
index 3510c216..3b896e58 100644
--- a/doc/groff.texinfo
+++ b/doc/groff.texinfo
@@ -7244,8 +7244,8 @@ lines (starting with the next one) into an internal buffer until it
encounters the line @samp{..} (two dots). The optional second
argument to @code{de} changes this to a macro to @samp{.@var{end}}.
-Note that no leading whitespace is allowed in the line containing the
-ending token (either @samp{..} or the macro @samp{.@var{end}}).
+There can be whitespace after the first dot in the line containing the
+ending token (either @samp{.} or macro @samp{@var{end}}).
Here a small example macro called @samp{P} which causes a break and
inserts some vertical space. It could be used to separate paragraphs.
@@ -7406,7 +7406,7 @@ The @code{als} request can make a macro have more than one name.
This would be called as
@Example
-.vl $Id: groff.texinfo,v 1.81 2001/10/05 14:12:11 wlemb Exp $
+.vl $Id: groff.texinfo,v 1.82 2001/11/16 20:03:43 wlemb Exp $
@endExample
@endDefesc
@@ -8092,28 +8092,35 @@ and @code{dl} contain the vertical and horizontal size of the diversion.
@example
@group
.\" Center text both horizontally & vertically
+.
+.\" Enclose macro definitions in .eo and .ec to avoid the doubling of \
+.eo
+.\" macro .(c starts centering mode
.de (c
-.br
-.nf
-.di @@c
+. br
+. nf
+. di @@c
..
@end group
@group
+.\" macro .)c terminates centering mode
.de )c
-.br
-.di
-.nr @@s (((\\n(.tu-\\n(dnu)/2u)-1v)
-.sp \\n(@@su
-.ce 1000
-.nf
-.@c
-.br
-.ce 0
-.sp \\n(@@su
-.br
-.fi
-.rr @@s
+. br
+. di
+. nr @@s (((\n[.t]u - \n[dn]u) / 2u) - 1v)
+. sp \n[@@s]u
+. ce 1000
+. @@c
+. ce 0
+. sp \n[@@s]u
+. br
+. fi
+. rr @@s
+. rm @@s
+. rm @@c
..
+.\" End of macro definitions, restore escape mechanism
+.ec
@end group
@end example
@endDefreg
diff --git a/man/.cvsignore b/man/.cvsignore
index 98d21d85..28ea4a8b 100644
--- a/man/.cvsignore
+++ b/man/.cvsignore
@@ -1,5 +1,6 @@
groff.n
groff_char.n
+groff_differences.n
groff_font.n
groff_out.n
roff.n
diff --git a/man/Makefile.sub b/man/Makefile.sub
index 020d20ff..0ea5c591 100644
--- a/man/Makefile.sub
+++ b/man/Makefile.sub
@@ -3,5 +3,6 @@ MAN5=\
groff_out.n
MAN7=\
groff_char.n \
+ groff_differences.n \
groff.n \
roff.n
diff --git a/man/groff_differences.man b/man/groff_differences.man
index 960cd44d..0dd9e98e 100755
--- a/man/groff_differences.man
+++ b/man/groff_differences.man
@@ -2207,6 +2207,24 @@ The
request can now map characters onto
.BR \e~ .
.
+.P
+It is now possible to have whitespace between the first and second dot (or
+the name of the ending macro) to end a macro definition.
+Example:
+.
+.IP
+.NE 6v+\n(.Vu
+.ft B
+.nf
+\&.de foo
+\&. nop Hello, I'm `foo'.
+\&. nop I will now define `bar'.
+\&. de bar
+\&. nop Hello, I'm `bar'.
+\&. .
+\&..
+.fi
+.
.
.\" --------------------------------------------------------------------
.SH Incompatibilities
diff --git a/src/roff/troff/input.cc b/src/roff/troff/input.cc
index 09e05029..9591001a 100644
--- a/src/roff/troff/input.cc
+++ b/src/roff/troff/input.cc
@@ -3797,11 +3797,17 @@ void do_define_macro(define_mode mode, calling_mode calling)
const char *s = term.contents();
int d = 0;
// see if it matches term
- int i;
- for (i = 0; s[i] != 0; i++) {
- d = get_copy(&n);
- if ((unsigned char)s[i] != d)
- break;
+ int i = 0;
+ if (s[0] != 0) {
+ while ((d = get_copy(&n)) == ' ' || d == '\t')
+ ;
+ if ((unsigned char)s[0] == d) {
+ for (i = 1; s[i] != 0; i++) {
+ d = get_copy(&n);
+ if ((unsigned char)s[i] != d)
+ break;
+ }
+ }
}
if (s[i] == 0
&& ((i == 2 && compatible_flag)
diff --git a/tmac/doc-common b/tmac/doc-common
index 9e1a81a2..5730ce65 100644
--- a/tmac/doc-common
+++ b/tmac/doc-common
@@ -522,12 +522,25 @@
.
.\" NS doc-header macro
.\" NS print page header
+.\" NS
+.\" NS local variables:
+.\" NS doc-reg-dh
+.\" NS doc-reg-dh1
.
.de doc-header
. ev doc-env-dh
. doc-setup-page-layout
. if !\n[cR] \
' sp \n[doc-header-space]u
+. nr doc-reg-dh \w'\*[doc-caption-font]\*[doc-header-string]\f[P]'
+. nr doc-reg-dh1 \w'\*[doc-caption-font2]\*[doc-volume]\f[P]'
+. if (\n[doc-reg-dh] + \n[doc-reg-dh1] + \n[doc-reg-dh] >= \n[.lt]) \{\
+. while (\n[doc-reg-dh] + \n[doc-reg-dh1] + \n[doc-reg-dh] >= \n[.lt]) \{\
+. substring doc-header-string 1 -1
+. nr doc-reg-dh \w'\*[doc-caption-font]\*[doc-header-string]\|.\|.\|.\f[P]'
+. \}
+. as doc-header-string "\|.\|.\|.
+. \}
. tl \*[doc-caption-font]\*[doc-header-string]\f[P]\*[doc-caption-font2]\*[doc-volume]\f[P]\*[doc-caption-font]\*[doc-header-string]\f[P]
' sp \n[doc-header-space]u
. ev
diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index 2814aa9b..d5a4c9c2 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -3079,7 +3079,7 @@
. ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
.
. ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
-. substring doc-str-dBla 1 2
+. substring doc-str-dBla 1 1
. ie .\*[doc-str-dBla] \{\
. ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
. substring doc-str-dBla 2
@@ -3205,7 +3205,7 @@
. ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
. nr doc-num-columns +1
. ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
-. substring doc-str-dBla 1 2
+. substring doc-str-dBla 1 1
. ie .\*[doc-str-dBla] \{\
. ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
. substring doc-str-dBla 2