xref: /titanic_44/usr/src/tools/codereview/codereview.1 (revision 999620f696af5092beda95a29692ad3ff16e9434)
CDDL HEADER START

The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.

You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.

When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at usr/src/OPENSOLARIS.LICENSE.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]

CDDL HEADER END

Copyright 2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
codereview 1 "August 5, 2008"
C
NAME
codereview - Diff list generator
SYNOPSIS
codereview [-e] [-h\f2heading] [-r] oldfile newfile
DESCRIPTION

The codereview command expects two ASCII text files as input and produces Postscript describing the differences between the files. The first file is assumed to be the older version, and the second file is assumed to be the newer version. If either oldfile or newfile is - , the corresponding file is taken from the standard input. The output goes to standard output and lists all lines from both files, with lines changed from the first to the second being highlighted in gray. Lines deleted from the first file are listed in italic, while lines added to the second file are listed in bold.

OPTIONS

10 -e Elide unchanged functions. Functions which are unchanged will be heuristically eliminated from the listing. Only the function end is parsed. The assumption is that a brace ('}') in column one represents the end of a function. Thus unchanged structure definitions may be elided also. For support of assembly language files, the string "SET_SIZE(" occurring in a line is assumed to mark the end of a function also.

-h heading Put a header on each page. The heading string appears at the upper left of each page, and the page number appears at the upper right.

-r Enable page reversal so that the pages appear in the correct sequence in the output tray of printers like the Apple LaserWriter. The default is not to perform page reversal, which is correct for printers like the NEC Silentwriter LC-890.

FILES
/tmp/lwlpXXXXXX - temporary file used for page reversal
LIMITATIONS
The maximum input line length is 1024 characters. This should not present a problem since the corresponding output line length would be too long to be printed. The program silently truncates input lines that are too long.
NOTES
The command pageview -right -h 17 -w 11 -Ws 1100 850 -dpi 100 out.ps is useful for displaying the results of codereview .
AUTHOR
John Zolnowsky

SunSoft, Inc.