DOKK / manpages / debian 10 / trueprint / trueprint.1.en
TRUEPRINT(1) User Manual TRUEPRINT(1)

trueprint - print program listings on postscript printer.

trueprint [ options ] [ files ]

trueprint is a general purpose program printing program. It tries to produce everything that anybody could need in a program printout without the need for large numbers of switches or pipelines. trueprint can currently handle C, C++, Java, Perl, Verilog, shell (including ksh), Pascal, pseudo C, report files (trueprint report file, see NOTES), listing files, text files.

Each page in the output has a default header consisting of the date or a user-defined string, the current function name, and the overall page number (which is used in the indexes); and a footer consisting of the date, the current file name and page number within file, and the overall page number. If the language contains the concept of braces then trueprint will include a braces depth count in the left-hand margin.

The printout has two function indexes at the front - one is an alphabetical list of all functions and the other is a list of files with functions in each file in alphabetical order. The first is suppressed if there are no functions and the second is suppressed if there is only one file.

If no language is specified on the command line then options are defaulted to be appropriate for the first file specified on the command line. The filetype is taken from the suffix - valid suffixes are


.C .hpp .H

When Trueprint starts it uses four sets of options:

— Hard-coded defaults
— Language-specific defaults
— Options taken from the environment variable `$TP_OPTS'
— Command-line options

Each set of options overrides the earlier sets, so command-line options override all other sets.
If you want to set some personal default options, then simply set the environment variable `$TP_OPTS'.

set debug options to <string> (see USAGE whatfor <string> is).
if <string> is a file then print diffs between <string> and input file otherwise use as a prefix and print diffs. See USAGE for more information on usage.
treat input as language. Use --help=language for list.
set username for coversheet
Type help information and given the <string> option it lists options for the following topics:
all-options - all options
misc-options - miscellaneous options
page-furniture-options - page furniture options
text-format-options - text formatting options
print-options - options that select what to print
page-format-options - page format options
output-options - options affecting output
language - languages
prompt - format for --print-pages string
debug - format for --debug string
header - format for header & footer strings
report - file format for --language=report input
environment - environment vars used
Type version information
use environment variables
don't use values from environment, such as time, $USER, etc. This is for test purposes, to make test results more reproducible
Use level one postscript.
Use level two postscript.

don't print page breaks at the end of functions
print page breaks at the end of functions
Wrap lines at exactly the line-wrap column
Wrap lines intelligently at significant characters, such as a space
minimum line length permitted by intelligent line wrap (default 10)
set tabsize (default 8)
don't expand form feed characters to new page
expand form feed characters to new page
specify point size (default 10)
specify interline gap in points (default 1)
specify the line-wrap column.
turn off line-wrap
specify number of lines on a page, point size is calculated appropriately

don't leave space for holepunch at the side of each page
leave space for holepunch at the side of each page
don't leave space for holepunch at the top of each page
leave space for holepunch at the top of each page
print using portrait orientation
print using landscape orientation
print single-sided
print double-sided
-1, --one-up
print 1-on-1 (default)
-2, --two-up
print 2-on-1
-3, --two-tall-up
print 2-on-1 at 4-on-1 pointsize
-4, --four-up
print 4-on-1

specify string for left side of header
specify string for left side of footer
specify string for center of header
specify string for center of footer
specify string for right side of header
specify string for right side of footer
message to be printed over page. Will be printed in a very large, light gray font. There are a few escapes as a replacement for <string>; see USAGE for more information.
Emulate the old lineprinter paper with gray bands across each page. The value of <number> gives the width of the bands and the gaps between them
include the header on each page
suppress the header on each page
include the footer on each page
suppress the footer on each page
Draw lines around header & footer boxes and down left side of page.
Don't draw lines around header & footer boxes or down left side of page.
exclude the braces depth count
include the braces depth count
exclude the line number count
include the line number count

Per default trueprint will send the postscript output to `lp' or `lpr' and it will explicitly set the destination to the value of the environment variable `$PRINTER'.

use printer <string>
use printer <string>
send output to filename <string>; use - for stdout
redirect output to .ps file named after first filename
don't redirect output
specify number of copies to be printed

don't print cover sheet
print cover sheet
specify list of pages to be printed (see USAGE whatfor <selection> is).
don't prompt for each page, whether it should be printed or not
prompt for each page, whether it should be printed or not
don't print file index
print file index
don't print function index
print function index
don't print body of text
print body of text

The usage of the `-D <string>', `--debug=<string>' is as follows:
Each letter turns on a set of debugging messages, and the corresponding digit indicates the level of messages, with 1 indicating the least number of messages and 9 turning on all messages. The letter `@' can be used to turn on all areas, so `--debug=@9' will turn on all messages. Use `--help=debug' for details of what letters turn on what areas.
Note that this feature is not uniformly implemented - messages were only typically added where they were needed. Also note that messages will not be generated in code prior to the code that sets the debug string!

The usage of the `-O <string>', `--diff=<string>' option looks as follows:
You specify the old version of the file or files with `--diff=<pathname>'. If <pathname> suffixed with the current filename is a valid file then the differences between <pathname>/<filename> are displayed. Alternatively, if <pathname> is a file and you're printing one file, then the differences between <pathname> and the current file are displayed. Examples how to make it are shown below:

trueprint --diff=../old- this.c that.c

will print the differences between ../old-this.c and this.c, and ../old-that.c and that.c.

trueprint --diff=../old/ this.c that.c

will print the differences between ../old/this.c and this.c, and ../old/that.c and that.c. Note that the trailing / is important.

trueprint --diff=this.c that.c

will print the differences between this.c and that.c.

The usage of the `-A <selection>', `--print-pages=<selection>' option looks as follows:
<selection> consists of a comma-seperated list of page selections:

`<number>' -- print the specific page
`<number>-<number>' -- Print all pages between, and including, the specified pages
`<function-name>' -- Print all pages that include function-name.
`d' -- Print all pages that have changed (this is only useful with the `--diff' (see above) option.
`D' -- Print all pages containing functions that have changed (this is only useful with the `--diff' (see above) option.
`f' -- Print the function index
`F' -- Print the file index.

For example,

--print-pages=1-5,main,f

will print the function index, pages 1 to 5, and all the pages for the function `main'.

If you specify `--prompt'then trueprint will prompt you for each page, whether or not it should print that page. It will give you information such as the current filename, current functionname, page number, and so on. The possible responses are:

`y' -- Print this page.
`y<number>' -- Print <number> pages.
`y*' -- Print all the remaining pages.
`n' -- Skip this page
`n<number>' -- Skip <number> pages.
`n*' -- Skip all the remaining pages.
`p<selection>' -- Print all remaining pages that match <selection>, where <selection> is in the format defined above.
`?' -- Print a help message.

The `--message=<string>' option takes a few % escapes for <string> which are listed below:

`%%' -- Print a simple %.
`%m' -- Print the current month of the year as a number, e.g. 05.
`%d' -- Print the current day of the month, e.g. 01.
`%y' -- Print the current year, e.g. 1999
`%D' -- Print the date in the format mm/dd/yy.
`%L' -- Print the date and time in long format, e.g. Fri Oct 8 11:49:51 1999
`%c' -- Print the last modified date of the current file in the format mm/dd/yy.
`%C' -- Print the last modified date and time of the current file in long format, e.g. Fri Oct 8 11:49:51 1999
`%H' -- Print the current hour.
`%M' -- Print the current minute.
`%S' -- Print the current second.
`%T' -- Print the time in the format HH:MM:SS.
`%j' -- Print the day of the year, e.g. 095.
`%w' -- Print the day of the week, e.g. Sunday.
`%a' -- Print the abbreviated day of the week, e.g. Sun.
`%h' -- Print the abbreviated month name, e.g. Mar.
`%r' -- Print the time in am/pm notation, e.g. 10:45pm.
`%p' -- Print the page number in the current file.
`%P' -- Print the overall page number.
`%f' -- Print the total number of pages of the current file.
`%F' -- Print the total number of pages.
`%n' -- Print the current filename.
`%N' -- Print the current function name.
`%l' -- Print the username of the current user.

Default Values are:

`left-header' `%L'
`center-header' `%N'
`right-header' `Page %P of %F'
`left-footer' `%L'
`center-footer' `%n %p'
`right-footer' `Page %P of %F'

For most of the languages, trueprint uses the language to work out where comments are (so it can print them in italics) and where the function names are (so it can print them in bold and include them in the function index). However there are some special features for some of the languages:

Pseudo C is like C, except it has a more forgiving syntax. In particular it ignores strings, so if you leave off a closing quote then pseudo C will print out using a vaguely sensible format. Pseudo C is intended for printing code that doesn't yet compile.

Listing format assumes very wide lines and a fixed page length of sixty-six characters, so it turns off line-wrap and sets the page length appropriately.

Report format uses a few special characters: anything between ^A and ^E is printed in bold and included in the function index, and anything between a pair of ^Cs is printed in italics.

By default Trueprint uses environment variables and the current username.

Specify the printer to use when sending postscript output to the printer.
Specify options. These options override any default options including language defaults, but are overridden by command line options.
Specify the diff command to be used. The command must produce output in the same format as the classic Unix diff. This variable can be used to add flags to the diff command used, for example to make diff ignore whitespace.
Specify the print command. The default is lpr. If this is set then it should be set to a command that takes standard input. If this is set then the destination and number of copies have no effect, i.e. there is no mechanism to pass these values to your print command. If you set this to /bin/cat then the postscript output will appear on stdout.
Specify the printers file. The default is the printers file that was initially configured when trueprint was installed. This can be used to test out a new printers file.

The program was written by Lezz Giles. Please send bug reports to <bug-trueprint@gnu.org> and ideas for enhancement or similar things to <enhance-trueprint@gnu.org>. The manpage was written by Othmar Pasteka <othmar@tron.at>.

7. 1. 2000 GNU