summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog22
-rw-r--r--NEWS6
-rw-r--r--PROJECTS2
-rwxr-xr-xconfigure2
-rwxr-xr-xconfigure.in2
-rw-r--r--src/devices/grolbp/lbp.cc15
-rw-r--r--src/roff/troff/env.cc101
-rw-r--r--src/roff/troff/env.h1
-rw-r--r--tmac/groff_man.man209
9 files changed, 321 insertions, 39 deletions
diff --git a/ChangeLog b/ChangeLog
index 4d31d867..aae09a5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2000-03-06 Werner LEMBERG <wl@gnu.org>
+
+ * tmac/groff_man.man: Completely revised to cover everything in
+ tmac.an.
+
+2000-03-05 Abramo Bagnara <abramo@alsa-project.org>
+
+ Adding a request `evc' to copy environments.
+
+ * src/roff/troff/env.cc (environment::copy, environment_copy):
+ Implement it.
+ * src/roff/troff/env.h: Add prototype.
+
+2000-03-05 Francisco Andres Verdu <pandres@dragonet.es>
+
+ Adding strsep() -- Solaris 8 doesn't have it.
+
+ * configure.in: Test it.
+ * src/devices/grolbp/lbp.cc: Add code.
+
2000-03-05 Werner LEMBERG <wl@gnu.org>
* src/roff/troff/div.cc (macro_diversion::output,
@@ -9,6 +29,8 @@
* Makefile.in: Create Makefile.dep if necessary before calling the
submake process to avoid warning about nonexistent file.
+ * NEWS, PROJECTS: Updated.
+
2000-03-04 Werner LEMBERG <wl@gnu.org>
* tmac/troffrc: Add tmac.lbp.
diff --git a/NEWS b/NEWS
index df0eeb25..f34345e5 100644
--- a/NEWS
+++ b/NEWS
@@ -106,6 +106,12 @@ Pic
Added the `srand' command to set the seed for a new sequence of
pseudo-random numbers to be returned by `rand'.
+Gxditview
+---------
+
+Simplified installation: The Imakefile will now be configured (by groff's
+configure script).
+
VERSION 1.13, 1.14, 1.15
========================
diff --git a/PROJECTS b/PROJECTS
index 7c22c5b0..87aa844f 100644
--- a/PROJECTS
+++ b/PROJECTS
@@ -1,6 +1,6 @@
Here are some things that would be useful additions to groff:
- grap (see the file MORE.STUFF for more)
+ ideal preprocessor
-mv macros (for typesetting viewgraphs and slides)
diff --git a/configure b/configure
index 698d570e..5086ad06 100755
--- a/configure
+++ b/configure
@@ -2303,7 +2303,7 @@ done
LIBS="$saved_libs"
-for ac_func in rename mkstemp strcasecmp
+for ac_func in rename mkstemp strcasecmp strsep
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2310: checking for $ac_func" >&5
diff --git a/configure.in b/configure.in
index e757a9d9..4f88ab60 100755
--- a/configure.in
+++ b/configure.in
@@ -39,7 +39,7 @@ saved_libs="$LIBS"
LIBS="$LIBS -lc $LIBM"
AC_REPLACE_FUNCS(fmod strtol getcwd strerror putenv)
LIBS="$saved_libs"
-AC_CHECK_FUNCS(rename mkstemp strcasecmp)
+AC_CHECK_FUNCS(rename mkstemp strcasecmp strsep)
AC_DECL_SYS_SIGLIST
dnl checks for compiler characteristics
GROFF_ARRAY_DELETE
diff --git a/src/devices/grolbp/lbp.cc b/src/devices/grolbp/lbp.cc
index fe5a7609..4a58a098 100644
--- a/src/devices/grolbp/lbp.cc
+++ b/src/devices/grolbp/lbp.cc
@@ -521,6 +521,19 @@ static struct
{ "executive", 40 },
};
+#ifndef HAVE_STRSEP
+// Solaris 8 doesn't have the strsep function
+char *strsep(char **pcadena, const char *delim)
+{
+ char *p;
+
+ p = strtok(*pcadena,delim);
+ *pcadena = strtok(NULL,delim);
+ return p;
+
+};
+#endif
+
static int set_papersize(const char *papersize)
{
int i;
@@ -693,8 +706,8 @@ int main(int argc, char **argv)
else
error("unknown orientation '%1'", optarg);
};
- };
break;
+ };
case 'c' : {
char *ptr;
long n = strtol(optarg, &ptr, 10);
diff --git a/src/roff/troff/env.cc b/src/roff/troff/env.cc
index fc7abe40..fb9576ce 100644
--- a/src/roff/troff/env.cc
+++ b/src/roff/troff/env.cc
@@ -661,6 +661,79 @@ environment::environment(const environment *e)
{
}
+void environment::copy(const environment *e)
+{
+ prev_line_length = e->prev_line_length;
+ line_length = e->line_length;
+ prev_title_length = e->prev_title_length;
+ title_length = e->title_length;
+ prev_size = e->prev_size;
+ size = e->size;
+ prev_requested_size = e->prev_requested_size;
+ requested_size = e->requested_size;
+ char_height = e->char_height;
+ char_slant = e->char_slant;
+ space_size = e->space_size;
+ sentence_space_size = e->sentence_space_size;
+ adjust_mode = e->adjust_mode;
+ fill = e->fill;
+ interrupted = 0;
+ prev_line_interrupted = 0;
+ center_lines = 0;
+ right_justify_lines = 0;
+ prev_vertical_spacing = e->prev_vertical_spacing;
+ vertical_spacing = e->vertical_spacing;
+ prev_post_vertical_spacing = e->prev_post_vertical_spacing,
+ post_vertical_spacing = e->post_vertical_spacing,
+ prev_line_spacing = e->prev_line_spacing;
+ line_spacing = e->line_spacing;
+ prev_indent = e->prev_indent;
+ indent = e->indent;
+ have_temporary_indent = 0;
+ temporary_indent = 0;
+ underline_lines = 0;
+ input_trap_count = 0;
+ prev_text_length = e->prev_text_length;
+ width_total = 0;
+ space_total = 0;
+ input_line_start = 0;
+ control_char = e->control_char;
+ no_break_control_char = e->no_break_control_char;
+ hyphen_indicator_char = e->hyphen_indicator_char;
+ spread_flag = 0;
+ line = 0;
+ pending_lines = 0;
+ discarding = 0;
+ tabs = e->tabs;
+ current_tab = TAB_NONE;
+ current_field = 0;
+ margin_character_flags = e->margin_character_flags;
+ margin_character_node = e->margin_character_node;
+ margin_character_distance = e->margin_character_distance;
+ numbering_nodes = 0;
+ number_text_separation = e->number_text_separation;
+ line_number_multiple = e->line_number_multiple;
+ line_number_indent = e->line_number_indent;
+ no_number_count = e->no_number_count;
+ tab_char = e->tab_char;
+ leader_char = e->leader_char;
+ hyphenation_flags = e->hyphenation_flags;
+ fontno = e->fontno;
+ prev_fontno = e->prev_fontno;
+ dummy = e->dummy;
+ family = e->family;
+ prev_family = e->prev_family;
+ leader_node = 0;
+#ifdef WIDOW_CONTROL
+ widow_control = e->widow_control;
+#endif /* WIDOW_CONTROL */
+ hyphen_line_max = e->hyphen_line_max;
+ hyphen_line_count = 0;
+ hyphenation_space = e->hyphenation_space;
+ hyphenation_margin = e->hyphenation_margin;
+ composite = 0;
+}
+
environment::~environment()
{
delete leader_node;
@@ -935,6 +1008,33 @@ void environment_switch()
skip_line();
}
+void environment_copy()
+{
+ symbol nm;
+ environment *e=0;
+ tok.skip();
+ if (!tok.delimiter()) {
+ // It looks like a number.
+ int n;
+ if (get_integer(&n)) {
+ if (n >= 0 && n < NENVIRONMENTS)
+ e = env_table[n];
+ else
+ nm = itoa(n);
+ }
+ }
+ else
+ nm = get_long_name(1);
+ if (!e && !nm.is_null())
+ e = (environment *)env_dictionary.lookup(nm);
+ if (e == 0) {
+ error("Inexistent environment to copy from");
+ return;
+ }
+ else
+ curenv->copy(e);
+ skip_line();
+}
static symbol P_symbol("P");
@@ -2673,6 +2773,7 @@ void init_env_requests()
init_request("ad", adjust);
init_request("na", no_adjust);
init_request("ev", environment_switch);
+ init_request("evc", environment_copy);
init_request("lt", title_length);
init_request("ps", point_size);
init_request("ft", font_change);
diff --git a/src/roff/troff/env.h b/src/roff/troff/env.h
index c0cc90da..1db463da 100644
--- a/src/roff/troff/env.h
+++ b/src/roff/troff/env.h
@@ -206,6 +206,7 @@ public:
environment(symbol);
environment(const environment *); // for temporary environment
~environment();
+ void copy(const environment *);
int is_dummy() { return dummy; }
int is_empty();
int is_composite() { return composite; }
diff --git a/tmac/groff_man.man b/tmac/groff_man.man
index 57eb9ec4..1048e43f 100644
--- a/tmac/groff_man.man
+++ b/tmac/groff_man.man
@@ -1,9 +1,16 @@
+.de TQ
+.br
+.ns
+.TP \\$1
+..
.TH GROFF_MAN @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
.
.SH NAME
.
groff_man \- groff `an' macros to support generation of man pages
+.
.SH SYNOPSIS
+.
.B groff
.B \-m@TMAC_AN_PREFIX@an
[
@@ -22,8 +29,47 @@ macros used to generate man pages with
were written by James Clark.
This document provides a brief summary of the use of each macro in that
package.
+.
+.SH OPTIONS
+.
+The
+.B man
+macros understand the following command line options (which define various
+registers).
+.TP
+.B \-rC1
+If more than one manual page is given on the command line, number the
+pages continuously, rather than starting each at\ 1.
+.TP
+.B \-rD1
+Double-sided printing.
+Footers for even and odd pages look different.
+.TP
+.BI \-rP nnn
+Enumeration of pages will start with
+.I nnn
+rather than with\ 1.
+.TP
+.BI \-rX nnn
+After page
+.IR nnn ,
+number pages as
+.IR nnn a,
+.IR nnn b,
+.IR nnn c,
+etc.
+For example, the option `\-rX2' will produce the following page numbers:
+1, 2, 2a, 2b, 2c, etc.
+.
+.SH USAGE
+.
+This section describes the available macros for manual pages.
+For further customization, put additional macros and requests into the file
+.B man.local
+which will be loaded immediately after
+.BR tmac.an .
.TP
-.BI .TP " title section " [ extra1 "] [" extra2 "] [" extra3 ]
+.BI .TH " title section " [ extra1 "] [" extra2 "] [" extra3 ]
Sets the title of the man page to
.I title
and the section to
@@ -34,21 +80,28 @@ The value
may also have a string appended, e.g. `.pm', to indicate a specific
subsection of the man pages.
.TP
-.BI .SH " text for a heading"
-Sets up an unindented and unnumbered section heading.
-Prints out all the text following `.SH' up to the end of the line in bold
-face, with a size slightly smaller than that for indented section headings.
+.BI ".SH [" "text for a heading" ]
+Sets up an unnumbered section heading sticking out to the left.
+Prints out all the text following `.SH' up to the end of the line (resp. the
+text in the next line if there is no argument to `.SH') in bold face, at a
+default size of 9\ point.
+Additionally, the left margin for the following text is reset to its default
+value.
.TP
-.BI .SS " text for a heading"
-Sets up an indented section heading.
-Prints out all the text following `.SS' up to the end of the line in bold
-face, with a size slightly larger than that for unindented section headings.
+.BI ".SS [" "text for a heading" ]
+Sets up an unnumbered section heading.
+Prints out all the text following `.SS' up to the end of the line (resp. the
+text in the next line if there is no argument to `.SS') in bold face, at a
+default size of 10\ point.
+Additionally, the left margin for the following text is reset to its default
+value.
.TP
.BI ".TP [" nnn ]
-Sets up an indented paragraph.
+Sets up an indented paragraph with label.
The indentation is set to
.I nnn
-if that argument is supplied.
+if that argument is supplied (the default unit is `n' if omitted), otherwise
+it is set to the default indentation value.
The first line of text following this macro is interpreted as a string to be
printed flush-left, as it is appropriate for a label.
It is not interpreted as part of a paragraph, so there is no attempt to fill
@@ -58,26 +111,38 @@ paragraph starts at the same line (but indented), continuing on the
following lines.
If the label is wider than the indentation, then the descriptive part of the
paragraph begins on the line following the label, entirely indented.
+Note that neither font shape nor font size of the label is set to a default
+value; on the other hand, the rest of the text will have default font
+settings.
The `.TP' macro is the macro used for the explanations you are just reading.
.TP
-.BR ".LP " or " .PP " or " .P"
+.B .LP
+.TQ
+.B .PP
+.TQ
+.B .P
These macros are mutual aliases.
Any of them causes a line break at the current position, followed by a
-vertical space downwards by the amount that is set in the `PD' counter.
+vertical space downwards by the amount specified by the `PD' macro.
+The font size and shape are reset to the default value (10pt resp. Roman).
+Finally, the current left margin is restored.
.TP
.BI ".IP [" designator "] [" nnn ]
Sets up an indented paragraph, using
.I designator
as a tag to mark its beginning.
-The indentation is permanently set to
+The indentation is set to
.I nnn
-if that argument is supplied.
-To set the indentation back to the previous level, one must call some other
-macro that uses indented paragraphs, and explicitly provide it with the
-value of the previous indentation.
+if that argument is supplied (default unit is `n'), otherwise the default
+indentation value is used.
+Font size and face of the paragraph (but not the designator) are reset to
+its default values.
+To start an indented paragraph with a particular indentation but without a
+designator, use `""' (two doublequotes) as the second argument.
.IP
For example, the following paragraphs were all set up with bullets as the
-designator, using `.IP \\(bu 4':
+designator, using `.IP\ \\(bu\ 4':
+.RS
.IP \(bu 4
`IP' is one of the three macros used in
.B tmac.an
@@ -87,43 +152,69 @@ to format lists.
This macro produces a paragraph with a left hanging indentation.
.IP \(bu 4
`TP' is another.
-This macro produces an unindented label (given by the text on the first line
-following `TP'), followed by an indented paragraph with appropriately
-descriptive text.
+This macro produces an unindented label followed by an indented paragraph.
+.RE
.TP
.BI ".HP [" nnn ]
-Sets up paragraphs with hanging left indentation.
+Sets up a paragraph with hanging left indentation.
The indentation is set to
.I nnn
-if that argument is supplied.
-The following pargraph illustrates the effect of this macro with the hanging
-indentation set to\ 2:
-.HP 2
-This is a pagraph following an invocation of the `.HP' macro.
+if that argument is supplied (default unit is `n'), otherwise the default
+indentation value is used.
+Font size and face are reset to its default values.
+The following paragraph illustrates the effect of this macro with hanging
+indentation set to\ 4:
+.RS
+.HP 4
+This is a paragraph following an invocation of the `.HP' macro.
As you can see, it produces a paragraph where all lines but the first are
flushed right and are shorter than the preceding lines.
+.RE
+.TP
+.BI ".RS [" nnn ]
+This macro moves the left margin to the right by the value
+.I nnn
+if specified (default unit is `n'); otherwise the default indentation value
+is used.
+Calls to the `RS' macro can be nested.
+.TP
+.BI ".RE [" nnn ]
+This macro moves the left margin back to level
+.IR nnn ;
+if no argument is given, it moves one level back.
+The first level (i.e., no call to `RS' yet) has number\ 1, and each call to
+`RS' increases the level by\ 1.
.
.SH "MACROS TO SET FONTS"
.
+The standard font is Roman; the default text size is 10 point.
.TP
-.BI .SM
+.BI ".SM [" text ]
Causes the text on the same line or the text on the next line to appear in a
font that is one point size smaller than the default font.
.TP
-.BI .SB
+.BI ".SB [" text ]
Causes the text on the same line or the text on the next line to appear in
-small boldface font.
+boldface font, one point size smaller than the default font.
.TP
.BI ".BI " text
Causes text on the same line to appear alternately in bold face and italic.
The text must be on the same line as the macro call.
-Thus `.BI this word and that' would cause `this' and `and' to appear in bold
-face, while `word' and `that' appear in italics.
+Thus `.BI this "word and" that' would cause `this' and `that' to appear in
+bold face, while `word and' appears in italics.
.TP
.BI ".IB " text
Causes text to appear alternately in italic and bold face.
The text must be on the same line as the macro call.
.TP
+.BI ".RI " text
+Causes text on the same line to appear alternately in roman and italic.
+The text must be on the same line as the macro call.
+.TP
+.BI ".IR " text
+Causes text on the same line to appear alternately in italic and roman.
+The text must be on the same line as the macro call.
+.TP
.BI ".BR " text
Causes text on the same line to appear alternately in bold face and roman.
The text must be on the same line as the macro call.
@@ -139,16 +230,64 @@ of the next line appears in roman.
This is the default font to which text is returned at the end of processing
of the other macros.
.TP
-.BI ".B " text
+.BI ".B [" text ]
Causes text to appear in bold face.
If no text is present on the line where the macro is called, then the text
of the next line appears in bold face.
.TP
-.BI ".I " text
+.BI ".I [" text ]
Causes text to appear in italic.
If no text is present on the line where the macro is called, then the text
of the next line appears in italic.
.
+.SH "MISCELLANEOUS"
+.
+The default indentation is 7.2n for all output devices except for
+.B grohtml
+which uses 1.2i instead.
+.TP
+.B .DT
+Sets tabs every 0.5 inches.
+Since this macro is always called during a
+.B TH
+request, it makes sense to call it only if the tab positions have been
+changed.
+.TP
+.BI ".PD [" nnn ]
+Adjusts the empty space before a new paragraph (resp. section).
+The optional argument gives the amount of space (default units are `v');
+without parameter, the value is reset to its default value (1 line for tty
+devices, 0.4v otherwise).
+This affects the macros
+.BR SH ,
+.BR SS ,
+.BR TP ,
+.B LP
+(resp.\&
+.B PP
+and
+.BR P ),
+.BR IP ,
+and
+.BR HP .
+.PP
+The following strings are defined:
+.TP
+.B \e*S
+Switch back to the default font size.
+.TP
+.B \e*R
+The `registered' sign.
+.TP
+.B \e*(Tm
+The `trademark' sign.
+.TP
+.B \e*(lq
+.TQ
+.B \e*(rq
+Left and right quote.
+This is equal to `\e(lq' and `\e(rq', respectively.
+.
.SH "SEE ALSO"
.
Since the