comparison src/image.c @ 112434:9de5a68b57e1

Promote SSDATA macro from gtkutil.c and xsmfns.c to lisp.h.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 22 Jan 2011 18:56:06 -0800
parents 42e22c4f06b7
children 11f1b4757236
comparison
equal deleted inserted replaced
112433:7b649f6eac4f 112434:9de5a68b57e1
348 /* Look for an existing bitmap with the same name. */ 348 /* Look for an existing bitmap with the same name. */
349 for (id = 0; id < dpyinfo->bitmaps_last; ++id) 349 for (id = 0; id < dpyinfo->bitmaps_last; ++id)
350 { 350 {
351 if (dpyinfo->bitmaps[id].refcount 351 if (dpyinfo->bitmaps[id].refcount
352 && dpyinfo->bitmaps[id].file 352 && dpyinfo->bitmaps[id].file
353 && !strcmp (dpyinfo->bitmaps[id].file, (char *) SDATA (file))) 353 && !strcmp (dpyinfo->bitmaps[id].file, SSDATA (file)))
354 { 354 {
355 ++dpyinfo->bitmaps[id].refcount; 355 ++dpyinfo->bitmaps[id].refcount;
356 return id + 1; 356 return id + 1;
357 } 357 }
358 } 358 }
361 fd = openp (Vx_bitmap_file_path, file, Qnil, &found, Qnil); 361 fd = openp (Vx_bitmap_file_path, file, Qnil, &found, Qnil);
362 if (fd < 0) 362 if (fd < 0)
363 return -1; 363 return -1;
364 emacs_close (fd); 364 emacs_close (fd);
365 365
366 filename = (char *) SDATA (found); 366 filename = SSDATA (found);
367 367
368 result = XReadBitmapFile (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 368 result = XReadBitmapFile (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
369 filename, &width, &height, &bitmap, &xhot, &yhot); 369 filename, &width, &height, &bitmap, &xhot, &yhot);
370 if (result != BitmapSuccess) 370 if (result != BitmapSuccess)
371 return -1; 371 return -1;
8881 8881
8882 void 8882 void
8883 init_image (void) 8883 init_image (void)
8884 { 8884 {
8885 } 8885 }
8886