summaryrefslogtreecommitdiffstats
path: root/xlib
diff options
context:
space:
mode:
Diffstat (limited to 'xlib')
-rw-r--r--xlib/rgb.txt15
-rw-r--r--xlib/xcolors.c10
-rw-r--r--xlib/xgc.c11
-rw-r--r--xlib/xutil.c5
4 files changed, 23 insertions, 18 deletions
diff --git a/xlib/rgb.txt b/xlib/rgb.txt
index 3b7ba4d..7a4f983 100644
--- a/xlib/rgb.txt
+++ b/xlib/rgb.txt
@@ -3,9 +3,14 @@
! aqua - 0 255 255
! crimson - 220 20 60
! fuchsia - 255 0 255
+! gray 190 190 190 128 128 128
+! green 0 255 0 0 128 0
+! grey 190 190 190 128 128 128
! indigo - 75 0 130
! lime - 0 255 0
+! maroon 176 48 96 128 0 0
! olive - 128 128 0
+! purple 160 32 240 128 0 128
! silver - 192 192 192
! teal - 0 128 128
!
@@ -162,7 +167,7 @@
238 180 34 goldenrod2
205 155 29 goldenrod3
139 105 20 goldenrod4
-190 190 190 gray
+128 128 128 gray
3 3 3 gray1
5 5 5 gray2
8 8 8 gray3
@@ -264,13 +269,13 @@
252 252 252 gray99
255 255 255 gray100
0 0 0 gray0
- 0 255 0 green
+ 0 128 0 green
0 255 0 green1
0 238 0 green2
0 205 0 green3
0 139 0 green4
173 255 47 greenYellow
-190 190 190 grey
+128 128 128 grey
3 3 3 grey1
5 5 5 grey2
8 8 8 grey3
@@ -467,7 +472,7 @@
238 0 238 magenta2
205 0 205 magenta3
139 0 139 magenta4
-176 48 96 maroon
+128 0 0 maroon
255 52 179 maroon1
238 48 167 maroon2
205 41 144 maroon3
@@ -560,7 +565,7 @@
205 150 205 plum3
139 102 139 plum4
176 224 230 powderBlue
-160 32 240 purple
+128 0 128 purple
155 48 255 purple1
145 44 238 purple2
125 38 205 purple3
diff --git a/xlib/xcolors.c b/xlib/xcolors.c
index 66591c7..b5e45c9 100644
--- a/xlib/xcolors.c
+++ b/xlib/xcolors.c
@@ -105,12 +105,12 @@ static const elem xColors[] = {
"old\0 \213\165\000\315\255\000\356\311\000\377\327\000\377\327\000\4",
"oldenrod\0 \213\151\024\315\233\035\356\264\042\377\301\045\332\245\040\4",
"ray\0\024\024\024\022\022\022\017\017\017\015\015\015\012\012\012"
- "\010\010\010\005\005\005\003\003\003\276\276\276\10",
+ "\010\010\010\005\005\005\003\003\003\200\200\200\10",
"ray0\0 \000\000\000",
- "reen\0 \000\213\000\000\315\000\000\356\000\000\377\000\000\377\000\4",
+ "reen\0 \000\213\000\000\315\000\000\356\000\000\377\000\000\200\000\4",
"reenYellow\0 \255\377\057",
"rey\0\024\024\024\022\022\022\017\017\017\015\015\015\012\012\012"
- "\010\010\010\005\005\005\003\003\003\276\276\276\10",
+ "\010\010\010\005\005\005\003\003\003\200\200\200\10",
"rey0\0 \000\000\000",
/* Colors starting with 'h' */
"oneydew\0 \203\213\203\301\315\301\340\356\340\360\377\360\360\377\360\4",
@@ -150,7 +150,7 @@ static const elem xColors[] = {
"inen\0 \372\360\346",
/* Colors starting with 'm' */
"agenta\0 \213\000\213\315\000\315\356\000\356\377\000\377\377\000\377\4",
- "aroon\0 \213\034\142\315\051\220\356\060\247\377\064\263\260\060\140\4",
+ "aroon\0 \213\034\142\315\051\220\356\060\247\377\064\263\200\000\000\4",
"ediumAquamarine\0 \146\315\252",
"ediumBlue\0 \000\000\315",
"ediumOrchid\0 \172\067\213\264\122\315\321\137\356\340\146\377\272\125\323\4",
@@ -186,7 +186,7 @@ static const elem xColors[] = {
"ink\0 \213\143\154\315\221\236\356\251\270\377\265\305\377\300\313\4",
"lum\0 \213\146\213\315\226\315\356\256\356\377\273\377\335\240\335\4",
"owderBlue\0 \260\340\346",
- "urple\0 \125\032\213\175\046\315\221\054\356\233\060\377\240\040\360\4",
+ "urple\0 \125\032\213\175\046\315\221\054\356\233\060\377\200\000\200\4",
/* Colors starting with 'q' */
"\377" /* placeholder */,
/* Colors starting with 'r' */
diff --git a/xlib/xgc.c b/xlib/xgc.c
index 8975373..e097d2e 100644
--- a/xlib/xgc.c
+++ b/xlib/xgc.c
@@ -12,7 +12,7 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#include <tkInt.h>
+#include "tkInt.h"
#if !defined(MAC_OSX_TK)
# include <X11/Xlib.h>
@@ -51,7 +51,7 @@ static TkpClipMask *AllocClipMask(GC gc) {
TkpClipMask *clip_mask = (TkpClipMask*) gc->clip_mask;
if (clip_mask == None) {
- clip_mask = (TkpClipMask*) ckalloc(sizeof(TkpClipMask));
+ clip_mask = ckalloc(sizeof(TkpClipMask));
gc->clip_mask = (Pixmap) clip_mask;
#ifdef MAC_OSX_TK
} else if (clip_mask->type == TKP_CLIP_REGION) {
@@ -84,7 +84,7 @@ static void FreeClipMask(GC gc) {
TkpReleaseRegion(((TkpClipMask*) gc->clip_mask)->value.region);
}
#endif
- ckfree((char*) gc->clip_mask);
+ ckfree(gc->clip_mask);
gc->clip_mask = None;
}
}
@@ -123,8 +123,7 @@ XCreateGC(
#define MAX_DASH_LIST_SIZE 10
- gp = (XGCValues *) ckalloc(sizeof(XGCValues) + MAX_DASH_LIST_SIZE +
- gcCacheSize);
+ gp = ckalloc(sizeof(XGCValues) + MAX_DASH_LIST_SIZE + gcCacheSize);
if (!gp) {
return None;
}
@@ -272,7 +271,7 @@ int XFreeGC(
if (gc != None) {
FreeClipMask(gc);
TkpFreeGCCache(gc);
- ckfree((char *) gc);
+ ckfree(gc);
}
return Success;
}
diff --git a/xlib/xutil.c b/xlib/xutil.c
index 267a624..0514d7a 100644
--- a/xlib/xutil.c
+++ b/xlib/xutil.c
@@ -68,7 +68,8 @@ XGetVisualInfo(
XVisualInfo *vinfo_template,
int *nitems_return)
{
- XVisualInfo *info = (XVisualInfo *) ckalloc(sizeof(XVisualInfo));
+ XVisualInfo *info = ckalloc(sizeof(XVisualInfo));
+
info->visual = DefaultVisual(display, 0);
info->visualid = info->visual->visualid;
info->screen = 0;
@@ -99,7 +100,7 @@ XGetVisualInfo(
|| ((vinfo_mask & VisualBlueMaskMask)
&& (vinfo_template->blue_mask != info->blue_mask))
) {
- ckfree((char *) info);
+ ckfree(info);
return NULL;
}