Mercurial > emacs
comparison src/w32fns.c @ 33443:2c60aa5cd386
(x_create_bitmap_from_file, x_find_image_file): Use new openp return protocol.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 13 Nov 2000 12:24:15 +0000 |
parents | 01a10bc04233 |
children | f32333d8172b |
comparison
equal
deleted
inserted
replaced
33442:ec5c714ae981 | 33443:2c60aa5cd386 |
---|---|
581 } | 581 } |
582 | 582 |
583 /* Search bitmap-file-path for the file, if appropriate. */ | 583 /* Search bitmap-file-path for the file, if appropriate. */ |
584 fd = openp (Vx_bitmap_file_path, file, "", &found, 0); | 584 fd = openp (Vx_bitmap_file_path, file, "", &found, 0); |
585 if (fd < 0) | 585 if (fd < 0) |
586 return -1; | |
587 /* LoadLibraryEx won't handle special files handled by Emacs handler. */ | |
588 if (fd == 0) | |
589 return -1; | 586 return -1; |
590 emacs_close (fd); | 587 emacs_close (fd); |
591 | 588 |
592 filename = (char *) XSTRING (found)->data; | 589 filename = (char *) XSTRING (found)->data; |
593 | 590 |
8375 GCPRO2 (file_found, search_path); | 8372 GCPRO2 (file_found, search_path); |
8376 | 8373 |
8377 /* Try to find FILE in data-directory, then x-bitmap-file-path. */ | 8374 /* Try to find FILE in data-directory, then x-bitmap-file-path. */ |
8378 fd = openp (search_path, file, "", &file_found, 0); | 8375 fd = openp (search_path, file, "", &file_found, 0); |
8379 | 8376 |
8380 if (fd < 0) | 8377 if (fd == -1) |
8381 file_found = Qnil; | 8378 file_found = Qnil; |
8382 else | 8379 else |
8383 close (fd); | 8380 close (fd); |
8384 | 8381 |
8385 UNGCPRO; | 8382 UNGCPRO; |