Mercurial > hg > xemacs-beta
comparison src/xmu.c @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | 74fd4e045ea6 |
children |
comparison
equal
deleted
inserted
replaced
411:12e008d41344 | 412:697ef44129c6 |
---|---|
51 #include <X11/Xproto.h> | 51 #include <X11/Xproto.h> |
52 #include <stdio.h> | 52 #include <stdio.h> |
53 #include <ctype.h> | 53 #include <ctype.h> |
54 | 54 |
55 | 55 |
56 int XmuCursorNameToIndex (const char *name) | 56 int XmuCursorNameToIndex (CONST char *name) |
57 { | 57 { |
58 static const struct _CursorName { | 58 static CONST struct _CursorName { |
59 const char *name; | 59 CONST char *name; |
60 unsigned int shape; | 60 unsigned int shape; |
61 } cursor_names[] = { | 61 } cursor_names[] = { |
62 {"x_cursor", XC_X_cursor}, | 62 {"x_cursor", XC_X_cursor}, |
63 {"arrow", XC_arrow}, | 63 {"arrow", XC_arrow}, |
64 {"based_arrow_down", XC_based_arrow_down}, | 64 {"based_arrow_down", XC_based_arrow_down}, |
135 {"umbrella", XC_umbrella}, | 135 {"umbrella", XC_umbrella}, |
136 {"ur_angle", XC_ur_angle}, | 136 {"ur_angle", XC_ur_angle}, |
137 {"watch", XC_watch}, | 137 {"watch", XC_watch}, |
138 {"xterm", XC_xterm}, | 138 {"xterm", XC_xterm}, |
139 }; | 139 }; |
140 const struct _CursorName *table; | 140 CONST struct _CursorName *table; |
141 int i; | 141 int i; |
142 char tmp[40]; | 142 char tmp[40]; |
143 | 143 |
144 if (strlen (name) >= sizeof tmp) return -1; | 144 if (strlen (name) >= sizeof tmp) return -1; |
145 for (i=0; i<strlen(name); i++) | 145 for (i=0; i<strlen(name); i++) |
366 | 366 |
367 RETURN (BitmapSuccess); | 367 RETURN (BitmapSuccess); |
368 } | 368 } |
369 | 369 |
370 | 370 |
371 int XmuReadBitmapDataFromFile (const char *filename, | 371 int XmuReadBitmapDataFromFile (CONST char *filename, |
372 /* Remaining args are RETURNED */ | 372 /* Remaining args are RETURNED */ |
373 unsigned int *width, | 373 unsigned int *width, |
374 unsigned int *height, | 374 unsigned int *height, |
375 unsigned char **datap, | 375 unsigned char **datap, |
376 int *x_hot, int *y_hot) | 376 int *x_hot, int *y_hot) |
528 } | 528 } |
529 /* got a "real" X error */ | 529 /* got a "real" X error */ |
530 return XmuPrintDefaultErrorMessage (dpy, errorp, stderr); | 530 return XmuPrintDefaultErrorMessage (dpy, errorp, stderr); |
531 } | 531 } |
532 | 532 |
533 void XmuCopyISOLatin1Lowered(char *dst, const char *src) | 533 void XmuCopyISOLatin1Lowered(char *dst, CONST char *src) |
534 { | 534 { |
535 unsigned char *dest = (unsigned char *) dst; | 535 unsigned char *dest = (unsigned char *) dst; |
536 unsigned char *source = (unsigned char *) src; | 536 unsigned char *source = (unsigned char *) src; |
537 | 537 |
538 for ( ; *source; source++, dest++) | 538 for ( ; *source; source++, dest++) |