Changeset 3377
- Timestamp:
- 08/07/04 08:12:35 (4 years ago)
- Files:
-
- branches/2.1/src/ChangeLog.Meadow (modified) (1 diff)
- branches/2.1/src/mw32fns.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.1/src/ChangeLog.Meadow
r3375 r3377 1 2004-08-07 MIYOSHI Masanori <miyoshi@meadowy.org> 2 3 * mw32fns.c (pget_image_magick_t): New type definition. 4 (pget_image_magick): New static variable. 5 (magick_get_image_magick): New function. 6 (Fmw32_get_image_magick): Ditto. 7 (syms_of_mw32fns): Define the above function. 8 1 9 2004-07-25 MIYOSHI Masanori <miyoshi@meadowy.org> 2 10 branches/2.1/src/mw32fns.c
r3364 r3377 6033 6033 typedef void *(*prelinquish_magick_memory_t) (void **memory); 6034 6034 typedef void *(*pacquire_string_t) (const char *); 6035 typedef const char *(*pget_image_magick_t) (const unsigned char *, 6036 const size_t); 6035 6037 6036 6038 static HINSTANCE hmagick = NULL; … … 6068 6070 static prelinquish_magick_memory_t prelinquish_magick_memory; 6069 6071 static pacquire_string_t pacquire_string; 6072 static pget_image_magick_t pget_image_magick; 6070 6073 6071 6074 /* ImageMagick function wrappers. */ … … 6347 6350 return NULL; 6348 6351 return (*pacquire_string) (source); 6352 } 6353 6354 static const char * 6355 magick_get_image_magick (const unsigned char *magick, const size_t length) 6356 { 6357 if (pget_image_magick == NULL) 6358 return NULL; 6359 return (*pget_image_magick) (magick, length); 6349 6360 } 6350 6361 … … 6415 6426 "RelinquishMagickMemory"); 6416 6427 MAGICK_RESOLVE_FUNC (pacquire_string, pacquire_string_t, "AcquireString"); 6428 MAGICK_RESOLVE_FUNC (pget_image_magick, pget_image_magick_t, 6429 "GetImageMagick"); 6417 6430 6418 6431 #undef MAGICK_RESOLVE_FUNC … … 7811 7824 return ret; 7812 7825 } 7826 7827 DEFUN ("mw32-get-image-magick", Fmw32_get_image_magick, 7828 Smw32_get_image_magick, 1, 1, 0, 7829 "Searches for an image format that matches the specified magick string.") 7830 (string) 7831 Lisp_Object string; 7832 { 7833 const char *format = magick_get_image_magick (SDATA (string), 7834 SBYTES (string)); 7835 7836 if (format == NULL) 7837 return Qnil; 7838 else 7839 return *imagemagick_image_type_lisp_symbol (format); 7840 } 7841 7813 7842 7814 7843 /*********************************************************************** … … 9585 9614 9586 9615 defsubr (&Smw32_file_dialog); 9616 9617 defsubr (&Smw32_get_image_magick); 9587 9618 } 9588 9619
