ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/misc.C
(Generate patch)

Comparing rxvt-unicode/src/misc.C (file contents):
Revision 1.3 by pcg, Sat Jan 31 00:20:21 2004 UTC vs.
Revision 1.10 by pcg, Sat Mar 6 00:05:01 2004 UTC

1/*--------------------------------*-C-*---------------------------------* 1/*--------------------------------*-C-*---------------------------------*
2 * File: misc.c 2 * File: misc.c
3 *----------------------------------------------------------------------* 3 *----------------------------------------------------------------------*
4 * $Id: misc.C,v 1.3 2004/01/31 00:20:21 pcg Exp $
5 * 4 *
6 * All portions of code are copyright by their respective author/s. 5 * All portions of code are copyright by their respective author/s.
7 * Copyright (c) 1996 mj olesen <olesen@me.QueensU.CA> Queen's Univ at Kingston 6 * Copyright (c) 1996 mj olesen <olesen@me.QueensU.CA> Queen's Univ at Kingston
8 * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de> 7 * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de>
9 * Copyright (c) 1998-2000 Geoff Wing <gcw@pobox.com> 8 * Copyright (c) 1998-2000 Geoff Wing <gcw@pobox.com>
9 * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com>
10 * 10 *
11 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by 12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or 13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version. 14 * (at your option) any later version.
27#include "rxvt.h" /* NECESSARY */ 27#include "rxvt.h" /* NECESSARY */
28#include "misc.intpro" /* PROTOS for internal routines */ 28#include "misc.intpro" /* PROTOS for internal routines */
29 29
30/* EXTPROTO */ 30/* EXTPROTO */
31char * 31char *
32rxvt_wcstombs (const wchar_t *str, int len)
33{
34 mbstate mbs;
35 char *r = (char *)rxvt_malloc (len * MB_CUR_MAX + 1);
36
37 char *dst = r;
38 while (len--)
39 {
40 int l = wcrtomb (dst, *str++, mbs);
41 if (l < 0)
42 *dst++ = '?';
43 else
44 dst += l;
45 }
46
47 *dst++ = 0;
48
49 return r;
50}
51
52/* EXTPROTO */
53char *
32rxvt_strdup (const char *str) 54rxvt_strdup (const char *str)
33{ 55{
34 return str ? strdup (str) : 0; 56 return str ? strdup (str) : 0;
35} 57}
36 58
37/* EXTPROTO */ 59/* EXTPROTO */
38char * 60char *
39rxvt_r_basename(const char *str) 61rxvt_r_basename (const char *str)
40{ 62{
41 char *base = STRRCHR(str, '/'); 63 char *base = STRRCHR (str, '/');
42 64
43 return (char *)(base ? base + 1 : str); 65 return (char *) (base ? base + 1 : str);
44} 66}
45 67
46/* 68/*
47 * Print an error message 69 * Print an error message
48 */ 70 */
49/* EXTPROTO */ 71/* EXTPROTO */
50void 72void
51rxvt_print_error(const char *fmt,...) 73rxvt_print_error (const char *fmt,...)
52{ 74{
53 va_list arg_ptr; 75 va_list arg_ptr;
54 76
55 va_start(arg_ptr, fmt); 77 va_start (arg_ptr, fmt);
56 fprintf(stderr, APL_NAME ": "); 78 fprintf (stderr, RESNAME ": ");
57 vfprintf(stderr, fmt, arg_ptr); 79 vfprintf (stderr, fmt, arg_ptr);
58 fprintf(stderr, "\n"); 80 fprintf (stderr, "\n");
59 va_end(arg_ptr); 81 va_end (arg_ptr);
60} 82}
61 83
62/* 84/*
63 * check that the first characters of S1 match S2 85 * check that the first characters of S1 match S2
64 * 86 *
67 * Match 89 * Match
68 * return: STRLEN (S2) 90 * return: STRLEN (S2)
69 */ 91 */
70/* EXTPROTO */ 92/* EXTPROTO */
71int 93int
72rxvt_Str_match(const char *s1, const char *s2) 94rxvt_Str_match (const char *s1, const char *s2)
73{ 95{
74 int n = STRLEN(s2); 96 int n = STRLEN (s2);
75 97
76 return ((STRNCMP(s1, s2, n) == 0) ? n : 0); 98 return ((STRNCMP (s1, s2, n) == 0) ? n : 0);
77} 99}
78 100
79/* EXTPROTO */ 101/* EXTPROTO */
80const char * 102const char *
81rxvt_Str_skip_space(const char *str) 103rxvt_Str_skip_space (const char *str)
82{ 104{
83 if (str) 105 if (str)
84 while (*str && isspace(*str)) 106 while (*str && isspace (*str))
85 str++; 107 str++;
108
86 return str; 109 return str;
87} 110}
88 111
89/* 112/*
90 * remove leading/trailing space and strip-off leading/trailing quotes. 113 * remove leading/trailing space and strip-off leading/trailing quotes.
91 * in place. 114 * in place.
92 */ 115 */
93/* EXTPROTO */ 116/* EXTPROTO */
94char * 117char *
95rxvt_Str_trim(char *str) 118rxvt_Str_trim (char *str)
96{ 119{
97 char *r, *s; 120 char *r, *s;
98 int n; 121 int n;
99 122
100 if (!str || !*str) /* shortcut */ 123 if (!str || !*str) /* shortcut */
101 return str;
102
103/* skip leading spaces */
104 for (s = str; *s && isspace(*s); s++) ;
105/* goto end of string */
106 for (n = 0, r = s; *r++; n++) ;
107 r -= 2;
108/* dump return */
109 if (n > 0 && *r == '\n')
110 n--, r--;
111/* backtrack along trailing spaces */
112 for (; n > 0 && isspace(*r); r--, n--) ;
113/* skip matching leading/trailing quotes */
114 if (*s == '"' && *r == '"' && n > 1) {
115 s++;
116 n -= 2;
117 }
118/* copy back over: forwards copy */
119 for (r = str; n; n--)
120 *r++ = *s++;
121 *r = '\0';
122
123 return str; 124 return str;
125
126 /* skip leading spaces */
127 for (s = str; *s && isspace (*s); s++) ;
128 /* goto end of string */
129 for (n = 0, r = s; *r++; n++) ;
130 r -= 2;
131 /* dump return */
132 if (n > 0 && *r == '\n')
133 n--, r--;
134 /* backtrack along trailing spaces */
135 for (; n > 0 && isspace (*r); r--, n--) ;
136 /* skip matching leading/trailing quotes */
137 if (*s == '"' && *r == '"' && n > 1)
138 {
139 s++;
140 n -= 2;
141 }
142
143 /* copy back over: forwards copy */
144 for (r = str; n; n--)
145 *r++ = *s++;
146 *r = '\0';
147
148 return str;
124} 149}
125 150
126/* 151/*
127 * in-place interpretation of string: 152 * in-place interpretation of string:
128 * 153 *
137 * 162 *
138 * returns the converted string length 163 * returns the converted string length
139 */ 164 */
140/* EXTPROTO */ 165/* EXTPROTO */
141int 166int
142rxvt_Str_escaped(char *str) 167rxvt_Str_escaped (char *str)
143{ 168{
144 char ch, *s, *d; 169 char ch, *s, *d;
145 int i, num, append = 0; 170 int i, num, append = 0;
146 171
147 if (!str || !*str) 172 if (!str || !*str)
148 return 0; 173 return 0;
149 174
150 d = s = str; 175 d = s = str;
151 176
152 if (*s == 'M' && s[1] == '-') { 177 if (*s == 'M' && s[1] == '-')
178 {
153 /* Emacs convenience, replace leading `M-..' with `\E..' */ 179 /* Emacs convenience, replace leading `M-..' with `\E..' */
154 *d++ = C0_ESC; 180 *d++ = C0_ESC;
155 s += 2; 181 s += 2;
156 if (toupper(*s) == 'X') 182 if (toupper (*s) == 'X')
157 /* append carriage-return for `M-xcommand' */ 183 /* append carriage-return for `M-xcommand' */
158 for (*d++ = 'x', append = '\r', s++; isspace(*s); s++) ; 184 for (*d++ = 'x', append = '\r', s++; isspace (*s); s++) ;
159 } 185 }
160 for (; (ch = *s++);) { 186 for (; (ch = *s++);)
187 {
161 if (ch == '\\') { 188 if (ch == '\\')
189 {
162 ch = *s++; 190 ch = *s++;
163 if (ch >= '0' && ch <= '7') { /* octal */ 191 if (ch >= '0' && ch <= '7')
164 num = ch - '0'; 192 { /* octal */
193 num = ch - '0';
165 for (i = 0; i < 2; i++, s++) { 194 for (i = 0; i < 2; i++, s++)
166 ch = *s; 195 {
196 ch = *s;
167 if (ch < '0' || ch > '7') 197 if (ch < '0' || ch > '7')
168 break; 198 break;
169 num = num * 8 + ch - '0'; 199 num = num * 8 + ch - '0';
170 } 200 }
171 ch = (char)num; 201 ch = (char)num;
172 } else if (ch == 'a') 202 }
203 else if (ch == 'a')
173 ch = C0_BEL; /* bell */ 204 ch = C0_BEL; /* bell */
174 else if (ch == 'b') 205 else if (ch == 'b')
175 ch = C0_BS; /* backspace */ 206 ch = C0_BS; /* backspace */
176 else if (ch == 'E' || ch == 'e') 207 else if (ch == 'E' || ch == 'e')
177 ch = C0_ESC; /* escape */ 208 ch = C0_ESC; /* escape */
209 else if (ch == 'n')
210 ch = '\n'; /* newline */
211 else if (ch == 'r')
212 ch = '\r'; /* carriage-return */
213 else if (ch == 't')
214 ch = C0_HT; /* tab */
215 }
178 else if (ch == 'n') 216 else if (ch == '^')
179 ch = '\n'; /* newline */ 217 {
180 else if (ch == 'r')
181 ch = '\r'; /* carriage-return */
182 else if (ch == 't')
183 ch = C0_HT; /* tab */
184 } else if (ch == '^') {
185 ch = *s++; 218 ch = *s++;
186 ch = toupper(ch); 219 ch = toupper (ch);
187 ch = (ch == '?' ? 127 : (ch - '@')); 220 ch = (ch == '?' ? 127 : (ch - '@'));
188 } 221 }
189 *d++ = ch; 222 *d++ = ch;
190 } 223 }
191 224
192/* ESC] is an XTerm escape sequence, must be terminated */ 225 /* ESC] is an XTerm escape sequence, must be terminated */
193 if (*str == '\0' && str[1] == C0_ESC && str[2] == ']') 226 if (*str == '\0' && str[1] == C0_ESC && str[2] == ']')
194 append = CHAR_ST; 227 append = CHAR_ST;
195 228
196/* add trailing character as required */ 229 /* add trailing character as required */
197 if (append && d[-1] != append) 230 if (append && d[-1] != append)
198 *d++ = append; 231 *d++ = append;
199 *d = '\0'; 232 *d = '\0';
200 233
201 return (d - str); 234 return (d - str);
202} 235}
203 236
204/* 237/*
205 * Split a comma-separated string into an array, stripping leading and 238 * Split a comma-separated string into an array, stripping leading and
206 * trailing spaces (and paired quotes) from each entry. Empty strings 239 * trailing spaces (and paired quotes) from each entry. Empty strings
207 * are properly returned 240 * are properly returned
208 * Caller should free each entry and array when done 241 * Caller should free each entry and array when done
209 */ 242 */
210/* EXTPROTO */ 243/* EXTPROTO */
211char ** 244char **
212rxvt_splitcommastring(const char *cs) 245rxvt_splitcommastring (const char *cs)
213{ 246{
214 int l, n, p; 247 int l, n, p;
215 const char *s, *t; 248 const char *s, *t;
216 char **ret; 249 char **ret;
217 250
218 if ((s = cs) == NULL) 251 if ((s = cs) == NULL)
219 s = ""; 252 s = "";
220 253
221 for (n = 1, t = s; *t; t++) 254 for (n = 1, t = s; *t; t++)
222 if (*t == ',') 255 if (*t == ',')
223 n++; 256 n++;
224 ret = (char **)malloc((n + 1) * sizeof(char *)); 257 ret = (char **)malloc ((n + 1) * sizeof (char *));
225 ret[n] = NULL; 258 ret[n] = NULL;
226 259
227 for (l = 0, t = s; l < n; l++) { 260 for (l = 0, t = s; l < n; l++)
261 {
228 for ( ; *t && *t != ','; t++) ; 262 for ( ; *t && *t != ','; t++) ;
229 p = t - s; 263 p = t - s;
230 ret[l] = (char *)malloc(p + 1); 264 ret[l] = (char *)malloc (p + 1);
231 strncpy(ret[l], s, p); 265 strncpy (ret[l], s, p);
232 ret[l][p] = '\0'; 266 ret[l][p] = '\0';
233 rxvt_Str_trim(ret[l]); 267 rxvt_Str_trim (ret[l]);
234 s = ++t; 268 s = ++t;
235 } 269 }
236 return ret; 270 return ret;
237} 271}
238 272
239/*----------------------------------------------------------------------* 273/*----------------------------------------------------------------------*
240 * file searching 274 * file searching
241 */ 275 */
249 * 283 *
250 * FILE is either semi-colon or zero terminated 284 * FILE is either semi-colon or zero terminated
251 */ 285 */
252/* INTPROTO */ 286/* INTPROTO */
253char * 287char *
254rxvt_File_search_path(const char *pathlist, const char *file, const char *ext) 288rxvt_File_search_path (const char *pathlist, const char *file, const char *ext)
255{ 289{
256 int maxpath, len; 290 int maxpath, len;
257 const char *p, *path; 291 const char *p, *path;
258 char name[256]; 292 char name[256];
259 293
260 if (!access(file, R_OK)) /* found (plain name) in current directory */ 294 if (!access (file, R_OK)) /* found (plain name) in current directory */
261 return STRDUP(file); 295 return STRDUP (file);
262 296
263/* semi-colon delimited */ 297 /* semi-colon delimited */
264 if ((p = STRCHR(file, ';'))) 298 if ((p = STRCHR (file, ';')))
265 len = (p - file); 299 len = (p - file);
266 else 300 else
267 len = STRLEN(file); 301 len = STRLEN (file);
268 302
269#ifdef DEBUG_SEARCH_PATH 303#ifdef DEBUG_SEARCH_PATH
270 getcwd(name, sizeof(name)); 304 getcwd (name, sizeof (name));
271 fprintf(stderr, "pwd: \"%s\"\n", name); 305 fprintf (stderr, "pwd: \"%s\"\n", name);
272 fprintf(stderr, "find: \"%.*s\"\n", len, file); 306 fprintf (stderr, "find: \"%.*s\"\n", len, file);
273#endif 307#endif
274 308
275/* leave room for an extra '/' and trailing '\0' */ 309 /* leave room for an extra '/' and trailing '\0' */
276 maxpath = sizeof(name) - (len + (ext ? STRLEN(ext) : 0) + 2); 310 maxpath = sizeof (name) - (len + (ext ? STRLEN (ext) : 0) + 2);
277 if (maxpath <= 0) 311 if (maxpath <= 0)
278 return NULL;
279
280/* check if we can find it now */
281 STRNCPY(name, file, len);
282 name[len] = '\0';
283
284 if (!access(name, R_OK))
285 return STRDUP(name);
286 if (ext) {
287 STRCAT(name, ext);
288 if (!access(name, R_OK))
289 return STRDUP(name);
290 }
291 for (path = pathlist; path != NULL && *path != '\0'; path = p) {
292 int n;
293
294 /* colon delimited */
295 if ((p = STRCHR(path, ':')) == NULL)
296 p = STRCHR(path, '\0');
297
298 n = (p - path);
299 if (*p != '\0')
300 p++;
301
302 if (n > 0 && n <= maxpath) {
303 STRNCPY(name, path, n);
304 if (name[n - 1] != '/')
305 name[n++] = '/';
306 name[n] = '\0';
307 STRNCAT(name, file, len);
308
309 if (!access(name, R_OK))
310 return STRDUP(name);
311 if (ext) {
312 STRCAT(name, ext);
313 if (!access(name, R_OK))
314 return STRDUP(name);
315 }
316 }
317 }
318 return NULL; 312 return NULL;
313
314 /* check if we can find it now */
315 STRNCPY (name, file, len);
316 name[len] = '\0';
317
318 if (!access (name, R_OK))
319 return STRDUP (name);
320 if (ext)
321 {
322 STRCAT (name, ext);
323 if (!access (name, R_OK))
324 return STRDUP (name);
325 }
326 for (path = pathlist; path != NULL && *path != '\0'; path = p)
327 {
328 int n;
329
330 /* colon delimited */
331 if ((p = STRCHR (path, ':')) == NULL)
332 p = STRCHR (path, '\0');
333
334 n = (p - path);
335 if (*p != '\0')
336 p++;
337
338 if (n > 0 && n <= maxpath)
339 {
340 STRNCPY (name, path, n);
341 if (name[n - 1] != '/')
342 name[n++] = '/';
343 name[n] = '\0';
344 STRNCAT (name, file, len);
345
346 if (!access (name, R_OK))
347 return STRDUP (name);
348 if (ext)
349 {
350 STRCAT (name, ext);
351 if (!access (name, R_OK))
352 return STRDUP (name);
353 }
354 }
355 }
356 return NULL;
319} 357}
320 358
321/* EXTPROTO */ 359/* EXTPROTO */
322char * 360char *
323rxvt_File_find(const char *file, const char *ext, const char *path) 361rxvt_File_find (const char *file, const char *ext, const char *path)
324{ 362{
325 char *f; 363 char *f;
326 364
327 if (file == NULL || *file == '\0') 365 if (file == NULL || *file == '\0')
328 return NULL; 366 return NULL;
329 367
330/* search environment variables here too */ 368 /* search environment variables here too */
331 if ((f = rxvt_File_search_path(path, file, ext)) == NULL) 369 if ((f = rxvt_File_search_path (path, file, ext)) == NULL)
332#ifdef PATH_ENV 370#ifdef PATH_ENV
333 if ((f = rxvt_File_search_path(getenv(PATH_ENV), file, ext)) == NULL) 371 if ((f = rxvt_File_search_path (getenv (PATH_ENV), file, ext)) == NULL)
334#endif 372#endif
335 f = rxvt_File_search_path(getenv("PATH"), file, ext); 373 f = rxvt_File_search_path (getenv ("PATH"), file, ext);
336 374
337#ifdef DEBUG_SEARCH_PATH 375#ifdef DEBUG_SEARCH_PATH
338 if (f) 376 if (f)
339 fprintf(stderr, "found: \"%s\"\n", f); 377 fprintf (stderr, "found: \"%s\"\n", f);
340#endif 378#endif
341 379
342 return f; 380 return f;
343} 381}
344#endif /* defined (XPM_BACKGROUND) || (MENUBAR_MAX) */ 382#endif /* defined (XPM_BACKGROUND) || (MENUBAR_MAX) */
345 383
346/*----------------------------------------------------------------------* 384/*----------------------------------------------------------------------*
347 * miscellaneous drawing routines 385 * miscellaneous drawing routines
351 * Draw top/left and bottom/right border shadows around windows 389 * Draw top/left and bottom/right border shadows around windows
352 */ 390 */
353#if defined(RXVT_SCROLLBAR) || defined(MENUBAR) 391#if defined(RXVT_SCROLLBAR) || defined(MENUBAR)
354/* EXTPROTO */ 392/* EXTPROTO */
355void 393void
356rxvt_Draw_Shadow(Display *Xdisplay, Window win, GC topShadow, GC botShadow, int x, int y, int w, int h) 394rxvt_Draw_Shadow (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int h)
357{ 395{
358 int shadow; 396 int shadow;
359 397
360 shadow = (w == 0 || h == 0) ? 1 : SHADOW; 398 shadow = (w == 0 || h == 0) ? 1 : SHADOW;
361 w += x - 1; 399 w += x - 1;
362 h += y - 1; 400 h += y - 1;
363 for (; shadow-- > 0; x++, y++, w--, h--) { 401 for (; shadow-- > 0; x++, y++, w--, h--)
402 {
364 XDrawLine(Xdisplay, win, topShadow, x, y, w, y); 403 XDrawLine (display, win, topShadow, x, y, w, y);
365 XDrawLine(Xdisplay, win, topShadow, x, y, x, h); 404 XDrawLine (display, win, topShadow, x, y, x, h);
366 XDrawLine(Xdisplay, win, botShadow, w, h, w, y + 1); 405 XDrawLine (display, win, botShadow, w, h, w, y + 1);
367 XDrawLine(Xdisplay, win, botShadow, w, h, x + 1, h); 406 XDrawLine (display, win, botShadow, w, h, x + 1, h);
368 } 407 }
369} 408}
370#endif 409#endif
371 410
372/* button shapes */ 411/* button shapes */
373#ifdef MENUBAR 412#ifdef MENUBAR
374/* EXTPROTO */ 413/* EXTPROTO */
375void 414void
376rxvt_Draw_Triangle(Display *Xdisplay, Window win, GC topShadow, GC botShadow, int x, int y, int w, int type) 415rxvt_Draw_Triangle (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int type)
377{ 416{
378 switch (type) { 417 switch (type)
418 {
379 case 'r': /* right triangle */ 419 case 'r': /* right triangle */
380 XDrawLine(Xdisplay, win, topShadow, x, y, x, y + w); 420 XDrawLine (display, win, topShadow, x, y, x, y + w);
381 XDrawLine(Xdisplay, win, topShadow, x, y, x + w, y + w / 2); 421 XDrawLine (display, win, topShadow, x, y, x + w, y + w / 2);
382 XDrawLine(Xdisplay, win, botShadow, x, y + w, x + w, y + w / 2); 422 XDrawLine (display, win, botShadow, x, y + w, x + w, y + w / 2);
383 break; 423 break;
384 424
385 case 'l': /* left triangle */ 425 case 'l': /* left triangle */
386 XDrawLine(Xdisplay, win, botShadow, x + w, y + w, x + w, y); 426 XDrawLine (display, win, botShadow, x + w, y + w, x + w, y);
387 XDrawLine(Xdisplay, win, botShadow, x + w, y + w, x, y + w / 2); 427 XDrawLine (display, win, botShadow, x + w, y + w, x, y + w / 2);
388 XDrawLine(Xdisplay, win, topShadow, x, y + w / 2, x + w, y); 428 XDrawLine (display, win, topShadow, x, y + w / 2, x + w, y);
389 break; 429 break;
390 430
391 case 'd': /* down triangle */ 431 case 'd': /* down triangle */
392 XDrawLine(Xdisplay, win, topShadow, x, y, x + w / 2, y + w); 432 XDrawLine (display, win, topShadow, x, y, x + w / 2, y + w);
393 XDrawLine(Xdisplay, win, topShadow, x, y, x + w, y); 433 XDrawLine (display, win, topShadow, x, y, x + w, y);
394 XDrawLine(Xdisplay, win, botShadow, x + w, y, x + w / 2, y + w); 434 XDrawLine (display, win, botShadow, x + w, y, x + w / 2, y + w);
395 break; 435 break;
396 436
397 case 'u': /* up triangle */ 437 case 'u': /* up triangle */
398 XDrawLine(Xdisplay, win, botShadow, x + w, y + w, x + w / 2, y); 438 XDrawLine (display, win, botShadow, x + w, y + w, x + w / 2, y);
399 XDrawLine(Xdisplay, win, botShadow, x + w, y + w, x, y + w); 439 XDrawLine (display, win, botShadow, x + w, y + w, x, y + w);
400 XDrawLine(Xdisplay, win, topShadow, x, y + w, x + w / 2, y); 440 XDrawLine (display, win, topShadow, x, y + w, x + w / 2, y);
401 break; 441 break;
402#if 0 442#if 0
403 case 's': /* square */ 443 case 's': /* square */
404 XDrawLine(Xdisplay, win, topShadow, x + w, y, x, y); 444 XDrawLine (display, win, topShadow, x + w, y, x, y);
405 XDrawLine(Xdisplay, win, topShadow, x, y, x, y + w); 445 XDrawLine (display, win, topShadow, x, y, x, y + w);
406 XDrawLine(Xdisplay, win, botShadow, x, y + w, x + w, y + w); 446 XDrawLine (display, win, botShadow, x, y + w, x + w, y + w);
407 XDrawLine(Xdisplay, win, botShadow, x + w, y + w, x + w, y); 447 XDrawLine (display, win, botShadow, x + w, y + w, x + w, y);
408 break; 448 break;
409#endif 449#endif
450
410 } 451 }
411} 452}
412#endif 453#endif
413/*----------------------- end-of-file (C source) -----------------------*/ 454/*----------------------- end-of-file (C source) -----------------------*/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines