Mercurial > hg > xemacs-beta
comparison src/objects-msw.c @ 647:b39c14581166
[xemacs-hg @ 2001-08-13 04:45:47 by ben]
removal of unsigned, size_t, etc.
author | ben |
---|---|
date | Mon, 13 Aug 2001 04:46:48 +0000 |
parents | 5fd7ba8b56e7 |
children | fdefd0186b75 |
comparison
equal
deleted
inserted
replaced
646:00c54252fe4f | 647:b39c14581166 |
---|---|
804 { | 804 { |
805 /* numeric names look like "#RRGGBB", "#RRRGGGBBB" or "#RRRRGGGGBBBB" | 805 /* numeric names look like "#RRGGBB", "#RRRGGGBBB" or "#RRRRGGGGBBBB" |
806 or "rgb:rrrr/gggg/bbbb" */ | 806 or "rgb:rrrr/gggg/bbbb" */ |
807 unsigned int r, g, b; | 807 unsigned int r, g, b; |
808 | 808 |
809 for (i=1; i<strlen(name); i++) | 809 for (i=1; i< (int) strlen(name); i++) |
810 { | 810 { |
811 if (!isxdigit ((int)name[i])) | 811 if (!isxdigit ((int)name[i])) |
812 return (COLORREF) -1; | 812 return (COLORREF) -1; |
813 } | 813 } |
814 if (strlen(name)==7) | 814 if (strlen(name)==7) |
1167 /* methods */ | 1167 /* methods */ |
1168 /************************************************************************/ | 1168 /************************************************************************/ |
1169 | 1169 |
1170 static int | 1170 static int |
1171 mswindows_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name, | 1171 mswindows_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name, |
1172 Lisp_Object device, Error_Behavior errb) | 1172 Lisp_Object device, Error_Behavior errb) |
1173 { | 1173 { |
1174 const char *extname; | 1174 const char *extname; |
1175 COLORREF color; | 1175 COLORREF color; |
1176 | 1176 |
1177 TO_EXTERNAL_FORMAT (LISP_STRING, name, | 1177 TO_EXTERNAL_FORMAT (LISP_STRING, name, |
1178 C_STRING_ALLOCA, extname, | 1178 C_STRING_ALLOCA, extname, |
1179 Qctext); | 1179 Qctext); |
1180 color = mswindows_string_to_color(extname); | 1180 color = mswindows_string_to_color (extname); |
1181 if (color != -1) | 1181 if (color != (COLORREF) -1) |
1182 { | 1182 { |
1183 c->data = xnew (struct mswindows_color_instance_data); | 1183 c->data = xnew (struct mswindows_color_instance_data); |
1184 COLOR_INSTANCE_MSWINDOWS_COLOR (c) = color; | 1184 COLOR_INSTANCE_MSWINDOWS_COLOR (c) = color; |
1185 return 1; | 1185 return 1; |
1186 } | 1186 } |
1247 const char *extname; | 1247 const char *extname; |
1248 | 1248 |
1249 TO_EXTERNAL_FORMAT (LISP_STRING, color, | 1249 TO_EXTERNAL_FORMAT (LISP_STRING, color, |
1250 C_STRING_ALLOCA, extname, | 1250 C_STRING_ALLOCA, extname, |
1251 Qctext); | 1251 Qctext); |
1252 return (mswindows_string_to_color(extname)!=-1); | 1252 return (mswindows_string_to_color (extname) != (COLORREF) -1); |
1253 } | 1253 } |
1254 | 1254 |
1255 | 1255 |
1256 | 1256 |
1257 static void | 1257 static void |