head	1.11;
access;
symbols
	groff-1_19:1.10
	groff-1_18_1:1.10
	groff-1_18:1.10
	groff-1_17_2:1.8
	groff-1_17_1:1.8
	groff-1_17a:1.7
	groff-1_17:1.7
	groff-1_16_1b:1.3
	groff-1_16_1a:1.3
	groff-1_16_1:1.3
	groff-1_16:1.3
	groff-20000311:1.3
	groff-20000310-1:1.3
	groff-20000310:1.3
	pre-1_16:1.1.1.1
	start:1.1.1.1
	wlemb:1.1.1;
locks; strict;
comment	@# @;


1.11
date	2003.12.30.06.31.36;	author wlemb;	state dead;
branches;
next	1.10;

1.10
date	2002.01.19.18.39.09;	author wlemb;	state Exp;
branches;
next	1.9;

1.9
date	2001.10.05.14.12.09;	author wlemb;	state Exp;
branches;
next	1.8;

1.8
date	2001.06.11.13.57.39;	author wlemb;	state Exp;
branches;
next	1.7;

1.7
date	2001.04.14.14.25.12;	author wlemb;	state Exp;
branches;
next	1.6;

1.6
date	2001.01.23.07.39.13;	author wlemb;	state Exp;
branches;
next	1.5;

1.5
date	2000.10.25.21.06.41;	author wlemb;	state Exp;
branches;
next	1.4;

1.4
date	2000.08.25.07.44.04;	author wlemb;	state Exp;
branches;
next	1.3;

1.3
date	2000.03.03.21.48.41;	author wlemb;	state Exp;
branches;
next	1.2;

1.2
date	2000.02.21.15.07.31;	author wlemb;	state Exp;
branches;
next	1.1;

1.1
date	2000.02.06.09.34.43;	author wlemb;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.02.06.09.34.43;	author wlemb;	state Exp;
branches;
next	;


desc
@@


1.11
log
@


More fixes for MSVC compiler.

* doc/Makefile.sub, contrib/mom/Makefile.sub (GROFF_BIN_PATH): Use
$(SEP).

* src/include/nonposix.h (STDIN_FILENO, STDOUT_FILENO,
STDERR_FILENO) [_MSC_VER]: Define conditionally.
(getpid) [_MSC_VER]: Remove.
Include direct.h and process.h conditionally.

* src/roff/troff/node.cpp (suppress_node::tprint): Don't use
parentheses for a_delete.

* src/utils/lookbib/lookbib.cpp: Include nonposix.h.

* test-groff: Replaced with...
* test-groff.in: This new template to handle path separator
properly.

* configure.ac: Check for direct.h and process.h.
Generate test-groff script.
* configure, src/include/config.hin: Regenerated.
@
text
@#! /bin/sh
# This script runs groff without requiring that it be installed.
# The current directory must be the top build directory.

builddir=./src
srcdir=`echo $0 | sed -e 's;/[^/]*$;;'`

if test ! -d $builddir/roff/groff || \
   test ! -r $builddir/roff/groff/groff; then
  echo $0 must be run with the top build directory as the current directory 2>&1
  exit 1
fi

GROFF_BIN_PATH=\
$builddir/roff/groff:\
$builddir/roff/troff:\
$builddir/preproc/pic:\
$builddir/preproc/eqn:\
$builddir/preproc/tbl:\
$builddir/preproc/grn:\
$builddir/preproc/refer:\
$builddir/preproc/soelim:\
$builddir/preproc/html:\
$builddir/devices/grops:\
$builddir/devices/grodvi:\
$builddir/devices/grotty:\
$builddir/devices/grolj4:\
$builddir/devices/grolbp:\
$builddir/devices/grohtml:\
$srcdir/$builddir/xditview

test -n "$srcdir" || srcdir=.

XENVIRONMENT=`cd $srcdir; pwd`/src/xditview/GXditview.ad
export XENVIRONMENT

GROFF_COMMAND_PREFIX=
GROFF_FONT_PATH=$builddir/../font:$srcdir/font
GROFF_TMAC_PATH=$srcdir/tmac
export GROFF_BIN_PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH

exec $builddir/roff/groff/groff ${1+"$@@"}
@


1.10
log
@
* test-groff: Fix GROFF_FONT_PATH.
@
text
@@


1.9
log
@

Implementing color support in troff, pic, grops, and grohtml.  These
changes are based on a major patch provided by Gaius Mulley
<gaius@@glam.ac.uk>.

New request: `defcolor', supporting rgb, cmy, cmyk, and gray
definitions with both hex values and fractions.

New escapes: \m and \M for drawing and background color,
respectively.  This corresponds to the troff output commands `m'
and `DF'.

groff and troff accept command line switch `-c' to disable color
output (which is automatically disabled in compatibility mode).

New scaling indicator `f' for fractions (1f = 65536u).

New conditional operator `m' to test for defined colors with `if'
and `ie'.

New keywords `color' (or `colour', `colored', `coloured'), `outline'
(or `outlined'), and `shaded' added to pic.

* src/include/color.h: New file.
* src/include/driver.h: Include it.
* src/include/printer.h: Include color.h.
(environment): New members `col' and `fill'.
(printer): Remove `adjust_arc_center' member function.
* src/include/Makefile.sub: Updated.

* src/libs/libdriver/input.cc (do_file): Initialize `env.col' and
`env.fill'.
Handle `m' and `DF' troff commands.
* src/libs/libgroff/color.cc: New file.
* src/libs/libgroff/Makefile.sub: Updated.

* src/preproc/html/pre-html.cc (IMAGE_BORDER_PIXELS): Set to 2.
(stop): Removed.
(createImage): Fix computation of `y2'.
Use `pnmcrop' also.
(buffer::write_file_html): Remove calls to `stop'.

* src/preproc/pic/common.h (common_output): New abstract function
members `set_color', `reset_color', `get_last_filled', and
`get_outline_color'.
* src/preproc/pic/object.h: Add `IS_SHADED' and `IS_OUTLINED'.
(object_spec): Add members `shaded' and `outlined'.
* src/preproc/pic/output.h (output): `command' is now abstract.
New function members `set_color', `reset_color', `get_last_filled',
and `get_outline_color'.
* src/preproc/pic/lex.cc (lookup_keyword): Recognize `colo[u]r[ed]',
`outline[d]', and `shaded'.
* src/preproc/pic/object.cc (output::command): Removed.
(output::set_location):Moved to output.h.
(graphic_object): Add protected members `outline_color' and
`color_fill'.
Add member functions `set_outline_color', `get_outline_color', and
`set_fill_color'.
(closed_object): Add member function `set_fill_color'.
Add member `color_fill'.
(graphic_object::print_text): Use `out->set_color' and
`out->reset_color'.
(box_object::print, ellipse_object::print, circle_object::print,
line_object::print, spline_object::print, arc_object::print): Ditto.
(object_spec::make_object): Implement `IS_OUTLINED' and `IS_SHADED'.
* src/preproc/pic/pic.y: Add tokens `COLORED', `OUTLINED', and
`SHADED', making them `%left'.
Add rules `object_spec [SHADED|COLORED|OUTLINED] text'.
* src/preproc/pic/tex.cc (tex_output): New dummy function members
`set_color', `reset_color', `get_last_filled', and
`get_outline_color'.
* src/preproc/pic/troff.cc (simple_output): New abstract function
members `set_color', `reset_color', and `get_last_filled'.
(simple_output::polygon, simple_output::circle,
simple_output::ellipse): Use `get_last_filled'.
(troff_output): New members `last_filled' and `last_outlined'.
New function members `set_color', `reset_color', `get_last_filled',
and `get_outline_color'.
(troff_output::finish_picture): Use `reset_color'.
(troff_output::set_fill): Test `last_filled'.
* src/preproc/pic/pic.man: Updated.

* src/roff/groff/groff.cc (main): Implement `-c' option.
(synopsis, help): Updated.
src/roff/groff/groff.man: Updated.

* src/roff/troff/troff.h: Include color.h.
(warning_type): Add WARN_COLOR.
* src/roff/troff/env.h (environment): New members
`{cur,prev}_{glyph,fill}_color'.
New member functions `get_{prev_,}{glyph,fill}_color'.
* src/roff/troff/env.cc: Initialize and implement them.
* src/roff/troff/input.cc: New global variable `disable_color_flag'.
Replace `NULL' with `0' everywhere for consistency.
(lookup_color, default_black, do_glyph_color, do_fill_color,
get_color_element, read_rgb, read_cmy, read_cmyk, read_gray,
define_color): New functions.
(token::next): Implement \M and \m escapes.
(do_if_request): Implement `m' operator.
(usage): Updated.
(main): Implement `-c' option.
(init_markup_requests): Add `defcolor' request.
(warning_table): Add `color' warning.
* src/roff/troff/node.h (glyph_color_node, fill_color_node): New
classes.
* src/roff/troff/node.cc (troff_output_file): New members
`current_{page,glyph}color'.  New member functions `put_hex',
`glyph_color', and `fill_color'.
(glyph_color_node::*, fill_color_node::*): Implement it.
* src/roff/troff/number.cc (SCALE_INDICATOR_CHARS): Add `f'.
(parse_term): Add support for `f'.
* src/roff/troff/troff.man: Updated.

* src/devices/grodvi/dvi.cc (draw_dvi_printer::draw): Add dummy
entry for `F'.
* src/devices/grolbp/lbp.cc (lbp_printer::draw): Ditto.
* src/devices/grolj4/lj4.cc (lj4_printer::draw): Ditto.

* src/devices/grohtml/html-text.h (HTML_TAG): Add COLOR_TAG.
(tag_definition): Use `void *' for arg1.
(html_text): New member functions `do_color' and `done_color'.
Use `void *' for second parameter of `push_para' member function.
New `push_para' member function with a single parameter.
Use `char *' for parameter of `issue_table_begin' member funtion.
New `issue_color_begin' member function.
* src/devices/grohtml/html-text.cc (html_text::end_tag): Handle
COLOR_TAG.
(html_text::issue_color_begin): New function.
(html_text::issue_table_begin): Use `char *' for parameter.
(html_text::start_tag, html_text::shutdown,
html_text::check_emit_text): Updated.
(html_text::push_para): Use `void *' for second parameter.
Add same function with only one parameter.
(html_text::do_*): Updated.
(html_text::do_color, html_text::done_color): New functions.
* src/devices/grohtml/post-html.cc (style): New member `col'.
Mew member `style' with 6 parameters.
(style::style, style::operator==): Updated.
(html_printer::do_font): Use it.
(html_printer::draw): Add dummy entry for `F'.
(html_printer::set_char): Updated.
* src/devices/grohtml/grohtml.man: Updated.

* src/devices/grops/ps.cc (ps_output::put_float): Use `%g' to have
trailing zeroes removed.
(ps_printer): New members `sbuf_color', `fill_color', and
`output_color'.
Removed member `fill'.
New member function `set_color'.
(ps_printer::ps_printer, ps_printer::set_char): Updated.
(ps_printer::flush_sbuf, ps_printer::set_line_thickness,
ps_printer::fill_path, ps_printer::draw): Use `set_color'.

* tmac/color-html.tmac, tmac/color.tmac: New files.
* tmac/troffrc: Include them.
* tmac/www.tmac (URL, FTP, MAILTO): Use blue color.
* tmac/Makefile.sub: Updated.

* NEWS, doc/groff.texinfo, doc/pic.ms, man/groff_out.man,
man/groff.man: Updated.
* font/devps/prologue.ps: Define FC and CO functions.

Fix incorrect cropping of images and incorrect handling of special
characters.  Fix handling of file names in \O.

* src/include/geometry.h: New file.
* src/libs/libgroff/geometry.cc: New file.
* src/libs/libdriver/printer.cc (printer::adjust_arc_center): Moved
to `geometry.cc'.
* src/roff/troff/input.cc (get_delim_file_name): Fixed problem with
initial spaces.
(do_suppress): Updated.
* src/roff/troff/node.cc: Include geometry.h.
(troff_output_file::flush_tbuf): Fixed parameters to
`check_output_limits'.
(troff_output_file::check_charinfo): Ditto.
(troff_output_file::determine_line_limits): Add support for `Da'
and `Dl' commands.

* src/devices/grohtml/post-html.cc (str_translate_to_html):
Add new parameter `is_special' to decode special characters from
escape sequences.
(html_printer::do_title, html_printer::do_heading,
html_printer::do_indentedparagraph,
html_printer::translate_to_html, html_printer::special): Updated.

* Makefile.sub (DISTCLEANFILES): Add stamp-h.
Fix entry for config.h.
* test-groff (GROFF_BIN_PATH): Add $builddir/roff/groff.
* tmac/troffrc: Translate nonbreakable space character to `\~'.
* src/preproc/eqn/eqn.man: Document -d command line option.
@
text
@d3 1
a3 1
# The current directory must be the build directory.
d8 4
a11 4
if test ! -d $builddir/roff/groff || test ! -r $builddir/roff/groff/groff
then
	echo $0 must be run with the build directory as the current directory 2>&1
	exit 1
d38 1
a38 1
GROFF_FONT_PATH=$builddir:$srcdir/font
@


1.8
log
@* test-groff: Don't use PATH but GROFF_BIN_PATH.
@
text
@d15 1
@


1.7
log
@Removing the grohtml-old device driver which is now obsolete.

* src/devices/grohtml-old/*: Removed.
* font/devhtml-old/*: Removed.
* src/libgroff/htmlindicate.cc (graphic_start, graphic_end): Remove
comments.
* Makefile.in (CCPROGDIRS, DEVDIRS): Updated.
* test-groff (PATH): Updated.
* tmac/Makefile.sub (NORMALFILES): Updated.
* tmac/an-old.tmac: Remove special code for html-old device.
Replace `html-or-html-old' register with `an-html'.
* tmac/eqnrc: Updated.
* tmac/html-old.tmac: Removed.
* tmac/troffrc, tmac/troffrc-end: Updated.
* tmac/www.tmac: Remove special code for html-old device.
Replace `html-or-html-old' register with `www-html'.

* src/libgroff/tmpfile.cc (remove_tmp_files),
src/libgroff/htmlindicate.cc (graphic_end), include/htmlindicate.h,
src/preproc/grn/*.cc, src/roff/groff/env.{cc,h}: Remove `void'
parameter if used as a single argument for consistency with rest of
source code.

* aclocal.m4, tmac/an-old.tmac: Fix copyright.


* src/roff/troff/troff.man: Fixing typos.
@
text
@d14 1
a14 1
PATH=\
d29 1
a29 2
$srcdir/$builddir/xditview:\
$PATH
d39 1
a39 1
export PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH
@


1.6
log
@troff's `box' and `boxa' requests didn't preserve temporary
indentation.

* src/roff/troff/div.h (diversion): Add `saved_saved_indent' and
`saved_target_text_length' members.
* src/roff/troff/div.cc (do_divert): Use them.

Tabs (but not yet leaders and fields) are now handled correctly by
`asciify' request.

* node.h (hmotion_node): Add field `was_tab'.
* env.cc (environment::make_tab_node): Set it.
* node.cc (hmotion_node::copy, hmotion_node::asciify): Use it.

Added new request `unformat' which will, contrary to `asciify',
preserve font information after unformatting (i.e., only nodes
dealing with horizontal space are converted back to input
characters).

* input.cc (asciify_macro): Renamed to ...
(do_asciify_macro): this, having a new parameter `unformat_only'.
(asciify_macro, unformat_macro): New; using do_asciify_macro.
(init_input_requests): Added `unformat'.
* node.cc (*_node::asciify), asciify_reverse_node_list: Added
parameter to control asciification process.
* node.h (*_node::asciify): Ditto.
* NEWS, src/roff/troff/troff.man, man/groff.man: Document it.


* doc/groff.texinfo: Minor improvement of `.in' documentation.


* test-groff: Updated.
@
text
@a28 1
$builddir/devices/grohtml-old:\
@


1.5
log
@Invert current behaviour: Search first FOOBAR.tmac, then
tmac.FOOBAR.

* src/roff/troff/input.cc: Introduce MACRO_POSTFIX.
(open_mac_file, macro_source): Implement it.
* src/roff/troff/troff.man, tmac/groff_tmac.man, man/roff.man,
doc/groff.texinfo, NEWS: Document it.

* src/roff/nroff/nroff.man, src/roff/groff/groff.man, man/groff.man:
Small documentation improvements.

* test-groff: Fix GROFF_TMAC_PATH (hyphen.us is now in the tmac
subdirectory also).

* font/devps/Makefile.sub: Fix rules for dingbats.*map.
@
text
@d22 1
a22 1
$builddir/preproc/html2:\
d29 1
a29 1
$builddir/devices/grohtml2:\
@


1.4
log
@* src/include/posix.h: Remove definition of FILENAME_MAX.

* src/preproc/html2/pre-html.h, pre-html.cc: Add return type to
`sys_fatal' and `stop' function().

* test-groff: Updated.


Added the new troff command .output <arg> to suppress output (while
still obeying motion) and also the opminx, opminy, opmaxx, opmaxy
registers (for passing the output dimensions to the output device).

* src/roff/troff/div.cc (top_level_diversion::output): Use `width'
parameter.
* src/roff/troff/node.h, src/roff/troff/node.cc
(troff_output_file::really_print_line,
ascii_output_file::really_print_line,
supress_output_file::really_print_line): Use `width' parameter.
(troff_output_file::really_on, troff_output_file::really_off,
output_file::on, output_file::off, real_output_file::on,
real_output_file::off, real_output_file::really_on,
real_output_file::really_off): New functions.
(real_output_file:public output_file): New variable `output_on'.
(real_output_file::begin_page, real_output_file::copy_file,
real_output_file::transparent_char, real_output_file::print_line):
Use it.
(real_output_file::print_line): Use check_output_limits.
* src/roff/troff/reg.h, src/roff/troff/request.h,
src/roff/troff/input.cc (assign_registers): New function to remove
two `goto's.
(do_ps_file): Use it.
(check_output_limits, reset_output_registers, output_request,
init_output_requests): New functions.
(init_input_requests): Updated.

Added new grohtml2 device and html2 preprocessor (coding
not yet finished) which will eventually replace grohtml.

* Makefile.in, tmac/Makefile.sub, tmac/eqnrc, tmac/troffrc-end:
Updated.
* src/include/htmlindicate.h, src/include/htmlindicate
(html_begin_suppress, html_end_suppress): New functions.
* src/preproc/tbl/main.cc: Use it.
* src/roff/groff/groff.cc: Add support for html2 device (which will
automatically invoke the html2 preprocessor).
* src/roff/troff/input.cc (is_html2): New variable.
* src/roff/troff/troff.h, src/roff/troff/env.h,
src/roff/troff/env.cc (environment::add_html_tag): New function
(uses `is_html2').
(environment::do_break): Use it.
* font/devhtml2/*: New files.
* src/devices/grohtml2: New device.
* src/preproc/html2: New preprocessor.
* tmac/tmac.html-tags, tmac/tmac.html2: New files.
@
text
@d40 1
a40 1
GROFF_TMAC_PATH=$srcdir/tmac:$srcdir/src/roff/troff
@


1.3
log
@* Makefile.in: Fixing $(subdir).

* README, NEWS: Small fixes.

* test-groff: Adding path to grolbp.

* configure.in: The (new) file src/xditview/Imakefile.in will be
also configured -- it is now possible to build gxditview in a
directory different from $srcdir.
@
text
@d22 1
d29 1
@


1.2
log
@* README, INSTALL, PROJECT, PROBLEMS, BUGREPORT: Updated.

* test-groff: Added grn subdir to path.

* doc/groff.texinfo: Some restructing and other small improvements.



* Makefile.in: Added subdirectory entry for grn.
@
text
@d26 1
@


1.1
log
@Initial revision
@
text
@d19 1
@


1.1.1.1
log
@groff pre-1.16 with new directory structure
@
text
@@
