comparison src/xmu.c @ 203:850242ba4a81 r20-3b28

Import from CVS: tag r20-3b28
author cvs
date Mon, 13 Aug 2007 10:02:21 +0200
parents 3d6bfa290dbd
children c5d627a313b1
comparison
equal deleted inserted replaced
202:61eefc8fc970 203:850242ba4a81
54 #include <X11/Xproto.h> 54 #include <X11/Xproto.h>
55 #include <stdio.h> 55 #include <stdio.h>
56 #include <ctype.h> 56 #include <ctype.h>
57 57
58 58
59 int XmuCursorNameToIndex (const char *name) 59 int XmuCursorNameToIndex (CONST char *name)
60 { 60 {
61 static const struct _CursorName { 61 static CONST struct _CursorName {
62 const char *name; 62 CONST char *name;
63 unsigned int shape; 63 unsigned int shape;
64 } cursor_names[] = { 64 } cursor_names[] = {
65 {"x_cursor", XC_X_cursor}, 65 {"x_cursor", XC_X_cursor},
66 {"arrow", XC_arrow}, 66 {"arrow", XC_arrow},
67 {"based_arrow_down", XC_based_arrow_down}, 67 {"based_arrow_down", XC_based_arrow_down},
138 {"umbrella", XC_umbrella}, 138 {"umbrella", XC_umbrella},
139 {"ur_angle", XC_ur_angle}, 139 {"ur_angle", XC_ur_angle},
140 {"watch", XC_watch}, 140 {"watch", XC_watch},
141 {"xterm", XC_xterm}, 141 {"xterm", XC_xterm},
142 }; 142 };
143 const struct _CursorName *table; 143 CONST struct _CursorName *table;
144 int i; 144 int i;
145 char tmp[40]; 145 char tmp[40];
146 146
147 if (strlen (name) >= sizeof tmp) return -1; 147 if (strlen (name) >= sizeof tmp) return -1;
148 for (i=0; i<strlen(name); i++) 148 for (i=0; i<strlen(name); i++)
369 369
370 RETURN (BitmapSuccess); 370 RETURN (BitmapSuccess);
371 } 371 }
372 372
373 373
374 int XmuReadBitmapDataFromFile (const char *filename, 374 int XmuReadBitmapDataFromFile (CONST char *filename,
375 /* Remaining args are RETURNED */ 375 /* Remaining args are RETURNED */
376 unsigned int *width, 376 unsigned int *width,
377 unsigned int *height, 377 unsigned int *height,
378 unsigned char **datap, 378 unsigned char **datap,
379 int *x_hot, int *y_hot) 379 int *x_hot, int *y_hot)