TRUEPRINT(1)

NAME
trueprint - print program listings on postscript printer.

SYNOPSIS
trueprint [ -HVbdDghlmnoOpPStwx24 ] files

DESCRIPTION
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++, Verilog, shell (including ksh), perl, pascal, listing files and plain text files.

This man page is not the most complete source of documentation for trueprint. The definitive documentation is in the info file. You can also use the --help option to trueprint for a quick summary of options and other information.

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. Each page can also have a string printed in large shaded characters diagonally over the centre of each page - this could for example give the version number or say "For your eyes only".

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, .h, .cxx, .cpp, .hpp, and .sh. Any other suffix, or no suffix at all, is taken to be plain text.

The text of the printout has line numbers with current brace depth (by default only for C and pascal) down the left hand side. Function names are in bold and comments are in italics.

It is possible to show differences between file versions, in which case deleted lines are shown struck out with a minus sign in the extreme left-hand margin, and added lines are shown in bold with a plus sign in the extreme left-hand margin.

The shell variable $TP_OPTS can be set with parameters which will become defaults; thus if TP_OPTS is set to "-p15" then the pointsize will default to 15, but can be overriden on the command line. This allows the user to set up personal defaults.

trueprint is under constant development, and any suggested enhancements should be sent to enhance-trueprint@gnu.org.

ARGUMENTS

filenames
    The name of the files containing source code to be printed out.

OPTIONS
Options can be used to customize just about every aspect of the output. Note that the list of options changes over time and that this man page may get out of date - the latest list is always available via the --help option.

Miscellaneous options

-D string, --debug=string
    set debug options to string

-O string, --diff=string
    if string is a file then print diffs between string and input file otherwise use as a prefix and print diffs

-t string, --language=string
    treat input as language. Use --help languages for list.

-U string, --username=string
    set username for coversheet

-H, --help
    Type help information

--help=string
    Type specific help information. Use --help for a list of possible strings.

-V, --version
    Type version information

-N, --use-environment
    use environment variables

--N, --ignore-environment
    don't use values from environment, such as time, $USER, etc. This is for test purposes, to make test results more reproducible.

Page furniture options

-X string, --left-header=string
    Specify string for left side of header.

-x string, --left-footer=string
    Specify string for left side of footer.

-Y string, --center-header=string
    Specify string for center of header.

-y string, --center-footer=string
    Specify string for center of footer.

-Z string, --right-header=string
    Specify string for right side of header.

-z string, --right-footer=string
    Specify string for right side of footer.

-m string, --message=string
    Message to be printed over page.

-G number, --gray-bands=number
    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.

-K, --headers
    Include the header on each page.

--K, --no-headers
    Suppress the header on each page.

-k, --footers
    Include the footer on each page.

--k, --no-footers
    Suppress the footer on each page.

-i, --no-braces-depth
    Exclude the braces depth count.

--i, --braces-depth
    Include the braces depth count.

-n, --no-line-numbers
    Exclude the line number count.

--n, --line-numbers
    Include the line number count.

Text formatting options

-b, --no-page-break-after-function
    Don't print page breaks at the end of functions.

--b, --page-break-after-function
    Print page breaks at the end of functions.

-W, --no-intelligent-line-wrap
    Wrap lines at exactly the line-wrap column.

--W, --intelligent-line-wrap
    Wrap lines intelligently at significant characters, such as a space

-L number, --minimum-line-length=number
    Ensure lines created using intelligent line wrap are at least the indicated width.

-T number, --tabsize=number
    Set tabsize (default 8).

-E, --ignore-form-feeds
    Don't expand form feed characters to new page.

--E, --form-feeds
    Expand form feed characters to new page.

-p number, --point-size=number
    Specify point size (default 10).

-g number, --leading=number
    Specify interline gap in points (default 1).

-w number, --line-wrap=number
    Specify the line-wrap column.

--no-line-wrap
    Turn off line-wrap.

-l number, --page-length=number
    Specify number of lines on a page, point size is calculated appropriately.

Print selection options

-C, --no-cover-sheet
    Don't print cover sheet.

--C, --cover-sheet
    Print cover sheet.

-A string, --print-pages=string
    Specify list of pages to be printed.

-a, --no-prompt
    Don't prompt for each page, whether it should be printed or not.

--a, --prompt
    Prompt for each page, whether it should be printed or not.

-F, --no-file-index
    Don't print file index.

--F, --file-index
    Print file index.

-f, --no-function-index
    Don't print function index.

--f, --function-index
    Print function index.

-B, --no-print-body
    Don't print body of text.

--B, --print-body
    Print body of text.

Page format options

-I, --no-holepunch
    Don't leave space for holepunch at the side of each page.

--I, --holepunch
    Leave space for holepunch at the side of each page.

-J, --no-top-holepunch
    Don't leave space for holepunch at the top of each page.

--J, --top-holepunch
    Leave space for holepunch at the top of each page.

-o p, --portrait
    Print using portrait orientation.

-o l, --landscape
    Print using landscape orientation.

-S 1, --single-sided
    Print single-sided.

-S 2, --double-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.

Output options

-d string, --printer=string
    Use printer string.

-P string, --printer=string
    Use printer string.

-s string, --output=string
    Send output to filename string; use - for stdout.

-r, --redirect-output
    Send output to filename named after first filename arg with .ps suffix.

--r, --no-redirect-output
    Turn off --redirect-output behaviour.

-c number, --copies=number
    Specify number of copies to be printed.

STRING EXPANSION
Many options take a string that can contain sequences which will be
    expanded as follows:

%%  a percent character

%m  month of year

%d  day of month

%y  year e.g. 1993

%D  date mm/dd/yy

%L  long date e.g. Fri Oct 8 11:49:51 1993

%c  modification time of file in format mm/dd/yy

%C  modification time of file in long format

%H  hour

%M  minute

%S  second

%T  time HH:MM:SS

%j  day of year ddd

%w  day of week (Sunday = 0)

%a  abbreviated weekday

%h  abbreviated month

%r  time in am/pm notation

%p  page number in current file

%P  overall page number

%f  number of pages in current file

%F  final overall page number

%n  current filename

%N  current functionname

%l  login name

ENVIRONMENT VARIABLES

TP_OPTS
    Specify options. These options override any default options including language defaults, but are overridden by command line options.

TP_DIFF_CMD
    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.

TP_PRINT_CMD
    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.

TP_PRINTERS_FILE
    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.

EXAMPLES
To print out all the C source files in the current directory:

  trueprint *.c

To print out a shell script:

  trueprint -t sh shellscript

To print all changed pages and complete changed functions, and the function and file indexes, page 93, and pages 2 to 23, for a changed set of files:

  trueprint -A d,D,f,F,93,2-23 -O ../OLD/ *.c

To print out a shell script showing changes:

  trueprint -t sh -O oldshell shellscript

AUTHOR
Lezz Giles giles@world.std.com

SEE ALSO

diff(1)

lpr(1)

Trueprint Users' Manual