comparison src/glyphs.c @ 1885:51ce4f55d8c3

[xemacs-hg @ 2004-01-27 13:33:18 by stephent] quiet GCC <87ad49o6vl.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Tue, 27 Jan 2004 13:33:21 +0000
parents 9d77c73d4103
children 04bc9d2f42c7
comparison
equal deleted inserted replaced
1884:3d25fd3d9ac4 1885:51ce4f55d8c3
319 (!CONSP (XCDR (XCDR (mapping))) || 319 (!CONSP (XCDR (XCDR (mapping))) ||
320 !NILP (XCDR (XCDR (XCDR (mapping))))))) 320 !NILP (XCDR (XCDR (XCDR (mapping)))))))
321 invalid_argument ("Invalid mapping form", mapping); 321 invalid_argument ("Invalid mapping form", mapping);
322 else 322 else
323 { 323 {
324 Lisp_Object exp = XCAR (mapping); 324 Lisp_Object regexp = XCAR (mapping);
325 Lisp_Object typevec = XCAR (XCDR (mapping)); 325 Lisp_Object typevec = XCAR (XCDR (mapping));
326 Lisp_Object pos = Qnil; 326 Lisp_Object pos = Qnil;
327 Lisp_Object newvec; 327 Lisp_Object newvec;
328 struct gcpro gcpro1; 328 struct gcpro gcpro1;
329 329
330 CHECK_STRING (exp); 330 CHECK_STRING (regexp);
331 CHECK_VECTOR (typevec); 331 CHECK_VECTOR (typevec);
332 if (!NILP (XCDR (XCDR (mapping)))) 332 if (!NILP (XCDR (XCDR (mapping))))
333 { 333 {
334 pos = XCAR (XCDR (XCDR (mapping))); 334 pos = XCAR (XCDR (XCDR (mapping)));
335 CHECK_INT (pos); 335 CHECK_INT (pos);
339 (pos, Qzero, make_int (XVECTOR_LENGTH (typevec) - 1)); 339 (pos, Qzero, make_int (XVECTOR_LENGTH (typevec) - 1));
340 } 340 }
341 341
342 newvec = Fcopy_sequence (typevec); 342 newvec = Fcopy_sequence (typevec);
343 if (INTP (pos)) 343 if (INTP (pos))
344 XVECTOR_DATA (newvec)[XINT (pos)] = exp; 344 XVECTOR_DATA (newvec)[XINT (pos)] = regexp;
345 GCPRO1 (newvec); 345 GCPRO1 (newvec);
346 image_validate (newvec); 346 image_validate (newvec);
347 UNGCPRO; 347 UNGCPRO;
348 } 348 }
349 } 349 }
375 Lisp_Object tail; 375 Lisp_Object tail;
376 376
377 LIST_LOOP (tail, *get_image_conversion_list (console_type)) 377 LIST_LOOP (tail, *get_image_conversion_list (console_type))
378 { 378 {
379 Lisp_Object mapping = XCAR (tail); 379 Lisp_Object mapping = XCAR (tail);
380 Lisp_Object exp = XCAR (mapping); 380 Lisp_Object regexp = XCAR (mapping);
381 Lisp_Object typevec = XCAR (XCDR (mapping)); 381 Lisp_Object typevec = XCAR (XCDR (mapping));
382 382
383 /* if the result is of a type that can't be instantiated 383 /* if the result is of a type that can't be instantiated
384 (e.g. a string when we're dealing with a pointer glyph), 384 (e.g. a string when we're dealing with a pointer glyph),
385 skip it. */ 385 skip it. */
386 if (!(dest_mask & 386 if (!(dest_mask &
387 IIFORMAT_METH (decode_image_instantiator_format 387 IIFORMAT_METH (decode_image_instantiator_format
388 (INSTANTIATOR_TYPE (typevec), ERROR_ME), 388 (INSTANTIATOR_TYPE (typevec), ERROR_ME),
389 possible_dest_types, ()))) 389 possible_dest_types, ())))
390 continue; 390 continue;
391 if (fast_string_match (exp, 0, data, 0, -1, 0, ERROR_ME, 0) >= 0) 391 if (fast_string_match (regexp, 0, data, 0, -1, 0, ERROR_ME, 0) >= 0)
392 { 392 {
393 if (!NILP (XCDR (XCDR (mapping)))) 393 if (!NILP (XCDR (XCDR (mapping))))
394 { 394 {
395 int pos = XINT (XCAR (XCDR (XCDR (mapping)))); 395 int pos = XINT (XCAR (XCDR (XCDR (mapping))));
396 Lisp_Object newvec = Fcopy_sequence (typevec); 396 Lisp_Object newvec = Fcopy_sequence (typevec);