UGRIND 1

NAME

ugrind − troff preprocessor which highlight source code

SYNOPSIS

@BINDIR@/ugrind [−d file] [−h header] [−l language] [−t size] name ...

DESCRIPTION

Ugrind insert string definition in files to highlight the source code they contain. Ugrind runs in two basic modes: regular mode or whole file mode.

The options are:

Currently, known languages are C (−lc), C++ (−lc++), CSH (−lcsh), FORTRAN (−lfortran), ICON (−lI,) ISP (−lisp), LDL (−ldl), LISP LIKE (−ml), MODEL (−lm), MODULA2 (−lmod2), PASCAL (−lp), POSTXML (−lpostxml), RATFOR (−lr), RUSSEL (lrussell), SHELL (−lsh), TROFF (−ltr), XML (−lxml), and YACC (−lyacc),

PROGRAMMING STYLE

Ugrind assumes that a certain programming style is followed:

More generally, arbitrary formatting styles for programs mostly look bad. The use of spaces to align source code fails miserably; if you plan to ugrind your program you should use tabs. This is somewhat inevitable since the font used by ugrind is variable width.

MACROS AND STRINGS

To highlight code, ugrind insert strings in the file, and use some macros, so, to format the output of ugrind with troff, the following strings and macros must be defined by your macro file.

Macros

Strings

HISTORY

Ugrind is a hack of vfontedpr (that probably means visual-font-edit-print), which is the preprocesor used by the mostly forgotten vgrind script, which aims to visually "grind nice listing of programms" with troff. The code that vfontedpr use to read the language description file is "stolen almost totally from termcap". Vgrind and vfontedpr have been written by Dave Presotto and William Joy, for 4.3BSD-Tahoe. They have been modified by Gunnar Ritter as part of the Heirloom documentation tools.

LICENSE

Ugrind and its man page are distributed under the bsd4 license. The code which highlight troff language, written from scratch, is distributed under a bsd2 license. The language description file (@LIBDIR@/ugrindefs) is distributed under the cddl license.

FILES

@BINDIR@/ugrind preprocessor @LIBDIR@/ugrindefs language descriptions

SEE ALSO

troff(1)

AUTHORS

Written by Dave Presotto and William Joy. Modified by Gunnar Ritter for the Heirloom Project and later Pierre-Jean Fichet for Utroff.