summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-20 00:08:51 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-20 00:09:16 -0700
commit02d3b987ad0007b2b6627d97056d0d77fb607039 (patch)
treee4b3d4cb766fca1b416bfb36692426d9c0e2364e
parentcc51f7fce1cefb7a2318c624a2e1ebc124775ec8 (diff)
Strip trailing whitespace
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac4
-rw-r--r--dsimple.c6
-rw-r--r--list.c4
-rw-r--r--list.h20
-rw-r--r--multiVis.c158
-rw-r--r--multiVis.h2
-rw-r--r--xwd.c26
8 files changed, 113 insertions, 113 deletions
diff --git a/Makefile.am b/Makefile.am
index 497be4a..03bead7 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 28ee5d1..5ce7549 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/dsimple.c b/dsimple.c
index 503ed88..fa31e8f 100644
--- a/dsimple.c
+++ b/dsimple.c
@@ -139,7 +139,7 @@ void Close_Display(void)
{
if (dpy == NULL)
return;
-
+
XCloseDisplay(dpy);
dpy = NULL;
}
@@ -215,7 +215,7 @@ Window Select_Window_Args(
COPYOPT;
}
ARGC = nargc;
-
+
return(w);
}
@@ -265,7 +265,7 @@ Window Select_Window(Display *disp, int descend)
buttons--;
break;
}
- }
+ }
XUngrabPointer(disp, CurrentTime); /* Done with pointer */
diff --git a/list.c b/list.c
index 55f50f1..6e9a7a4 100644
--- a/list.c
+++ b/list.c
@@ -74,7 +74,7 @@ int add_to_list(list_ptr lp, void *item)
/** ------------------------------------------------------------------------
- Creates a new list and sets its pointers to NULL.
+ Creates a new list and sets its pointers to NULL.
Returns a pointer to the new list.
-------------------------------------------------------------------- **/
list_ptr new_list (void)
@@ -161,7 +161,7 @@ void *delete_from_list(list_ptr lp, void *item)
/** ------------------------------------------------------------------------
Deletes each node in the list *except the head*. This allows
the deletion of lists where the head is not malloced or created
- with new_list(). If free_items is true, each item pointed to
+ with new_list(). If free_items is true, each item pointed to
from the node is freed, in addition to the node itself.
-------------------------------------------------------------------- **/
void delete_list(list_ptr lp, int free_items)
diff --git a/list.h b/list.h
index a2b3622..664075d 100644
--- a/list.h
+++ b/list.h
@@ -56,8 +56,8 @@ typedef void (*DESTRUCT_FUNC_PTR)(
void *
);
-void zero_list(
- list_ptr
+void zero_list(
+ list_ptr
);
int add_to_list (
list_ptr , void *
@@ -66,28 +66,28 @@ list_ptr new_list (
void
);
list_ptr dup_list_head (
- list_ptr , int
+ list_ptr , int
);
-unsigned int list_length(
- list_ptr
+unsigned int list_length(
+ list_ptr
);
void *delete_from_list (
list_ptr , void *
);
-void delete_list(
- list_ptr , int
+void delete_list(
+ list_ptr , int
);
void delete_list_destroying (
list_ptr , DESTRUCT_FUNC_PTR
);
void *first_in_list (
- list_ptr
+ list_ptr
);
void *next_in_list (
- list_ptr
+ list_ptr
);
int list_is_empty (
- list_ptr
+ list_ptr
);
#endif
diff --git a/multiVis.c b/multiVis.c
index 654691d..86e9634 100644
--- a/multiVis.c
+++ b/multiVis.c
@@ -1,6 +1,6 @@
/** ------------------------------------------------------------------------
This file contains functions to create a list of regions which
- tile a specified window. Each region contains all visible
+ tile a specified window. Each region contains all visible
portions of the window which are drawn with the same visual.
If the window consists of subwindows of two different visual types,
there will be two regions in the list. The list can be traversed
@@ -68,7 +68,7 @@ typedef struct {
Window parent; /* id of parent (for debugging) */
} image_win_type;
-/* Items in short list of regions that tile the grabbed area. May have
+/* Items in short list of regions that tile the grabbed area. May have
multiple windows in the region.
*/
typedef struct {
@@ -83,7 +83,7 @@ typedef struct {
} image_region_type;
/** ------------------------------------------------------------------------
- Returns TRUE if the two structs pointed to have the same "vis" &
+ Returns TRUE if the two structs pointed to have the same "vis" &
"cmap" fields and s2 lies completely within s1. s1 and s2 can
point to structs of image_win_type or image_region_type.
------------------------------------------------------------------------ **/
@@ -117,45 +117,45 @@ extern unsigned int list_length();
/* Prototype Declarations for Static Functions */
static void QueryColorMap(
- Display *, Colormap , Visual *,
+ Display *, Colormap , Visual *,
XColor **, int *, int *, int *
);
static void TransferImage(
Display *, XImage *,int, int , image_region_type*,
- XImage *,int ,int
+ XImage *,int ,int
);
static XImage * ReadRegionsInList(
Display *, Visual *, int, int, unsigned int,
unsigned int, XRectangle, list_ptr
);
-static list_ptr make_region_list(
+static list_ptr make_region_list(
Display*, Window, XRectangle*,
int*, int, XVisualInfo**, int *
);
-static void destroy_region_list(
- list_ptr
+static void destroy_region_list(
+ list_ptr
) ;
-static void subtr_rect_from_image_region(
- image_region_type *, int , int , int , int
+static void subtr_rect_from_image_region(
+ image_region_type *, int , int , int , int
);
-static void add_rect_to_image_region(
+static void add_rect_to_image_region(
image_region_type *,
- int , int , int , int
+ int , int , int , int
);
-static int src_in_region_list(
- image_win_type *, list_ptr
+static int src_in_region_list(
+ image_win_type *, list_ptr
);
static void add_window_to_list(
list_ptr, Window, int, int ,
int , int , int , int, int,
Visual*, Colormap, Window
);
-static int src_in_image(
+static int src_in_image(
image_win_type *, int , XVisualInfo**
);
-static int src_in_overlay(
+static int src_in_overlay(
image_region_type *, int, OverlayInfo *, int*, int*
);
static void make_src_list(
@@ -270,9 +270,9 @@ GetMultiVisualRegions(Display *disp,
*vis_regions = *vis_image_regions = NULL ;
if ((*vis_regions = make_region_list( disp, srcRootWinid, &bbox,
&hasNonDefault, *numImageVisuals,
- *pImageVisuals, allImage)) == NULL)
+ *pImageVisuals, allImage)) == NULL)
return 0 ;
-
+
if (*transparentOverlays)
{
*allImage = 1; /* until proven otherwise,
@@ -284,7 +284,7 @@ GetMultiVisualRegions(Display *disp,
/* if there is a second region in any of the two lists return 1 **/
if ( ( *vis_regions && (*vis_regions)->next && (*vis_regions)->next->next ) ||
- ( *vis_image_regions && (*vis_image_regions)->next &&
+ ( *vis_image_regions && (*vis_image_regions)->next &&
(*vis_image_regions)->next->next ) ) return 1 ;
else return 0 ;
@@ -303,7 +303,7 @@ static void TransferImage(Display *disp, XImage *reg_image,
&rShift,&gShift,&bShift) ;
switch (reg->vis->class) {
- case TrueColor :
+ case TrueColor :
for(i=0 ; i < srch ; i++)
{
for(j=0 ; j < srcw ; j++)
@@ -311,43 +311,43 @@ static void TransferImage(Display *disp, XImage *reg_image,
old_pixel = XGetPixel(reg_image,j,i) ;
if( reg->vis->map_entries == 16) {
-
+
red_ind = (old_pixel & reg->vis->red_mask) >> rShift ;
green_ind = (old_pixel & reg->vis->green_mask) >> gShift ;
blue_ind = (old_pixel & reg->vis->blue_mask) >> bShift ;
- new_pixel = (
+ new_pixel = (
((colors[red_ind].red >> 8) << RED_SHIFT)
|((colors[green_ind].green >> 8) << GREEN_SHIFT)
|((colors[blue_ind].blue >> 8) << BLUE_SHIFT)
);
}
- else
+ else
new_pixel = old_pixel;
XPutPixel(target_image,dst_x+j, dst_y+i,new_pixel);
-
+
}
}
break;
case DirectColor :
for(i=0 ; i < srch ; i++)
{
-
+
for(j=0 ; j < srcw ; j++)
{
old_pixel = XGetPixel(reg_image,j,i) ;
red_ind = (old_pixel & reg->vis->red_mask) >> rShift ;
green_ind = (old_pixel & reg->vis->green_mask) >> gShift ;
blue_ind = (old_pixel & reg->vis->blue_mask) >> bShift ;
-
- new_pixel = (
+
+ new_pixel = (
((colors[red_ind].red >> 8) << RED_SHIFT)
|((colors[green_ind].green >> 8) << GREEN_SHIFT)
|((colors[blue_ind].blue >> 8) << BLUE_SHIFT)
);
XPutPixel(target_image,dst_x+j, dst_y+i,new_pixel);
-
+
}
}
break;
@@ -357,14 +357,14 @@ static void TransferImage(Display *disp, XImage *reg_image,
for(j=0 ; j < srcw ; j++)
{
old_pixel = XGetPixel(reg_image,j,i) ;
-
- new_pixel = (
+
+ new_pixel = (
((colors[old_pixel].red >> 8) << RED_SHIFT)
|((colors[old_pixel].green >> 8) << GREEN_SHIFT)
|((colors[old_pixel].blue >> 8) << BLUE_SHIFT)
);
XPutPixel(target_image,dst_x+j, dst_y+i,new_pixel);
-
+
}
}
break;
@@ -383,8 +383,8 @@ ReadRegionsInList(Display *disp, Visual *fakeVis, int depth, int format,
XImage *reg_image,*ximage ;
int srcRect_x,srcRect_y,srcRect_width,srcRect_height ;
- int bytes_per_line;
-
+ int bytes_per_line;
+
ximage = XCreateImage(disp,fakeVis,depth,format,0,NULL,width,height,
8,0) ;
bytes_per_line = ximage->bytes_per_line;
@@ -395,26 +395,26 @@ ReadRegionsInList(Display *disp, Visual *fakeVis, int depth, int format,
ximage->data = malloc(height*bytes_per_line*depth);
ximage->bits_per_pixel = depth; /** Valid only if format is ZPixmap ***/
-
+
for (reg = (image_region_type *) first_in_list( regions); reg;
- reg = (image_region_type *) next_in_list( regions))
+ reg = (image_region_type *) next_in_list( regions))
{
int rect;
struct my_XRegion *vis_reg;
vis_reg = (struct my_XRegion *)(reg->visible_region);
- for (rect = 0;
+ for (rect = 0;
rect < vis_reg->numRects;
rect++)
{
/** ------------------------------------------------------------------------
- Intersect bbox with visible part of region giving src rect & output
+ Intersect bbox with visible part of region giving src rect & output
location. Width is the min right side minus the max left side.
Similar for height. Offset src rect so x,y are relative to
origin of win, not the root-relative visible rect of win.
------------------------------------------------------------------------ **/
- srcRect_width = MIN( vis_reg->rects[rect].x2, bbox.width + bbox.x) -
+ srcRect_width = MIN( vis_reg->rects[rect].x2, bbox.width + bbox.x) -
MAX( vis_reg->rects[rect].x1, bbox.x);
- srcRect_height = MIN( vis_reg->rects[rect].y2, bbox.height + bbox.y) -
+ srcRect_height = MIN( vis_reg->rects[rect].y2, bbox.height + bbox.y) -
MAX( vis_reg->rects[rect].y1, bbox.y);
diff = bbox.x - vis_reg->rects[rect].x1;
srcRect_x = MAX( 0, diff) + (vis_reg->rects[rect].x1 - reg->x_rootrel - reg->border);
@@ -441,7 +441,7 @@ XImage *ReadAreaToImage(Display *disp,
/* root rel UL corner of bounding box of grab */
int x, int y,
/* size of bounding box of grab */
- unsigned int width, unsigned int height,
+ unsigned int width, unsigned int height,
int numVisuals, XVisualInfo *pVisuals,
int numOverlayVisuals, OverlayInfo *pOverlayVisuals,
int numImageVisuals, XVisualInfo **pImageVisuals,
@@ -504,7 +504,7 @@ XImage *ReadAreaToImage(Display *disp,
int test = 0 ;
srcRect_width = MIN( reg->width + reg->x_vis, bbox.width + bbox.x)
- MAX( reg->x_vis, bbox.x);
- srcRect_height = MIN( reg->height + reg->y_vis, bbox.height
+ srcRect_height = MIN( reg->height + reg->y_vis, bbox.height
+ bbox.y) - MAX( reg->y_vis, bbox.y);
diff = bbox.x - reg->x_vis;
srcRect_x = MAX( 0, diff) + (reg->x_vis - reg->x_rootrel - reg->border);
@@ -513,7 +513,7 @@ XImage *ReadAreaToImage(Display *disp,
srcRect_y = MAX( 0, diff) + (reg->y_vis - reg->y_rootrel - reg->border);
dst_y = MAX( 0, -diff) ;
/* let's test some pixels for transparency */
- image = XGetImage(disp, reg->win, srcRect_x, srcRect_y,
+ image = XGetImage(disp, reg->win, srcRect_x, srcRect_y,
srcRect_width, srcRect_height, 0xffffffff, ZPixmap);
/* let's assume byte per pixel for overlay image for now */
@@ -535,7 +535,7 @@ XImage *ReadAreaToImage(Display *disp,
#endif
pixel = XGetPixel(ximage_ipm,dst_x+x1,dst_y+y1) ;
XPutPixel(ximage,dst_x+x1, dst_y+y1,pixel);
-
+
if(!test){
test = 1 ;
}
@@ -650,13 +650,13 @@ static void make_src_list(Display *disp, list_ptr image_wins,
XQueryTree( disp, curr, &root, &parent, &child, &nchild );
save_child_list = child; /* so we can free list when we're done */
- add_window_to_list( image_wins, curr, x_rootrel, y_rootrel,
- pclip->x, pclip->y,
- pclip->width, pclip->height,
- curr_attrs->border_width,curr_attrs->visual,
+ add_window_to_list( image_wins, curr, x_rootrel, y_rootrel,
+ pclip->x, pclip->y,
+ pclip->width, pclip->height,
+ curr_attrs->border_width,curr_attrs->visual,
curr_attrs->colormap, parent);
-
+
/** ------------------------------------------------------------------------
set RR coords of right (Rt), left (X), bottom (Bt) and top (Y)
of rect we clip all children by. This is our own clip rect (pclip)
@@ -667,10 +667,10 @@ static void make_src_list(Display *disp, list_ptr image_wins,
curr_clipX = MAX( pclip->x, x_rootrel + (int) curr_attrs->border_width);
curr_clipY = MAX( pclip->y, y_rootrel + (int) curr_attrs->border_width);
curr_clipRt = MIN( pclip->x + (int) pclip->width,
- x_rootrel + (int) curr_attrs->width +
+ x_rootrel + (int) curr_attrs->width +
2 * (int) curr_attrs->border_width);
curr_clipBt = MIN( pclip->y + (int) pclip->height,
- y_rootrel + (int) curr_attrs->height +
+ y_rootrel + (int) curr_attrs->height +
2 * (int) curr_attrs->border_width);
while (nchild--) {
@@ -688,17 +688,17 @@ static void make_src_list(Display *disp, list_ptr image_wins,
if (new_width >= 0) {
child_clip.width = new_width;
- child_yrr = y_rootrel + child_attrs.y +
+ child_yrr = y_rootrel + child_attrs.y +
curr_attrs->border_width;
child_clip.y = MAX( curr_clipY, child_yrr);
- new_height = MIN( curr_clipBt,
- child_yrr + (int) child_attrs.height +
- 2 * child_attrs.border_width)
+ new_height = MIN( curr_clipBt,
+ child_yrr + (int) child_attrs.height +
+ 2 * child_attrs.border_width)
- child_clip.y;
if (new_height >= 0) {
child_clip.height = new_height;
- make_src_list( disp, image_wins, bbox, *child,
- child_xrr, child_yrr,
+ make_src_list( disp, image_wins, bbox, *child,
+ child_xrr, child_yrr,
&child_attrs, &child_clip);
}
}
@@ -714,7 +714,7 @@ static void make_src_list(Display *disp, list_ptr image_wins,
window. Each region contains all visible portions of the window
which are drawn with the same visual. For example, if the
window consists of subwindows of two different visual types,
- there will be two regions in the list.
+ there will be two regions in the list.
Returns a pointer to the list.
------------------------------------------------------------------------ **/
static list_ptr make_region_list(Display *disp, Window win, XRectangle *bbox,
@@ -731,8 +731,8 @@ static list_ptr make_region_list(Display *disp, Window win, XRectangle *bbox,
XRectangle clip;
int image_only;
- int count=0 ;
-
+ int count=0 ;
+
*hasNonDefault = False;
XUnionRectWithRegion( bbox, bbox_region, bbox_region);
XGetWindowAttributes( disp, win, &win_attrs);
@@ -742,14 +742,14 @@ static list_ptr make_region_list(Display *disp, Window win, XRectangle *bbox,
clip.y = 0;
clip.width = win_attrs.width;
clip.height = win_attrs.height;
- make_src_list( disp, &image_wins, bbox, win,
+ make_src_list( disp, &image_wins, bbox, win,
0 /* x_rootrel */, 0 /* y_rootrel */, &win_attrs, &clip);
image_regions = new_list();
- image_only = (*allImage) ? True:False;
+ image_only = (*allImage) ? True:False;
for (base_src = (image_win_type *) first_in_list( &image_wins); base_src;
- base_src = (image_win_type *) next_in_list( &image_wins))
+ base_src = (image_win_type *) next_in_list( &image_wins))
{
/* test for image visual */
if (!image_only || src_in_image(base_src, numImageVisuals, pImageVisuals))
@@ -757,12 +757,12 @@ static list_ptr make_region_list(Display *disp, Window win, XRectangle *bbox,
/* find a window whose visual hasn't been put in list yet */
if (!src_in_region_list( base_src, image_regions))
{
- if (! (new_reg = (image_region_type *)
+ if (! (new_reg = (image_region_type *)
malloc( sizeof( image_region_type)))) {
return (list_ptr) NULL;
}
- count++;
-
+ count++;
+
new_reg->visible_region = XCreateRegion();
new_reg->win = base_src->win;
new_reg->vis = base_src->vis;
@@ -774,28 +774,28 @@ static list_ptr make_region_list(Display *disp, Window win, XRectangle *bbox,
new_reg->width = base_src->width;
new_reg->height = base_src->height;
new_reg->border = base_src->border_width;
-
+
srcs_left = (list_ptr) dup_list_head( &image_wins, START_AT_CURR);
for (src = (image_win_type *) first_in_list( srcs_left); src;
src = (image_win_type *) next_in_list( srcs_left)) {
if (SAME_REGIONS( base_src, src)) {
- add_rect_to_image_region( new_reg, src->x_vis, src->y_vis,
+ add_rect_to_image_region( new_reg, src->x_vis, src->y_vis,
src->width, src->height);
}
else {
if (!image_only || src_in_image(src, numImageVisuals, pImageVisuals))
- {
+ {
subtr_rect_from_image_region( new_reg, src->x_vis,
src->y_vis, src->width, src->height);
- }
+ }
}
}
- XIntersectRegion( bbox_region, new_reg->visible_region,
+ XIntersectRegion( bbox_region, new_reg->visible_region,
new_reg->visible_region);
if (! XEmptyRegion( new_reg->visible_region)) {
add_to_list( image_regions, new_reg);
if (new_reg->vis != DefaultVisualOfScreen( win_attrs.screen) ||
- new_reg->cmap != DefaultColormapOfScreen(
+ new_reg->cmap != DefaultColormapOfScreen(
win_attrs.screen)) {
*hasNonDefault = True;
}
@@ -847,7 +847,7 @@ static void subtr_rect_from_image_region(image_region_type *image_region,
rect.width = width;
rect.height = height;
XUnionRectWithRegion( &rect, rect_region, rect_region);
- XSubtractRegion( image_region->visible_region, rect_region,
+ XSubtractRegion( image_region->visible_region, rect_region,
image_region->visible_region);
XDestroyRegion( rect_region);
}
@@ -865,7 +865,7 @@ static void add_rect_to_image_region(image_region_type *image_region,
rect.y = y;
rect.width = width;
rect.height = height;
- XUnionRectWithRegion( &rect, image_region->visible_region,
+ XUnionRectWithRegion( &rect, image_region->visible_region,
image_region->visible_region);
}
@@ -894,7 +894,7 @@ static int src_in_region_list(image_win_type *src, list_ptr image_regions)
Makes a new entry in image_wins with the given fields filled in.
------------------------------------------------------------------------ **/
static void add_window_to_list(list_ptr image_wins, Window w,
- int xrr, int yrr, int x_vis, int y_vis,
+ int xrr, int yrr, int x_vis, int y_vis,
int width, int height, int border_width,
Visual *vis, Colormap cmap, Window parent)
{
@@ -941,7 +941,7 @@ static int src_in_image(image_win_type *src, int numImageVisuals,
and transparency is possible, FALSE otherwise.
------------------------------------------------------------------------ **/
static int src_in_overlay(image_region_type *src, int numOverlayVisuals,
- OverlayInfo *pOverlayVisuals,
+ OverlayInfo *pOverlayVisuals,
int *transparentColor, int *transparentType)
{
int i;
@@ -955,10 +955,10 @@ static int src_in_overlay(image_region_type *src, int numOverlayVisuals,
*transparentType = pOverlayVisuals[i].transparentType;
return 1;
}
-
+
else {
}
-
+
}
return 0;
}
@@ -1041,14 +1041,14 @@ int GetXVisualInfo(/* Which X server (aka "display"). */
Atom overlayVisualsAtom; /* Parameters for XGetWindowProperty */
Atom actualType;
unsigned long numLongs, bytesAfter;
- int actualFormat;
+ int actualFormat;
int nImageVisualsAlloced; /* Values to process the XVisualInfo */
int imageVisual; /* array */
/* First, get the list of visuals for this screen. */
getVisInfo.screen = screen;
- mask = VisualScreenMask;
+ mask = VisualScreenMask;
*pVisuals = XGetVisualInfo(display, mask, &getVisInfo, numVisuals);
if ((nVisuals = *numVisuals) <= 0)
diff --git a/multiVis.h b/multiVis.h
index 271d787..28b940b 100644
--- a/multiVis.h
+++ b/multiVis.h
@@ -39,7 +39,7 @@ extern int GetMultiVisualRegions(
unsigned int, int *, int *, XVisualInfo **, int *,
OverlayInfo **, int *, XVisualInfo ***, list_ptr *,
list_ptr *, int *
-);
+);
extern XImage *ReadAreaToImage(
Display *, Window, int, int, unsigned int,
diff --git a/xwd.c b/xwd.c
index 93f9da2..85734ea 100644
--- a/xwd.c
+++ b/xwd.c
@@ -27,22 +27,22 @@ in this Software without prior written authorization from The Open Group.
/*
* xwd.c MIT Project Athena, X Window system window raster image dumper.
*
- * This program will dump a raster image of the contents of a window into a
+ * This program will dump a raster image of the contents of a window into a
* file for output on graphics printers or for other uses.
*
* Author: Tony Della Fera, DEC
* 17-Jun-85
- *
+ *
* Modification history:
*
* 11/14/86 Bill Wyatt, Smithsonian Astrophysical Observatory
- * - Removed Z format option, changing it to an XY option. Monochrome
+ * - Removed Z format option, changing it to an XY option. Monochrome
* windows will always dump in XY format. Color windows will dump
* in Z format by default, but can be dumped in XY format with the
* -xy option.
*
* 11/18/86 Bill Wyatt
- * - VERSION 6 is same as version 5 for monchrome. For colors, the
+ * - VERSION 6 is same as version 5 for monchrome. For colors, the
* appropriate number of Color structs are dumped after the header,
* which has the number of colors (=0 for monochrome) in place of the
* V5 padding at the end. Up to 16-bit displays are supported. I
@@ -202,7 +202,7 @@ main(int argc, char **argv)
if (standard_out)
_setmode(fileno(out_file), _O_BINARY);
#endif
-
+
/*
* Let the user select the target window.
*/
@@ -265,7 +265,7 @@ Window_Dump(Window window, FILE *out)
Window dummywin;
XWDFileHeader header;
XWDColor xwdcolor;
-
+
int transparentOverlays , multiVis;
int numVisuals;
XVisualInfo *pVisuals;
@@ -294,13 +294,13 @@ Window_Dump(Window window, FILE *out)
* Get the parameters of the window being dumped.
*/
if (debug) outl("xwd: Getting target window information.\n");
- if(!XGetWindowAttributes(dpy, window, &win_info))
+ if(!XGetWindowAttributes(dpy, window, &win_info))
Fatal_Error("Can't get target window attributes.");
/* handle any frame window */
if (!XTranslateCoordinates (dpy, window, RootWindow (dpy, screen), 0, 0,
&absx, &absy, &dummywin)) {
- fprintf (stderr,
+ fprintf (stderr,
"%s: unable to translate window coordinates (%d,%d)\n",
program_name, absx, absy);
exit (1);
@@ -344,18 +344,18 @@ Window_Dump(Window window, FILE *out)
x = absx - win_info.x;
y = absy - win_info.y;
- multiVis = GetMultiVisualRegions(dpy,RootWindow(dpy, screen),
- absx, absy,
+ multiVis = GetMultiVisualRegions(dpy,RootWindow(dpy, screen),
+ absx, absy,
width, height,&transparentOverlays,&numVisuals, &pVisuals,
&numOverlayVisuals,&pOverlayVisuals,&numImageVisuals,
&pImageVisuals,&vis_regions,&vis_image_regions,&allImage) ;
if (on_root || multiVis)
{
if(!multiVis)
- image = XGetImage (dpy, RootWindow(dpy, screen), absx, absy,
+ image = XGetImage (dpy, RootWindow(dpy, screen), absx, absy,
width, height, AllPlanes, format);
else
- image = ReadAreaToImage(dpy, RootWindow(dpy, screen), absx, absy,
+ image = ReadAreaToImage(dpy, RootWindow(dpy, screen), absx, absy,
width, height,
numVisuals,pVisuals,numOverlayVisuals,pOverlayVisuals,
numImageVisuals, pImageVisuals,vis_regions,
@@ -581,7 +581,7 @@ ReadColors(Visual *vis, Colormap cmap, XColor **colors)
}
XQueryColors(dpy, cmap, *colors, ncolors);
-
+
return(ncolors);
}