Mercurial > hg > xemacs-beta
comparison src/glyphs.c @ 578:190b164ddcac
[xemacs-hg @ 2001-05-25 11:26:50 by ben]
device-msw.c, eldap.c, emodules.c, hpplay.c, process-unix.c, sound.h, tooltalk.c, win32.c: Revert Martin's attempted compile-warnings fix. It does fix
the warnings, but not the right way. We are trying to eliminate
the raw use of `char' and `unsigned char' absolutely everywhere.
There is never an occasion to reintroduce these.
buffer.h: Instead, we fix these macros so they don't care about the type of
their lvalues. We already do this for the non-C-string
equivalents of these, and it's correct because it should be OK to
pass in an SBufbyte *, for example. In any case, we do not need
any type-correctness checking here -- errors will be caught for
sure as soon as we remove the -Wno-sign-compare switch.
mule-charset.c: Use invalid_argument, not generic signal_error (Qerror, ).
alloc.c, chartab.c, console-gtk.c, console-msw.c, console-stream.c, console-stream.h, console-tty.c, console-tty.h, console-x.c, console.c, console.h, device-x.c, device.c, elhash.c, eval.c, faces.c, faces.h, fns.c, glyphs.c, glyphs.h, gui.c, gui.h, lisp.h, lread.c, nt.c, objects-gtk.c, objects-gtk.h, objects-msw.c, objects-tty.c, objects-x.c, objects.c, process-unix.c, rangetab.c, search.c, specifier.c, toolbar.c, window.c, window.h:
Rename Error_behavior to Error_Behavior, to be consistent with
general naming practices (Lisp_Object, Char_Binary, etc.).
author | ben |
---|---|
date | Fri, 25 May 2001 11:27:01 +0000 |
parents | 183866b06e0b |
children | 4b7d425dd3c2 |
comparison
equal
deleted
inserted
replaced
577:910449c92002 | 578:190b164ddcac |
---|---|
152 * Image Instantiators * | 152 * Image Instantiators * |
153 ****************************************************************************/ | 153 ****************************************************************************/ |
154 | 154 |
155 struct image_instantiator_methods * | 155 struct image_instantiator_methods * |
156 decode_device_ii_format (Lisp_Object device, Lisp_Object format, | 156 decode_device_ii_format (Lisp_Object device, Lisp_Object format, |
157 Error_behavior errb) | 157 Error_Behavior errb) |
158 { | 158 { |
159 int i; | 159 int i; |
160 | 160 |
161 if (!SYMBOLP (format)) | 161 if (!SYMBOLP (format)) |
162 { | 162 { |
188 | 188 |
189 return 0; | 189 return 0; |
190 } | 190 } |
191 | 191 |
192 struct image_instantiator_methods * | 192 struct image_instantiator_methods * |
193 decode_image_instantiator_format (Lisp_Object format, Error_behavior errb) | 193 decode_image_instantiator_format (Lisp_Object format, Error_Behavior errb) |
194 { | 194 { |
195 return decode_device_ii_format (Qnil, format, errb); | 195 return decode_device_ii_format (Qnil, format, errb); |
196 } | 196 } |
197 | 197 |
198 static int | 198 static int |
1289 | 1289 |
1290 return val; | 1290 return val; |
1291 } | 1291 } |
1292 | 1292 |
1293 static enum image_instance_type | 1293 static enum image_instance_type |
1294 decode_image_instance_type (Lisp_Object type, Error_behavior errb) | 1294 decode_image_instance_type (Lisp_Object type, Error_Behavior errb) |
1295 { | 1295 { |
1296 if (ERRB_EQ (errb, ERROR_ME)) | 1296 if (ERRB_EQ (errb, ERROR_ME)) |
1297 CHECK_SYMBOL (type); | 1297 CHECK_SYMBOL (type); |
1298 | 1298 |
1299 if (EQ (type, Qnothing)) return IMAGE_NOTHING; | 1299 if (EQ (type, Qnothing)) return IMAGE_NOTHING; |
1411 ()) | 1411 ()) |
1412 { | 1412 { |
1413 return Fcopy_sequence (Vimage_instance_type_list); | 1413 return Fcopy_sequence (Vimage_instance_type_list); |
1414 } | 1414 } |
1415 | 1415 |
1416 Error_behavior | 1416 Error_Behavior |
1417 decode_error_behavior_flag (Lisp_Object noerror) | 1417 decode_error_behavior_flag (Lisp_Object noerror) |
1418 { | 1418 { |
1419 if (NILP (noerror)) return ERROR_ME; | 1419 if (NILP (noerror)) return ERROR_ME; |
1420 else if (EQ (noerror, Qt)) return ERROR_ME_NOT; | 1420 else if (EQ (noerror, Qt)) return ERROR_ME_NOT; |
1421 else return ERROR_ME_WARN; | 1421 else return ERROR_ME_WARN; |
1422 } | 1422 } |
1423 | 1423 |
1424 Lisp_Object | 1424 Lisp_Object |
1425 encode_error_behavior_flag (Error_behavior errb) | 1425 encode_error_behavior_flag (Error_Behavior errb) |
1426 { | 1426 { |
1427 if (ERRB_EQ (errb, ERROR_ME)) | 1427 if (ERRB_EQ (errb, ERROR_ME)) |
1428 return Qnil; | 1428 return Qnil; |
1429 else if (ERRB_EQ (errb, ERROR_ME_NOT)) | 1429 else if (ERRB_EQ (errb, ERROR_ME_NOT)) |
1430 return Qt; | 1430 return Qt; |
1573 generated and this function returns nil. If anything else, a warning | 1573 generated and this function returns nil. If anything else, a warning |
1574 message is generated and this function returns nil. | 1574 message is generated and this function returns nil. |
1575 */ | 1575 */ |
1576 (data, domain, dest_types, noerror)) | 1576 (data, domain, dest_types, noerror)) |
1577 { | 1577 { |
1578 Error_behavior errb = decode_error_behavior_flag (noerror); | 1578 Error_Behavior errb = decode_error_behavior_flag (noerror); |
1579 | 1579 |
1580 return call_with_suspended_errors ((lisp_fn_t) make_image_instance_1, | 1580 return call_with_suspended_errors ((lisp_fn_t) make_image_instance_1, |
1581 Qnil, Qimage, errb, | 1581 Qnil, Qimage, errb, |
1582 3, data, domain, dest_types); | 1582 3, data, domain, dest_types); |
1583 } | 1583 } |
3760 | 3760 |
3761 return obj; | 3761 return obj; |
3762 } | 3762 } |
3763 | 3763 |
3764 static enum glyph_type | 3764 static enum glyph_type |
3765 decode_glyph_type (Lisp_Object type, Error_behavior errb) | 3765 decode_glyph_type (Lisp_Object type, Error_Behavior errb) |
3766 { | 3766 { |
3767 if (NILP (type)) | 3767 if (NILP (type)) |
3768 return GLYPH_BUFFER; | 3768 return GLYPH_BUFFER; |
3769 | 3769 |
3770 if (ERRB_EQ (errb, ERROR_ME)) | 3770 if (ERRB_EQ (errb, ERROR_ME)) |
3861 } | 3861 } |
3862 } | 3862 } |
3863 | 3863 |
3864 Lisp_Object | 3864 Lisp_Object |
3865 glyph_image_instance (Lisp_Object glyph, Lisp_Object domain, | 3865 glyph_image_instance (Lisp_Object glyph, Lisp_Object domain, |
3866 Error_behavior errb, int no_quit) | 3866 Error_Behavior errb, int no_quit) |
3867 { | 3867 { |
3868 Lisp_Object specifier = GLYPH_IMAGE (XGLYPH (glyph)); | 3868 Lisp_Object specifier = GLYPH_IMAGE (XGLYPH (glyph)); |
3869 | 3869 |
3870 /* This can never return Qunbound. All glyphs have 'nothing as | 3870 /* This can never return Qunbound. All glyphs have 'nothing as |
3871 a fallback. */ | 3871 a fallback. */ |