summaryrefslogtreecommitdiff
path: root/src/include
Commit message (Collapse)AuthorAgeFilesLines
* Update configuration files from `gnulib' and `config' repositories..wl2012-02-262-9/+64
| | | | | | | | | | | | | | | | | | | | | | | This also fixes a problem with `iconv' on Solaris 10, as reported in http://lists.gnu.org/archive/html/bug-groff/2012-02/msg00007.html * configure.ac: Call `gl_LOCALCHARSET. Call `AM_ICONV' as C++. * config.guess, config.rpath, config.sub, install-sh, mkinstalldirs: Updated. * m4/codeset.m4, m4/glib21.m4, m4/iconv.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4: Updated. * m4/fcntl-o.m4, m4/localcharset.m4: New files. * Makefile.in: Updated. * src/include/localcharset.h, src/libs/libgroff/config.charset, src/libs/libgroff/localcharset.c: Updated. * aclocal.m4, configure, src/include/config.hin: Regenerated.
* Speed up troff.wl2010-12-261-2/+2
| | | | | | | | | | * src/include/ptable.h (PTABLE): Make hash tables much more sparse by changing `FULL_NUM' from 3 to 1. This increases the allocated memory by about 200kByte (which is nothing today) but assures that there aren't extremely long searches for a free hash slot in case that the hash function doesn't return a free one. Due to the nature of the entries in uniuni.cpp, the used hash function in ptable.cpp is not optimal, but using a sparse array compensates this.
* Implement support for character classes.wl2010-12-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch uses standard C++ headers, contrary to the rest of groff. Ideally, everything in groff should be updated to do the same. * src/include/font.h (glyph_to_unicode): New function. * src/libs/libgroff/font.cpp (glyph_to_unicode): Implement it. (font::contains, font::get_code): Use it. * src/roff/troff/charinfo.h: Include <vector> and <utility>. (charinfo): New members `ranges' and `nested_classes'. New member functions `get_unicode_code' and `get_flags'. New member functions `add_to_class', `is_class', and `contains'. (charinfo::overlaps_horizontally, charinfo::overlaps_vertically, charinfo::can_break_before, charinfo::can_break_after, charinfo::can_break_after, charinfo::ends_sentence, charinfo::transparent,, charinfo:ignore_hcodes): Use `get_flags', which handles character classes also. * src/roff/troff/input.cpp (char_class_dictionary): New global variable. (define_class): New function. (init_input_requests): Register `class'. (charinfo::get_unicode_code, charinfo::get_flags, charinfo::contains): Implement it. * NEWS, doc/groff.texinfo (Character Classes), man/groff_diff.man, man/groff.man: Document it.
* Make groff compile on Interix.wl2009-06-251-0/+4
| | | | | | | | | | Reported by Jay Krell <jay.krell@cornell.edu>. * configure.ac: Call AC_USE_SYTEM_EXTENSIONS. * src/include/lib.h [__INTERIX]: Define _ALL_SOURCE. * configure: Regenerated.
* Update copyright year.wl2009-01-0528-30/+44
|
* * */*: Update GPL2 to GPL3.wl2009-01-0431-156/+123
|
* * config.rpath, m4/codeset.m4, m4/glibc21.m4, m4/iconv.m4,wl2009-01-021-9/+8
| | | | | | | | | m4/lib-link.m4, m4/lib-prefix.m4, src/include/localcharset.h, src/libs/libgroff/config.charset, src/libs/libgroff/localcharset.c, src/libs/libgroff/ref-add.sin, src/libs/libgroff/ref-del.sin: Updated from `gnulib' git repository. * configure: Regenerated.
* * font/devps/prologue.ps: Add BPhook.wl2006-08-131-14/+18
| | | | | | | | | | | | * src/devices/grops/grops.man: Document BPHook. Reorder some sections for better readability. * src/include/lib.h (getlocale): New macro. (setlocale, LC_ALL, LC_CTYPE) [!HAVE_SETLOCALE]: Define, as suggested by Bruno. * src/preproc/preconv/preconv.cpp (main): Use getlocale.
* Add a request `.fzoom' and a number register `.zoom' to magnifywl2006-07-121-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fonts. * src/include/font.h (font): Add member variable `zoom'. Add member functions `set_zoom' and `get_zoom'. Remove `static' attribute from `scale' member function. * src/libs/libgroff/font.cpp (font::font): Updated. (scale_round): New version with three parameters to handle zoom factor. (font::scale, font::get_width): Handle zoom factor. (font::set_zoom, font::get_zoom): New functions. (font::load): Handle `zoom' while computing `space_width'. * src/roff/troff/env.h: Declare `env_get_zoom'. (environment): Add member function `get_zoom'. * src/roff/troff/env.cpp (environment::get_zoom): New function. (init_env_requests): Initialize `.zoom' register. * src/roff/troff/node.cpp (font_info): New member functions `set_zoom' and `get_zoom'. (tfont): New member function `get_zoom'. (env_get_zoom): New function. (troff_output_file::set_font): Handle zoom factor. (font_zoom_request): New function. (init_node_requests): Initialize `fzoom' request. * docs/groff.texinfo (Changing Fonts), man/groff.man, man/groff_diff.man, NEWS: Document `fzoom' request and `.zoom' register. * src/roff/troff/TODO: Updated.
* * doc/Makefile.sub (HTMLEXAMPLEFILESALL): New variable. (CLEANADD): Use it.wl2006-02-261-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | (install_html, uninstall_sub): Updated. Introduce Unicode fonts. * font/devhtml/DESC.proto: Mark as unicode. font/devhtml/R.proto: Remove all * charset entries that are already in glyphuni.cpp. font/devutf8/DESC.proto: Mark as unicode. * font/devutf8/R.proto: Remove all charset entries. src/include/font.h * (font): New static field `is_unicode'. Change order of fields. src/libs/libgroff/font.cpp: Include unicode.h. * (font::font): Update for changed order of fields. (font::contains, font::get_width, font::get_height, font::get_depth, font::get_italic_correction, font::get_left_italic_correction, font::get_subscript_correction, font::get_character_type, font::get_code, font::get_special_device_encoding): Handle both the explicitly enumerated glyphs and use general code for Unicode fonts. (font::load): Make the charset section optional when the font is declared unicode. (font::load_desc): Recognize the `unicode' attribute. * src/libs/libgroff/fontfile.cpp (font::is_unicode): New variable.
* Concretize the glyph datatype.wl2006-02-232-82/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/include/font.h (struct glyph): Remove class. (struct glyph): Renamed from struct glyphinfo. (glyph_to_index): New inline function. (glyph_to_name): Make extern, not inline. (glyph_to_number): Update. (font): Use `glyph *' instead of `glyph'. * src/libs/libgroff/nametoindex.cpp (charinfo): Inherit from class `glyph'. Make `name' field public. (character_indexer, number_to_glyph, name_to_glyph): Use `glyph *' instead of `glyph'. (glyph_to_name): Renamed from `glyph::glyph_name'. * src/roff/troff/charinfo.h (charinfo): Inherit from class `glyph'. Use `glyph *' instead of `glyph'. * src/roff/troff/input.cpp (name_to_glyph, number_to_glyph): Use `glyph *' instead of `glyph'. (glyph_to_name): Renamed from `glyph::glyph_name'. * src/libs/libgroff/font.cpp: Use `glyph *' instead of `glyph', and `glyph_to_index' instead of `glyph::glyph_index'. * src/include/printer.h (printer): Use `glyph *' instead of `glyph'. * src/libs/libdriver/printer.cpp: Likewise. * src/devices/grodvi/dvi.cpp: Likewise. * src/devices/grohtml/post-html.cpp: Likewise. * src/devices/grolbp/lbp.cpp: Likewise. * src/devices/grolj4/lj4.cpp: Likewise. * src/devices/grops/ps.cpp: Likewise. * src/devices/grotty/tty.cpp: Likewise.
* * src/include/font.h (name_to_glyph): Renamed fromwl2006-02-171-34/+32
| | | | | | | | | | | | | | | | | font::name_to_index. (number_to_glyph): Renamed from font::number_to_index. (glyph_to_name): Renamed from font::index_to_name. (glyph_to_number): Renamed from font::index_to_number. * src/libs/libgroff/nametoindex.cpp: Likewise. * src/roff/troff/charinfo.h (charinfo::as_glyph): Renamed from charinfo::get_index. * src/roff/troff/input.cpp: All callers changed. * src/roff/troff/node.cpp: Likewise. * src/libs/libgroff/font.cpp: Likewise. * src/devices/grops/ps.cpp: Likewise. * src/devices/grohtml/post-html.cpp: Likewise. * src/libs/libdriver/printer.cpp: Likewise.
* * src/include/ptable.h, src/include/itable.hwl2006-02-172-0/+205
| | | | | (NEXT_PTABLE_SIZE_DEFINED): Use it to avoid multiple declaration of external symbol `next_ptable_size' (used by both header files).
* * src/include/font.h (struct glyphinfo): New class.wl2006-02-171-14/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (struct glyph): Change internal representation. Change constructor signature. New method glyph::glyph_number(). (glyph::glyph, glyph glyph::undefined_glyph, glyph::glyph_index, glyph::operator==, glyph::operator!=): Update. (font::index_to_name, font::index_to_number): New functions. * src/include/itable.h: New file, based on src/include/ptable.h. * src/libs/libgroff/nametoindex.cpp: Include itable.h. (class charinfo): New class. (class character_indexer): Change table result type from `int' to `class charinfo'. Add table with integer key. (character_indexer::character_indexer): Update. (character_indexer::ascii_char_index): Update. (character_indexer::numbered_char_index): Use NULL as name, not a string starting with a space. (character_indexer::named_char_index): Update. (font::number_to_index, font::name_to_index): Remove no-op cast. (glyph::glyph_name): New method. * src/roff/troff/charinfo.h (class charinfo): Inherit from class glyphinfo. (NUMBERED): Remove flag bit. (charinfo::numbered, charinfo::get_index): Update. * src/roff/troff/input.cpp (charinfo::charinfo): Update. (charinfo::set_number, charinfo::get_number): Update. (glyph::glyph_name): New method.
* * src/include/font.h: s/glyph_t/glyph/.wl2006-02-113-73/+73
| | | | | | | Update all callers. * src/devices/grotty/tty.cpp: s/glyph/tty_glyph/. s/output_character_t/output_character/.
* New accessor method glyph_t::glyph_name().wl2006-02-112-10/+48
| | | | | | | | | | | | | | | | | | | | | * src/include/ptable.h (declare_ptable): Add a return value to the 'define' method, and declare a 'lookupassoc' method. (implement_ptable): Return the stored key in 'define'. Implement lookupassoc. * src/include/font.h (glyph_t): Add 'name' field. Add an argument to the constructor. (glyph_t::glyph_name): New method. * src/libs/libgroff/nametoindex.cpp (character_indexer): Change return type of methods and field member type to glyph_t. (character_indexer::character_indexer): Update. (character_indexer::ascii_char_index): Allocate a name for the glyph. Return a glyph_t with name. (character_indexer::numbered_char_index): Return a glyph_t without a name. (character_indexer::named_char_index): Return a glyph_t with a name. (font::number_to_index, font::name_to_index): Update. * src/roff/troff/input.cpp (charinfo::charinfo): Use the symbol as the glyph's name.
* Make the glyph data type abstract.wl2006-02-112-81/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/include/font.h (glyph_t): New class. (name_to_index, number_to_index): Change return type to glyph_t. (font::contains, font::get_width, font::get_height, font::get_depth, font::get_character_type, font::get_kern, font::get_skew, font::get_italic_correction, font::get_left_italic_correction, font::get_subscript_correction, font::get_code, font::get_special_device_encoding, font::add_entry, font::copy_entry, font::add_kern, font::hash_kern): Change argument type to glyph_t. * src/libs/libgroff/font.cpp (struct font_kern_list): Change members type and constructor argument types to glyph_t. (font::contains, font::get_width, font::get_height, font::get_depth, font::get_character_type, font::get_kern, font::get_skew, font::get_italic_correction, font::get_left_italic_correction, font::get_subscript_correction, font::get_code, font::get_special_device_encoding, font::add_entry, font::copy_entry, font::add_kern, font::hash_kern): Change argument type to glyph_t. (font::load): Use glyph_t variables. * src/libs/libgroff/nametoindex.cpp (name_to_index, number_to_index): Change return type to glyph_t. * src/roff/troff/charinfo.h (charinfo::index): Change type to glyph_t. (charinfo::get_index): Change return type to glyph_t. * src/roff/troff/env.cpp: Include font.h. * src/roff/troff/node.cpp: Include font.h before charinfo.h. * src/roff/troff/input.cpp: Include font.h before charinfo.h. (charinfo::charinfo): Update. (name_to_index, number_to_index): Change return type to glyph_t. * src/include/printer.h (printer::set_char_and_width): Change return type to glyph_t. * src/libs/libdriver/printer.cpp (printer::set_char_and_width): Change return type to glyph_t. * src/devices/grodvi/dvi.cpp (dvi_printer::set_char): Change argument type to glyph_t. * src/devices/grohtml/post-html.cpp (page::add_and_encode): Update. (html_printer::space_glyph): Renamed from space_char_index. (html_printer::add_to_sbuf, html_printer::sbuf_continuation, html_printer::overstrike, html_printer::set_char): Change argument type to glyph_t. (html_printer::set_char_and_width): Change return type to glyph_t. * src/devices/grolbp/lbp.cpp (lbp_printer::set_char): Change argument type to glyph_t. * src/devices/grolj4/lj4.cpp (lj4_printer::set_char): Change argument type to glyph_t. * src/devices/grops/ps.cpp (ps_printer::space_glyph): Renamed from space_char_index. (ps_printer::set_subencoding, ps_printer::set_char): Change argument type to glyph_t. * src/devices/grotty/tty.cpp (tty_printer::set_char): Change argument type to glyph_t.
* Minor doc improvement. From Bruno.wl2006-01-261-6/+8
|
* This change is based on a patch by Bruno Haible <bruno@clisp.org>.wl2006-01-264-91/+336
| | | | | | | | | * src/include/device.h: Add comments. * src/include/font.h: Add comments. * src/include/unicode.h: Likewise. * src/include/ptable.h, src/libs/libgroff/ptable.cpp: Likewise. Fix quotation in comments to be of the form `xxx'.
* * configure.ac: Test for getc_unlocked (needed for localcharset).wl2006-01-111-0/+4
| | | | | | | | | | | | | * configure, src/include/config.hin: Regenerated. * src/libs/libgroff/Makefile.sub (EXTRA_CFLAGS): Define ENABLE_RELOCATABLE. * src/libs/libgroff/relocatable.h: New dummy header file for localcharset.c. * src/libs/libgroff/localcharset.c: Updated to (unchanged) CVS gnulib version.
* Work around unportability of nl_langinfo(CODESET).wl2006-01-103-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/glibc21.m4: New file, from gnulib. * Makefile.sub (M4MACROS): Add m4/glibc21.m4. * configure.ac: Also test for stddef.h, and invoke jm_GLIBC21. * Makefile.in (HOST, GLIBC21): New variables. (MDEFINES): Pass them to subdirectories. * src/include/relocate.h (relocatep): Define with C linkage. * src/include/localcharset.h: New file, from gnulib. * src/libs/libgroff/localcharset.c: New file, from gnulib with a modification for relocate(). * src/libs/libgroff/config.charset: New file, from gnulib. * src/libs/libgroff/ref-add.sin: New file, from gnulib. * src/libs/libgroff/ref-del.sin: New file, from gnulib. * src/libs/libgroff/Makefile.sub (EXTRA_CFLAGS): Also define LIBDIR. (OBJS): Add localcharset.o. (CSRCS): Add localcharset.c. (all): Add dependencies to charset.alias, ref-add.sed, ref-del.sed. (charset.alias): New rule. (PACKAGE): New variable. (ref-add.sed, ref-del.sed): New rules. (MKINSTALLDIRS): New variable. (install_data): Depend on install_charset_data. (install_charset_data): New rule for creating or updating charset.alias. (uninstall_sub): Depend on uninstall_charset_data. (uninstall_charset_data): New rule for uninstalling or updating charset.alias. * src/preproc/preconv/preconv.cpp: Include localcharset.h instead of <langinfo.h>. (main): Initialize default_encoding from locale_charset() instead of nl_langinfo(CODESET). * aclocal.m4, configure, src/include/config.hin: Regenerated.
* * m4/groff.m4: Renamed from aclocal.m4.wl2006-01-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * m4/codeset.m4: New file, from gnulib. * m4/iconv.m4: New file, from gnulib. * m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4: New files, from gnulib. * config.rpath: New file, from gnulib. * config.guess, config.sub: New files, from gnulib. * Makefile.sub (M4MACROS): New variable. (configure): Fix typo. (aclocal.m4): New rule. (stamp-h.in): Depend on aclocal.m4. * configure.ac: Invoke AM_ICONV and AM_LANGINFO_CODESET. * Makefile.in (LIBICONV): New variable. (MDEFINES): Pass it to recursive makes. * src/preproc/preconv/preconv.cpp: Use HAVE_LANGINFO_CODESET and HAVE_ICONV instead of I18N macro. * src/preproc/preconv/Makefile.sub (EXTRA_LDFLAGS): New variable. * aclocal.m4, configure, src/include/config.hin: (Re)generated. * doc/Makefile.in (webpage.html): Simplify. * doc/Makefile.sub (webpage.html): Synchronize with doc/Makefile.in. * doc/webpage.ms, tmac/groff_www.man, tmac/www.tmac: Minor updates.
* Integrate preconv into the groff binary. Changes based on a patchwl2005-12-311-0/+4
| | | | | | | | | | | | | | | | | | | | | from Michail Vidiassov. * src/roff/groff/pipeline.h (MAX_COMMANDS): Increase by 1. * src/roff/groff/groff.cpp (PRECONV_INDEX): New macro. (SOELIM_INDEX): Updated. (help, synopsis): Updated. (main): Add command line options `-k' and `-K enc' to select encoding. Add support for GROFF_ENCODING environment variable. * src/roff/groff/groff.man: Updated and revised. Start with autoconf support for preconv. * configure.ac: Call AC_C_BIGENDIAN. * configure, src/include/config.hin: Regenerated.
* Another round in fixing getopt problems. Hopefully the last one!wl2005-06-235-125/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This time we use the getopt stuff from gnulib and define a prefix unconditionally so that there are no collisions with any other getopt implementations. This is a slight waste of space in case we already use a GNU getopt implementation, but on the other hand it really simplifies life. * src/include/getopt.h: Use gnulib version. * src/include/getopt_int.h: Use gnulib version. * src/include/groff-getopt.h: Removed. Obsolete now. * src/include/lib.h: Regarding getopt, don't handle any platform specially; just include getopt.h. (__GETOPT_PREFIX): Define (before getopt.h). * src/include/Makefile.sub (HDRS): Updated. * src/libs/libgroff/getopt1.c, src/libs/libgroff/getopt.c: Use gnulib version. * src/libs/libgroff/Makefile.sub (EXTRA_CFLAGS): Set __GETOPT_PREFIX. * src/utils/pfbtops/pfbtops.c, src/utils/xtotroff/xtotroff.c (__GETOPT_PREFIX): Define (before getopt.h).
* * src/include/lib.h: Provide a fix for Mac OS X to not includewl2005-06-221-2/+3
| | | | groff-getopt.h.
* Another try to update getopt files. This time we add a dummywl2005-06-165-34/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gettext.h file to satisfy the dependency. * src/include/getopt.h, src/libs/libgroff/getopt.c, src/libs/libgroff/getopt1.c: Updated from GNU libc CVS. * src/include/getopt_int.h: New file (from GNU libc CVS). * src/include/gettext.h: Dummy file which just defines a gettext() macro. * src/include/groff-getopt.h: Updated. * src/include/Makefile.sub (HDRS): Add getopt_int.h and gettext.h. * src/libs/libdriver/input.cpp (IntArray): Remove superfluous `const' keywords in return value. * src/preproc/html/pushback.cpp (pushBackBuffer::~pushBackBuffer): Remove redundant variable `old'. (pushBackBuffer::skipToNewline): Remove redundant variable `ch'. * src/preproc/tbl/main.cpp (process_table): Remove redundant variable `c'. Fix more friend name injection problems since modern C++ compilers fail otherwise. We simply provide (global) declarations for all functions declared as friends. This is not really necessary but doesn't harm. * src/preproc/eqn/lex.cpp: Provide declarations for get_char, peek_char, and get_location. * src/preproc/refer/ref.h: Provide declarations for compare_reference, same_reference, same_year, same_date, same_author_last_name, and same_author_name. * src/roff/troff/div.h: Provide declarations for do_divert and page_offset. * src/roff/troff/env.h: Provide declarations for title_length, space_size, fill, no_fill, adjust, no_adjust, center, right_justify, vertical_spacing, post_vertical_spacing, line_spacing, line_length, indent, temporary_indent, do_underline, do_input_trap, set_tabs, margin_character, no_number, number_lines, leader_character, tab_character, hyphenate_request, no_hyphenate, hyphen_line_max_request, hyphenation_space_request, hyphenation_margin_request, line_width, tabs_save, tabs_restore, line_tabs_request, widow_control_request, and do_divert. * src/roff/troff/input.cpp: Provide declaration for chop_macro. * src/roff/troff/node.cpp: Provide declarations for class tfont_spec. Provide declaration for make_tfont.
* * All affected files: Update postal address of FSF.wl2005-05-2629-31/+31
|
* * src/include/nonposix.h (access) [_MSC_VER]: New macro.wl2005-05-022-1/+6
| | | | | | | | * src/include/posix.h (F_OK): Define conditionally. * src/devices/grotty/tty.cpp (tty_printer::make_underline): Use different variable name in second `for' loop to avoid MSVC compiler problem.
* Undo getopt changes from 2004-04-30. We don't want a dependencywl2005-05-024-162/+32
| | | | | | | | | | on gettext. * src/include/getopt_int.h: Removed. * src/include/getopt.h, src/include/groff-getopt.h, src/include/Makefile.sub, src/libs/libgroff/getopt.c, src/libs/libgroff/getopt1.c: Revert to previous version.
* New file.wl2005-04-301-0/+130
|
* AC_TYPE_SIGNAL from current autoconf can fail if CC=g++.wl2005-04-304-32/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aclocal.m4 (GROFF_TYPE_SIGNAL): New function. * configure.ac: Use GROFF_TYPE_SIGNAL, not AC_TYPE_SIGNAL. * configure, src/include/config.hin: Regenerated. * PROBLEMS: Updated. Update getopt files. * src/include/getopt.h, src/libs/libgroff/getopt.c, src/libs/libgroff/getopt1.c: Updated from GNU libc CVS. * src/include/getopt_int.h: New file (from GNU libc CVS). * src/include/groff-getopt.h: Updated. * src/include/Makefile.sub (HDRS): Add getopt_int.h. * font/devutf8/NOTES: Updated. Bug fix for Win32 relocatable code. Based on a patch from Keith Marshall. * src/libs/libgroff/maxpathname.cpp (PATH_MAX): Test for `_MAX_PATH' also. * src/libs/libgroff/relocate.c (DEBUG): Define it conditionally. (searchpath) [_WIN32]: Use `_fullpath', not `realpath'.
* Add binary relocation support for Windows platforms.wl2005-04-024-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/include/Makefile.sub (defs.h): Add `INSTALLPATH'. * src/include/relocate.h, src/libs/libgroff/relocate.cpp: New files. * src/libs/libgroff/searchpath.cpp: Handle `relocate'. (search_path::search_path, search_path::open_file_cautious): Use `relocate'. * src/libs/libgroff/Makefile.sub (OBJS, CCSRCS), src/include/Makefile.sub (HDRS): Updated. * src/devices/grohtml/post-html.cpp: Don't use strdup/free but strsave/a_delete. * src/libs/libgroff/font.cpp: Replace strdup with strsave. * src/libs/libgroff/maxfilename.cpp: Don't include limits.h since lib.h already does it. * src/libs/libgroff/maxpathname.cpp: New file, defining path_name_max. * src/include/lib.h: Add prototype for path_name_max. * src/libs/libgroff/Makefile.sub (OBJS, CCSRCS): Updated. * src/include/nonposix.h (PATH_EXT): New macro.
* * src/include/lib.h: Updated.wl2005-03-181-1/+1
|
* Add workaround for broken hypot() on Interix.wl2005-03-171-1/+3
| | | | | | | | | | | | | | | | * src/libs/libgroff/hypot.c: New wrapper file for `hypot'. * src/libs/libgroff/Makefile.sub (OBJS): Add `hypot.o'. (CSRCS): Add `hypot.c'. * src/include/lib.h: Declare `groff_hypot'. * src/preproc/grn/hgraph.cpp: Don't declare `hypot'. Use `groff_hypot'. * src/preproc/pic/pic.h: Don't declare `hypot'. * src/preproc/pic/object.cpp (hypot): Use `groff_hypot'.
* Make `test-groff' work again -- previously, wrong paths have beenwl2004-12-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | used. Additionally, it can now be called from anywhere. * test-groff.in: Don't test for groff binary. This is no longer necessary since the proper paths are determined by `configure'. (EXEEXT): Removed. No longer used. (srcdir, builddir): Use values provided by the configure script. (XENVIRONMENT): Updated. * INSTALL: Updated. Make .tag and .taga work for all devices (but only grohtml actually handles them). * src/devices/grohtml/post-html.cpp: s/html-tag/devtag/. (text_glob::is_br, page::add_tag, html_printer::troff_tag, html_printer::handle_assertion): Don't use hard-coded string lengths. (html_printer::lookahead_for_table): Reset `tbl' properly if necessary. (html_printer::devtag): New function, handling `devtag'. (html_printer::special): Don't handle `html-tag'. * src/include/printer.h, src/libs/libdriver/printer.cpp (printer::devtag): New virtual function. * src/libs/libdriver/input.cpp (parse_x_command) <'X'>: Handle `devtag'. * src/roff/troff/env.cpp, src/roff/troff/mtsm.cpp, src/roff/troff/node.cpp: s/html-tag/devtag/. * src/roff/troff/input.cpp (tag, taga): Always call curenv->add_node. * tmac/an-old.tmac, tmac/s.tmac, tmac/troffrc-end: Use DEVTAG* macros instead of HTML-TAG*. * tmac/devtag.tmac: New file, defining the DEVTAG-* macros. * tmac/www.tmac: Load devtag.tmac. Replace HTML-TAG* macros with DEVTAG* macros. (HTML, HTML-NS): Changed definitions. (URL): Use HTML-NS. (HTML-TAG, HTML-TAG-NS, HTML-TAG-NEXT): Removed. * tmac/Makefile.sub (NORMALFILES): Add devtag.tmac.
* * src/include/printer.h (printer): Remove virtual functionwl2004-10-301-1/+0
| | | | | | | | `round_width'. Update all source files. * src/devices/grohtml/post-html.cpp (html_printer): New member function `round_width'.
* * src/include/font.h (font): New member functionwl2004-10-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | `get_image_generator'. New variables `unscaled_charwidths' and `image_generator'. * src/libs/libgroff/font.cpp (font::get_width): Always return the character's unscaled width if `font::unscaled_charwidths' is set. (font::get_image_generator): New function. (font::load_desc): Check the `unscaled_charwidths' and `image_generator' keywords. * src/libs/libgroff/fontfile.cpp: Initialize `font::unscaled_charwidths' and `font::image_generator'. * font/devhtml/DESC.proto: s/html/unscaled_charwidths/. * font/devhtml/Makefile.sub (DESC): Set `image_generator' keyword. * man/groff_font.man: Document `unscaled_charwidths' and `image_generator'. * src/preproc/html/pre-html.cpp: Include `device.h'. (image_gen): New global variable. (imageList::createPage): Use `image_gen'. (main): Use `image_generator' keyword.
* * src/include/printer.h (printer): New virtual method `round_width'.wl2004-10-071-0/+2
| | | | | | | | | | | * src/devices/grodvi/dvi.cpp, src/devices/grolbp/lbp.cpp, src/devices/grolj4/lj4.cpp, src/devices/grops/ps.cpp, src/devices/grotty/tty.cpp (printer::round_width): New function member. * src/devices/grohtml/post-html.cpp (printer::round_width): New function member. (html_printer::set_numbered_char): Use it.
* Implement two new conditional operators `F <name>' and `S <name>'wlemb2004-06-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | which check whether <name> is a valid font or style, respectively. * src/libs/libgroff/font.cpp (text_file): Add `silent' member. (text_file::text_file): Updated. (text_file::error): Don't emit message if `silent' is set. (font::load_font): Add optional third argument (which is directly passed to `load'. (font::load): Add optional second argument to check the header of a font only, without emitting warning or error messages. * src/include/font.h (font): Updated. * src/roff/troff/input.cpp (do_if_request): Implement `S' and `F' conditionals. * src/roff/troff/node.cpp (mount_font_no_translate): Add optional fourth argument to check a font without mounting. (check_font, check_style): New functions. * src/roff/troff/node.h: Updated. * man/groff_diff.man, man/groff.man, NEWS, doc/groff.texinfo: Updated.
* Integrate gxditview into groff's standard directory hierarchy.wlemb2004-06-013-1/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xditview/*: Moved to ... * src/devices/xditview/*: Here. Moved DviChar.h and XFontName.h to src/include. Moved DviChar.c and XFontName.c to new directory src/libs/libxutil. Split off `xmalloc' into new file src/libs/libxutil/xmalloc.c. Moved xtotroff.c to new directory src/utils/xtotroff. Provide proper Makefile.sub files (reusing the stuff from Imakefile.in). DESC renamed to DESC.in. Removed GXDitview-ad.h, INSTALL, Imakefile.in. Converted everything from K&R to ANSI C. Decorated with const where appropriate. Cast string constants with `String' and `char *' where appropriate. Made it compile with C++ (used as a C compiler). Removed other minor compiler warnings. * src/devices/xditview/device.c: Include config.h, string.h, and defs.h. Don't declare `exit', `strtok', `strchr', and `getenv'. (FONTPATH): Remove. * src/devices/xditview/font.c: Don't declare `XParseFontName' and `XFormatFontName'. * src/devices/xditview/xditview.c: Include config.h. Include stdio.h earlier. Protect declaration of `popen' and `pclose' with NEED_DECLARATION_POPEN and NEED_DECLARATION_PCLOSE. Replace `caddr_t' with `XtPointer'. (MakePromptFunc): New typedef. (DoPrint): Use RETSIGTYPE. (promptfunction): Change type to MakePromptFunc. (MakePrompt): Use MakePromptFunc for third argument. (xmalloc): Removed. * src/devices/xditview/ad2c: Add casts to `String'. * src/include/XFontName.h (XFontNameString): Don't use array notation. Add prototypes for `XParseFontName', `XFormatFontName', `XCompareFontName', and `XCopyFontName'. * src/include/Makefile.sub (HDRS): Add `DviChar.h' and `XFontName.h'. * src/utils/xtotroff/xtotroff.c: Include getopt.h. Don't declare `XParseFontName' and `XFormatFontName'. (xmalloc): Removed. (main): Remove `optind' and `optarg'. * Makefile.in (XDEVDIRS, XPROGDIRS, XLIBDIRS): New variables (to select programs which need X). Make XDEVIDIRS depend on `FORCE'. (X_CFLAGS, X_LIBS, X_EXTRA_LIBS, X_PRE_LIBS): New variables (for X support). (MDEFINES): Updated. (LIBDIRS): Use XLIBDIRS. (CPROGDIRS): Use XPROGDIRS. (DEVDIRS): Remove font directories for gxditview. (ALLDIRS, DISTDIRS): Add XDEVDIRS. (EXTRADIRS): Remove src/xditview. * Makefile.sub (DISCLEANFILES): Updated. * Makefile.comm (LIBXUTIL): New variable. (.cpp.o, .cpp.obj): Handle EXTRA_CCFLAGS. (.c.o, .c.obj, .y.o): Handle EXTRA_CFLAGS. * Makefile.cpg, Makefile.ccpg ($PROG): Handle EXTRA_LDFLAGS. * aclocal.m4 (GROFF_X11): New function. * configure.ac: Call GROFF_X11. Don't create src/xditview/Imakefile. Don't emit notice how to build gxditview. * configure: Regenerated. * test-groff.in (GROFF_BIN_PATH, XENVIRONMENT): Updated.
* * REVISION: Set to 2.wlemb2004-05-161-3/+3
| | | | | | | | | | | * aclocal.m4 (GROFF_STDINT_H): Removed. (GROFF_INTTYPES_H): Define HACE_CC_INTTYPES_H. * configure.ac: Updated. * configure, src/include/config.hin: Regenerated. * src/libs/libgroff/tmpname.cpp: Don't include stdint.h but inttypes.h conditionally.
* * src/include/font.h (font): Use `int' for ch_index.wlemb2004-04-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/libs/libgroff/font.cpp (font::alloc_ch_index, font::compact): Updated. * src/roff/groff/pipeline.c (run_pipeline) [_WIN32]: Fix compiler warnings. * src/roff/troff/div.cpp (begin_page), src/roff/troff/env.cpp (hyphen_word): Fix compiler warnings. * src/roff/troff/input.cpp (get_char_for_escape_name): Return `char'. Update all callers. (get_delim_number, get_line_arg): Change second argument type to `unsigned char'. (macro_header::copy, token::next, do_define_string, do_define_character, substring_request, asciify_macro, unformat_macro, read_size, non_interpreted_node::interpret, while_request, main: Fix compiler warnings. (read_color_draw_node): Initialize `col'. * src/preproc/tbl/table.cpp (horizontal_span, table_entry): Make `start_col' and `end_col' of type `int'. (vertical_rule): Make `col' of type `int'. * src/preproc/grn/hdb.cpp (DBRead): Protect call to getc with check for EOF. * src/preproc/refer/label.y (uppercase_array, lowercase_array): New arrays. (format_serial): Use them to remove dependency on ASCII. * src/devices/grops/ps.cpp (ps_printer::define_encoding): Fix compiler warning. * src/devices/grops/psrm.cpp (resource_manager::supply_resource): Ditto. * src/devices/grotty/tty.cpp (tty_font::load_tty_font): Fix compiler warnings. (glyph): Change type of `hpos' to `int'. * src/devices/lbp/lbp.cpp (strsep): Removed. Unused. * src/devices/lbp/lbp.h (splinerel): Fix compiler warnings. * src/utils/tfmtodit.cpp (gf::load): Fix compiler warnings. * src/utils/pfbtops/pfbtops.c (get_text): Fix compiler warning.
* * src/devices/grolbp/lbp.h, src/preproc/grn/gprint.h,wlemb2004-04-173-8/+9
| | | | | | | | | | | | | | | | | | | | | | | src/preproc/grn/hgraph.cpp, src/preproc/grn/hpoint.cpp, src/preproc/html/pushback.cpp, src/preproc/html/pushback.h: Use `double' instead of `float' everywhere. * src/preproc/grn/main.cpp: Use `double' instead of `float' everywhere. (main): Add return value. * src/preproc/grn/hdb.cpp: Use `double' instead of `float' everywhere. Update all user functions. * src/include/search.h, src/include/ptable.h, src/include/printer.h, src/preproc/eqn/box.h, src/preproc/pic/object.h, src/preproc/refer/refer.h, src/preproc/tbl/table.h, src/preproc/tbl/table.cpp, src/roff/troff/env.h, src/roff/troff/div.h, src/roff/troff/token.h, src/roff/troff/node.h, src/roff/troff/input.cpp, src/roff/troff/request.h, src/roff/troff/node.cpp: Don't mix `struct' and `class' in forward declarations. * src/utils/indxbib/signal.c: Include stdlib.h.
* * src/include/nonposix.h (write, dup, dup2, close) [_MSC_VER]:wlemb2004-02-291-13/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New macros. * src/roff/groff/pipeline.c: Declare strcasecmp. (run_pipeline) [_WIN32]: Use function name variants which don't start with `_'. Fix stream handling. * src/include/nonposix.h: Fix declaration of `system_shell_name'. Declare `spawnvp_wrapper' and macro definitions of spawnvp only for platforms which use the native Win32 runtime libraries. (FLUSH_INPUT_PIPE) [_UWIN]: Provide non-empty version. * src/libs/libgroff/quotearg.c (QUOTE_ARG_MALLOC_ERROR, QUOTE_ARG_REALLOC_ERROR): Fix string. * src/preproc/html/pre-html.cpp: Remove declaration of `spawnvp_wrapper'. Don't use __MINGW32__. s/DEBUG_FILE/DEBUG_FILE_DIR/. (DEBUG_TEXT, DEBUG_NAME, DEBUG_FILE) [DEBUGGING]: New macros. (OUTPUT_STREAM, PS_OUTPUT_STREAM, REGION_OUTPUT_STREAM): New macros. (char_buffer::run_output_filter) [MAY_FORK_CHILD_PROCESS]: Fix calls to `set_redirection' and `WAIT'. [MAY_SPAWN_ASYNCHRONOUS_CHILD]: Remove unused variable `i' and `j'. Fix calls to `set_redirection' and `save_and_redirect'. (char_buffer::do_html, char_buffer::do_image) [DEBUGGING]: Fix calls to `set_redirection' and `save_and_redirect'. (usage): Fix message. (makeTempFiles, main): Use `DEBUG_FILE'.
* * src/libs/libgroff/quotearg.c: New file, providing proper argumentwlemb2004-02-222-2/+14
| | | | | | | | | | | | | | | | | | | quoting for MSVC's spawn* and exec* functions. * src/libs/libgroff/spawnvp.c: New file, providing a wrapper around spawnvp with proper quoting for MSVC. * src/libs/libgroff/assert.cpp (program_name), src/libs/libgroff/new.cpp (program_name): Declare as `extern "C"'. * src/libs/libgroff/Makefile.sub (OBJS, CSRCS): Updated. * src/roff/troff/input.cpp (program_name): Declare as `extern "C"'. * src/include/error.h (program_name): Declare as `extern "C"'. * src/include/nonposix.h [__MSDOS__ ...]: Handle spawnvp. * src/preproc/html/pre-html.cpp [__CYGWIN__ ...]: Declare spawnvp_wrapper. [MAY_SPAWN_ASYNCHRONOUS_CHILD]: Declare i and j.
* * src/roff/troff/div.cpp: Include nonposix.h after troff.h towlemb2004-02-201-1/+3
| | | | avoid warnings w.r.t. redefinition of P_tmpdir for some compilers.
* * font/devlj4/Makefile.sub (DEVFILES): Updated to contain allwlemb2004-02-191-4/+16
| | | | | | | | | | | new font and mapping files. * src/include/nonposix.h (FLUSH_INPUT_PIPE): New macro to empty an input pipe. This is needed for the MSVC compiler to make troff's `-o' option work. * src/roff/troff/div.cpp: Include nonposix.h. (cleanup_and_exit): Call FLUSH_INPUT_PIPE.
* Implement string-valued registers \n[.m] and \n[.M] to return thewlemb2004-01-073-1/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | name of the current drawing and background color, respectively. * src/roff/troff/symbol.h: Moved to... * src/include/symbol.h: Here. Small fixes to make it work outside of the `troff' directory. * src/roff/troff/symbol.cpp: Moved to... * src/libs/libgroff/symbol.cpp: Here. Small fixes to make it work outside of the `troff' directory. * src/include/Makefile.sub (HDRS), src/libs/libgroff/Makefile.sub (OBJS, CCSRCS), src/roff/troff/Makefile.sub (OBJS, CCSRCS, HDRS): Updated. * src/include/color.h: Include symbol.h. (color): Add new field `nm'. * src/libs/libgroff/color.cpp (color::color): Updated. * src/roff/troff/dictionary.cpp, src/roff/troff/div.cpp, src/roff/troff/node.cpp, src/roff/troff/number.cpp, src/roff/troff/reg.cpp: Don't include symbol.h. * src/roff/troff/env.cpp: Don't include symbol.h. (environment::get_glyph_color_string, environment_get_fill_color_string): New member functions. (init_env_requests): Handle `.m' and `.M' registers. * src/roff/troff/input.cpp: Don't include symbol.h. (default_symbol): Moved to symbol.cpp/symbol.h. (do_glyph_color, do_fill_color, define_color): Pass symbol name to color constructor. * src/roff/troff/env.h: Updated. * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo: Document new registers.
* * src/roff/troff/nroff.cpp (space_node::get_breakpoints,wlemb2004-01-052-2/+2
| | | | | | space_node::nbreaks): Protect against zero `next' field. Update copyright years.
* More fixes for MSVC compiler.wlemb2003-12-302-1/+17
| | | | | | | | | | | | | | | | | | | | | | | * 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.