diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-06-05 13:12:04 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-06-05 13:12:04 (GMT) |
commit | bd29324420817e1a2fdc1ef1ab92cfe73020c7f8 (patch) | |
tree | e941d8cac470415eab1469160234f7ec7dd217a9 /xlib | |
parent | b9ac2ca02b001723d25096259a828947861b28ab (diff) | |
parent | 35c7a90f1f54a585f10d40e153fc8b2775d7f66a (diff) | |
download | tk-bd29324420817e1a2fdc1ef1ab92cfe73020c7f8.zip tk-bd29324420817e1a2fdc1ef1ab92cfe73020c7f8.tar.gz tk-bd29324420817e1a2fdc1ef1ab92cfe73020c7f8.tar.bz2 |
merge core-8-4-branch
FossilOrigin-Name: 61bf2ca347bfe0c1fc1534aea862ea94145731e6
Diffstat (limited to 'xlib')
-rw-r--r-- | xlib/xdraw.c | 6 | ||||
-rw-r--r-- | xlib/xgc.c | 44 | ||||
-rw-r--r-- | xlib/ximage.c | 2 | ||||
-rw-r--r-- | xlib/xutil.c | 6 |
4 files changed, 28 insertions, 30 deletions
diff --git a/xlib/xdraw.c b/xlib/xdraw.c index 46eee3e..8523df7 100644 --- a/xlib/xdraw.c +++ b/xlib/xdraw.c @@ -1,4 +1,4 @@ -/* +/* * xdraw.c -- * * This file contains generic procedures related to X drawing @@ -17,7 +17,7 @@ * * XDrawLine -- * - * Draw a single line between two points in a given drawable. + * Draw a single line between two points in a given drawable. * * Results: * None. @@ -42,7 +42,6 @@ XDrawLine(display, d, gc, x1, y1, x2, y2) points[1].x = x2; points[1].y = y2; return XDrawLines(display, d, gc, points, 2, CoordModeOrigin); - return 0; } /* @@ -78,5 +77,4 @@ XFillRectangle(display, d, gc, x, y, width, height) rectangle.width = width; rectangle.height = height; return XFillRectangles(display, d, gc, &rectangle, 1); - return 0; } @@ -1,8 +1,8 @@ -/* +/* * xgc.c -- * * This file contains generic routines for manipulating X graphics - * contexts. + * contexts. * * Copyright (c) 1995-1996 Sun Microsystems, Inc. * Copyright (c) 2002-2007 Daniel A. Steffen <das@users.sourceforge.net> @@ -49,7 +49,7 @@ static TkpClipMask *AllocClipMask(GC gc) { TkpClipMask *clip_mask = (TkpClipMask*) gc->clip_mask; - + if (clip_mask == None) { clip_mask = (TkpClipMask*) ckalloc(sizeof(TkpClipMask)); gc->clip_mask = (Pixmap) clip_mask; @@ -97,7 +97,7 @@ static void FreeClipMask(GC gc) { * Allocate a new GC, and initialize the specified fields. * * Results: - * Returns a newly allocated GC. + * Returns a newly allocated GC. * * Side effects: * None. @@ -133,7 +133,7 @@ XCreateGC(display, d, mask, values) BlackPixelOfScreen(DefaultScreenOfDisplay(display)); gp->background = (mask & GCBackground) ?values->background : WhitePixelOfScreen(DefaultScreenOfDisplay(display)); - gp->line_width = (mask & GCLineWidth) ?values->line_width :1; + gp->line_width = (mask & GCLineWidth) ?values->line_width :1; gp->line_style = (mask & GCLineStyle) ?values->line_style :LineSolid; gp->cap_style = (mask & GCCapStyle) ?values->cap_style :0; gp->join_style = (mask & GCJoinStyle) ?values->join_style :0; @@ -156,7 +156,7 @@ XCreateGC(display, d, mask, values) gp->clip_mask = None; if (mask & GCClipMask) { TkpClipMask *clip_mask = AllocClipMask(gp); - + clip_mask->type = TKP_CLIP_PIXMAP; clip_mask->value.pixmap = values->clip_mask; } @@ -192,7 +192,7 @@ XChangeGC(d, gc, mask, values) if (mask & GCPlaneMask) { gc->plane_mask = values->plane_mask; } if (mask & GCForeground) { gc->foreground = values->foreground; } if (mask & GCBackground) { gc->background = values->background; } - if (mask & GCLineWidth) { gc->line_width = values->line_width; } + if (mask & GCLineWidth) { gc->line_width = values->line_width; } if (mask & GCLineStyle) { gc->line_style = values->line_style; } if (mask & GCCapStyle) { gc->cap_style = values->cap_style; } if (mask & GCJoinStyle) { gc->join_style = values->join_style; } @@ -211,7 +211,7 @@ XChangeGC(d, gc, mask, values) if (mask & GCClipMask) { XSetClipMask(d, gc, values->clip_mask); } if (mask & GCDashOffset) { gc->dash_offset = values->dash_offset; } if (mask & GCDashList) { gc->dashes = values->dashes; (&(gc->dashes))[1] = 0;} - return 0; + return Success; } /* @@ -238,7 +238,7 @@ int XFreeGC(d, gc) FreeClipMask(gc); ckfree((char *) gc); } - return 0; + return Success; } /* @@ -265,7 +265,7 @@ XSetForeground(display, gc, foreground) unsigned long foreground; { gc->foreground = foreground; - return 0; + return Success; } int @@ -275,7 +275,7 @@ XSetBackground(display, gc, background) unsigned long background; { gc->background = background; - return 0; + return Success; } int @@ -300,7 +300,7 @@ XSetDashes(display, gc, dash_offset, dash_list, n) *p++ = *dash_list++; } *p = 0; - return 0; + return Success; } int @@ -310,7 +310,7 @@ XSetFunction(display, gc, function) int function; { gc->function = function; - return 0; + return Success; } int @@ -320,7 +320,7 @@ XSetFillRule(display, gc, fill_rule) int fill_rule; { gc->fill_rule = fill_rule; - return 0; + return Success; } int @@ -330,7 +330,7 @@ XSetFillStyle(display, gc, fill_style) int fill_style; { gc->fill_style = fill_style; - return 0; + return Success; } int @@ -341,7 +341,7 @@ XSetTSOrigin(display, gc, x, y) { gc->ts_x_origin = x; gc->ts_y_origin = y; - return 0; + return Success; } int @@ -351,7 +351,7 @@ XSetFont(display, gc, font) Font font; { gc->font = font; - return 0; + return Success; } int @@ -361,7 +361,7 @@ XSetArcMode(display, gc, arc_mode) int arc_mode; { gc->arc_mode = arc_mode; - return 0; + return Success; } int @@ -371,7 +371,7 @@ XSetStipple(display, gc, stipple) Pixmap stipple; { gc->stipple = stipple; - return 0; + return Success; } int @@ -388,7 +388,7 @@ XSetLineAttributes(display, gc, line_width, line_style, cap_style, gc->line_style = line_style; gc->cap_style = cap_style; gc->join_style = join_style; - return 0; + return Success; } int @@ -400,7 +400,7 @@ XSetClipOrigin(display, gc, clip_x_origin, clip_y_origin) { gc->clip_x_origin = clip_x_origin; gc->clip_y_origin = clip_y_origin; - return 0; + return Success; } /* @@ -457,7 +457,7 @@ XSetClipMask(display, gc, pixmap) clip_mask->type = TKP_CLIP_PIXMAP; clip_mask->value.pixmap = pixmap; } - return 0; + return Success; } /* diff --git a/xlib/ximage.c b/xlib/ximage.c index de3bb1e..e7ac86c 100644 --- a/xlib/ximage.c +++ b/xlib/ximage.c @@ -1,4 +1,4 @@ -/* +/* * ximage.c -- * * X bitmap and image routines. diff --git a/xlib/xutil.c b/xlib/xutil.c index db9d35e..23b589c 100644 --- a/xlib/xutil.c +++ b/xlib/xutil.c @@ -1,4 +1,4 @@ -/* +/* * xutil.c -- * * This function contains generic X emulation routines. @@ -46,7 +46,7 @@ XInternAtom(display, atom_name, only_if_exists) Bool only_if_exists; { static Atom atom = XA_LAST_PREDEFINED; - + display->request++; return ++atom; } @@ -85,7 +85,7 @@ XGetVisualInfo(display, vinfo_mask, vinfo_template, nitems_return) info->red_mask = info->visual->red_mask; info->green_mask = info->visual->green_mask; info->blue_mask = info->visual->blue_mask; - + if (((vinfo_mask & VisualIDMask) && (vinfo_template->visualid != info->visualid)) || ((vinfo_mask & VisualScreenMask) |