summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-06 22:33:33 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-06 22:33:33 -0700
commit787f9d6d8f6dd6663af27e3cd21facaee6bed4f5 (patch)
treed0e8402179f8530d9d5fd0f863f6c3dcbd64b990
parentfbd4b8fe00ba600b44232619425f76a6f4fa8208 (diff)
Strip trailing whitespace
Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac4
-rw-r--r--x2jet.c34
-rw-r--r--x2pmp.c10
-rw-r--r--xdpr.man10
-rw-r--r--xdpr.script6
-rw-r--r--xpr.c50
-rw-r--r--xpr.man8
8 files changed, 64 insertions, 64 deletions
diff --git a/Makefile.am b/Makefile.am
index e89f225..c96f863 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
-#
+#
# Copyright 2005 Red Hat, Inc.
-#
+#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
@@ -10,7 +10,7 @@
# specific, written prior permission. Red Hat makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
-#
+#
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/configure.ac b/configure.ac
index d133052..004575e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
dnl Copyright 2005 Red Hat, Inc.
-dnl
+dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its
dnl documentation for any purpose is hereby granted without fee, provided that
dnl the above copyright notice appear in all copies and that both that
@@ -10,7 +10,7 @@ dnl advertising or publicity pertaining to distribution of the software without
dnl specific, written prior permission. Red Hat makes no
dnl representations about the suitability of this software for any purpose. It
dnl is provided "as is" without express or implied warranty.
-dnl
+dnl
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/x2jet.c b/x2jet.c
index e71441b..93af379 100644
--- a/x2jet.c
+++ b/x2jet.c
@@ -27,13 +27,13 @@
Copyright (c) 1988 by Hewlett-Packard Company
-Permission to use, copy, modify, and distribute this software
-and its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that copyright notice and this permission
-notice appear in supporting documentation, and that
-Hewlett-Packard not be used in advertising or publicity
-pertaining to distribution of the software without specific, written
+Permission to use, copy, modify, and distribute this software
+and its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that copyright notice and this permission
+notice appear in supporting documentation, and that
+Hewlett-Packard not be used in advertising or publicity
+pertaining to distribution of the software without specific, written
prior permission.
********************************************************/
@@ -521,7 +521,7 @@ static unsigned short fullintensity;
static long *colormap;
-/* Pjcolor array is used to hold the scaled RGB triple values
+/* Pjcolor array is used to hold the scaled RGB triple values
* programmed into the printer.
*/
static long pjcolor[MAX_PJ_COLOR];
@@ -546,7 +546,7 @@ typedef struct colorindex {
/* Global data for color interpretation. This structure serves as a home
* for the color index lists (only used when processing DirectColor or
- * TrueColor visual types). It also holds color processing switches and a
+ * TrueColor visual types). It also holds color processing switches and a
* pointer to the output file to reduce parameter passing overhead.
*/
static struct {
@@ -614,7 +614,7 @@ void reset_color_mapping (void)
/* preload for monochrome output */
pjcolor[0] = WHITE;
pjcolor[1] = BLACK;
- }
+ }
if (Direct_or_TrueColor) {
/* move color index chain cells onto the free list */
@@ -646,7 +646,7 @@ void prepare_color_mapping (
fullintensity = (fullintensity << 1) | 1;
for (n = sizeof(short) * 8 - xwd_header.bits_per_rgb; n > 0; n--)
fullintensity = (fullintensity << 1);
-
+
Direct_or_TrueColor = (xwd_header.visual_class == DirectColor
|| xwd_header.visual_class == TrueColor);
color.PaintJet = paintjet;
@@ -734,7 +734,7 @@ int load_printer_color (
{
int n, red, blue, green, xred, xgreen, xblue;
long compositeRGB;
-
+
if (colormap[index] != EMPTY)
/* printer has already been programmed for this color index */
return(1); /* "success" */
@@ -1179,7 +1179,7 @@ void write_image_prefix (
fprintf(out,"\033&a%dH\033&a%dV",
/* imageloc x & y are written in decipoints */
(int) imageloc.x / 10, (int) imageloc.y / 10);
-
+
/* If doing transparencies, tell the printer before raster graphics */
if (slide && device != LJET)
fprintf(out, "\033&k3W");
@@ -1421,7 +1421,7 @@ void index_by_pixel(
long *lp;
char *line_pixels;
register char *lc;
-
+
if (!(line_pixels = malloc(length)))
fatal_err((catgets(nlmsg_fd,NL_SETN,17,
"Could not allocate raster line memory.")));
@@ -1450,7 +1450,7 @@ void write_raster_line (
long *lp;
char *line_colors, *raster_line;
register char *lc, *rl, byte = 0;
-
+
if (device == PJETXL) {
if (Direct_or_TrueColor)
direct_by_pixel(out, line, length, device);
@@ -1653,7 +1653,7 @@ void write_image (
write_XY_image(out, scale, orient, device); break;
case ZPixmap:
write_Z_image(out, scale, orient, device); break;
- default:
+ default:
fatal_err((catgets(nlmsg_fd,NL_SETN,23, "image not in XY or Z format.")));
}
}
@@ -1690,7 +1690,7 @@ void x2jet(
write_image_prefix(out, scale, density, header, device, position_on_page,
initial_formfeed, orient, gamma, render, slide);
-
+
write_image(out, scale, orient, device);
write_image_suffix(out, trailer, position_on_page, slide, render, device);
diff --git a/x2pmp.c b/x2pmp.c
index 0af1761..0b46493 100644
--- a/x2pmp.c
+++ b/x2pmp.c
@@ -55,7 +55,7 @@ void x2pmp(FILE *in, FILE *out,
/* Read header from file */
if (fread((char *)&header, sizeof(header), 1, in) != 1) {
- if (feof(in))
+ if (feof(in))
return;
else
leave("fread");
@@ -86,7 +86,7 @@ void x2pmp(FILE *in, FILE *out,
one_plane_size = byte_width * height;
buffer_size = one_plane_size *
((header.pixmap_format == ZPixmap)? header.pixmap_depth: 1);
-
+
/* Determine orientation and scale if not specified */
if (orient == UNSPECIFIED)
orient = (fixed_width <= height)? PORTRAIT: LANDSCAPE;
@@ -185,7 +185,7 @@ void x2pmp(FILE *in, FILE *out,
unsigned char *tbl = magnification_table(scale);
unsigned char *scale_buf;
int i, j, k;
-
+
if ((scale_buf = (unsigned char *)
calloc((unsigned) (buffer_size *= scale*scale), sizeof(char)))
== NULL)
@@ -351,10 +351,10 @@ void p_bitmap(
puthl2(h, p);
puthl2(w, p);
puthl3(buflen, p);
-
+
while(buflen) {
int len;
-
+
len = min(buflen, MAX_VECTOR_LEN);
PMP(p, len);
(void) fwrite((char *) buf, 1, len, p);
diff --git a/xdpr.man b/xdpr.man
index 68a4eee..deaee2b 100644
--- a/xdpr.man
+++ b/xdpr.man
@@ -25,9 +25,9 @@ xdpr \- dump an X window directly to a printer
.SH DESCRIPTION
.I Xdpr
-uses the commands
+uses the commands
.I xwd,
-.I xpr,
+.I xpr,
and
.I lpr
or
@@ -52,7 +52,7 @@ printed instead of selecting an X window.
Specifies a printer to send the output to. If a printer name is not
specified here, \fIxdpr\fP (really, \fIlpr\fP or \fIlp\fP)
will send your output to the
-printer specified by the \fIPRINTER\fP environment variable.
+printer specified by the \fIPRINTER\fP environment variable.
Be sure that type of the printer matches the type specified
with the \fI\-device\fP option.
.TP
@@ -101,8 +101,8 @@ provided only for backwards compatibility.
This option displays the list of options known to
.I xdpr.
.PP
-Any other arguments
-will be passed to the
+Any other arguments
+will be passed to the
.I xwd,
.I xpr,
and
diff --git a/xdpr.script b/xdpr.script
index 3ca4eb2..5c4ecf1 100644
--- a/xdpr.script
+++ b/xdpr.script
@@ -108,7 +108,7 @@ while [ $1 ]; do
xprv="$xprv $1"
else
echo "xdpr: Invalid argument "$1""
- echo $usage
+ echo $usage
exit 1
fi
esac
@@ -149,7 +149,7 @@ if [ "$out" ]; then
exit 0
fi
-# print only
+# print only
if [ "$infile" ]; then
if [ "$xwdv" ]; then
echo "xdpr: The following arguments will be ignored:"
@@ -161,6 +161,6 @@ fi
# dump & print (default)
xwd $xwdv | xpr -header "$header" -trailer "$trailer" $xprv | $LP $lprv
-exit 0
+exit 0
# EOF
diff --git a/xpr.c b/xpr.c
index 9f7f160..cdc2143 100644
--- a/xpr.c
+++ b/xpr.c
@@ -40,10 +40,10 @@ from the X Consortium.
* by using run-length encoding on white (1) pixels.
* This version does not (yet) support the following options
* -append -dump -noff -nosixopt -split
- *
+ *
* Changes
* Copyright 1986 by Marvin Solomon and the University of Wisconsin
- *
+ *
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
@@ -57,7 +57,7 @@ from the X Consortium.
* makes any representations about the suitability of
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
- *
+ *
* Modified by Bob Scheifler for 2x2 grayscale, then ...
* Modified by Angela Bock and E. Mike Durbin, Rich Inc., to produce output
* using 2x2, 3x3, or 4x4 grayscales. This version modifies the grayscale
@@ -280,8 +280,8 @@ static void ps_output_bits(
const char *data);
static int ps_putbuf(
register unsigned char *s,
- register int n,
- register int ocount,
+ register int n,
+ register int ocount,
int compact);
static void ps_bitrot(
unsigned char *s,
@@ -292,8 +292,8 @@ static void ps_bitrot(
static void fullread (
int file,
char *data,
- int nbytes);
-
+ int nbytes);
+
int main(int argc, char **argv)
{
unsigned long swaptest = 1;
@@ -319,16 +319,16 @@ int main(int argc, char **argv)
enum orientation orientation;
enum device device;
XColor *colors = (XColor *)NULL;
-
+
if (!(progname = argv[0]))
progname = "xpr";
#ifdef NLS
nlmsg_fd = catopen("xpr", 0);
#endif
- parse_args (argc, argv, &scale, &width, &height, &left, &top, &device,
+ parse_args (argc, argv, &scale, &width, &height, &left, &top, &device,
&flags, &split, &header, &trailer, &plane, &gray,
&density, &cutoff, &gamma, &render);
-
+
if (device == PP) {
x2pmp(stdin, stdout, scale,
width >= 0? inch2pel((float)width/300.0): X_MAX_PELS,
@@ -369,7 +369,7 @@ int main(int argc, char **argv)
w_name = malloc((unsigned)(win.header_size - sizeof win));
fullread(0, w_name, (int) (win.header_size - sizeof win));
-
+
if(win.ncolors) {
XWDColor xwdcolor;
colors = (XColor *)malloc((unsigned) (win.ncolors * sizeof(XColor)));
@@ -436,7 +436,7 @@ int main(int argc, char **argv)
/* ln03_grind_fonts(sixmap, iw, ih, scale, &pixmap); */
ln03_setup(iw, ih, orientation, scale, left, top,
&left_margin, &top_margin, flags, header, trailer);
- ln03_output_sixels(sixmap, iw, ih, (flags & F_NOSIXOPT), split,
+ ln03_output_sixels(sixmap, iw, ih, (flags & F_NOSIXOPT), split,
scale, top_margin, left_margin);
ln03_finish();
} else if (device == LA100) {
@@ -451,13 +451,13 @@ int main(int argc, char **argv)
} else {
fprintf(stderr, "xpr: device not supported\n");
}
-
+
/* print some statistics */
if (flags & F_REPORT) {
fprintf(stderr, "Name: %s\n", w_name);
- fprintf(stderr, "Width: %d, Height: %d\n", (int)win.pixmap_width,
+ fprintf(stderr, "Width: %d, Height: %d\n", (int)win.pixmap_width,
(int)win.pixmap_height);
- fprintf(stderr, "Orientation: %s, Scale: %d\n",
+ fprintf(stderr, "Orientation: %s, Scale: %d\n",
(orientation==PORTRAIT) ? "Portrait" : "Landscape", scale);
}
if (((device == LN03) || (device == LA100)) && (flags & F_DUMP))
@@ -783,7 +783,7 @@ void parse_args(
f = open(output_filename, O_WRONLY, 0);
}
if (f < 0) {
- fprintf(stderr, "xpr: error opening \"%s\" for output\n",
+ fprintf(stderr, "xpr: error opening \"%s\" for output\n",
output_filename);
perror("xpr");
exit(1);
@@ -825,7 +825,7 @@ void setup_layout(
/* check maximum width and height; set orientation and scale*/
if (device == LN03 || device == PS) {
- if ((win_width < win_height || (flags & F_PORTRAIT)) &&
+ if ((win_width < win_height || (flags & F_PORTRAIT)) &&
!(flags & F_LANDSCAPE)) {
*orientation = PORTRAIT;
w_max = (width > 0)? width : W_MAX;
@@ -1156,7 +1156,7 @@ void ln03_setup(
register int lm, tm, xm;
char buf[256];
register char *bp = buf;
-
+
if (!(flags & F_APPEND)) {
sprintf(bp, LN_STR); bp += 4;
sprintf(bp, LN_SSU, 7); bp += 5;
@@ -1214,13 +1214,13 @@ void ln03_finish(void)
sprintf(bp, LN_DECOPM_RESET); bp += sizeof LN_DECOPM_SET - 1;
sprintf(bp, LN_LNM); bp += 5;
sprintf(bp, LN_PUM); bp += 5;
- sprintf(bp, LN_PFS, "?20"); bp += 7;
- sprintf(bp, LN_SGR, 0); bp += strlen(bp);
+ sprintf(bp, LN_PFS, "?20"); bp += 7;
+ sprintf(bp, LN_SGR, 0); bp += strlen(bp);
sprintf(bp, LN_HPA, 1); bp += strlen(bp);
sprintf(bp, LN_VPA, 1); bp += strlen(bp);
- write(1, buf, bp-buf);
+ write(1, buf, bp-buf);
}
/*ARGSUSED*/
@@ -1348,7 +1348,7 @@ char *ps_prolog_compact[] = {
NULL
};
-static const
+static const
char *ps_prolog[] = {
"%%Pages: 1",
"%%EndProlog",
@@ -1814,7 +1814,7 @@ void _invbits (
*b = ~*b;
b++;
} while (--n > 0);
-
+
}
/* copied from lib/X/XPutImage.c */
@@ -1827,7 +1827,7 @@ void _swapbits (
*b = _reverse_byte[*b];
b++;
} while (--n > 0);
-
+
}
void _swapshort (
@@ -1983,7 +1983,7 @@ void ps_bitrot(
}
}
-/* fullread() is the same as read(), except that it guarantees to
+/* fullread() is the same as read(), except that it guarantees to
read all the bytes requested. */
static
diff --git a/xpr.man b/xpr.man
index 63693e4..3129f08 100644
--- a/xpr.man
+++ b/xpr.man
@@ -86,7 +86,7 @@ prints the largest possible representation of the window on the
output page. Options allow the user to add headers and trailers,
specify margins, adjust the scale and orientation, and append
multiple window dumps to a single output file. Output is to
-standard output unless
+standard output unless
.B \-output
is specified.
.sp 1
@@ -131,7 +131,7 @@ Affects the size of the window on the page. The PostScript, LN03, and HP
printers are able to
translate each bit in a window pixel map into a grid of a specified size.
For example each bit might translate into a 3x3 grid. This would be
-specified by \fB\-scale\fP \fI3\fP. By default a window is printed
+specified by \fB\-scale\fP \fI3\fP. By default a window is printed
with the largest scale that will fit onto the page for the specified
orientation.
.IP "\fB\-height\fP \fIinches\fP"
@@ -178,7 +178,7 @@ is to be appended.
When specified in conjunction with \fB\-append\fP, the window will appear
on the same page as the previous window.
.IP "\fB\-split\fP \fIn\fP"
-This option allows the user to split a window onto several pages.
+This option allows the user to split a window onto several pages.
This might be necessary for very large windows that would otherwise
cause the printer to overload and print the page in an obscure manner.
.IP "\fB\-psfig\fP"
@@ -331,7 +331,7 @@ Copyright 1988, Hewlett Packard Company.
.br
See \fIX(1)\fP for a full statement of rights and permissions.
.SH AUTHORS
-Michael R. Gretzinger, MIT Project Athena,
+Michael R. Gretzinger, MIT Project Athena,
Jose Capo, MIT Project Athena (PP3812 support),
Marvin Solomon, University of Wisconsin,
Bob Scheifler, MIT, Angela Bock and E. Mike Durbin, Rich Inc. (grayscale),