From 83e6dbcf192a8ad63b33580f86c68155ed30efc1 Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Mon, 4 Mar 2002 07:21:30 +0000 Subject: [PATCH] Let getimagesize() and read_exif_data() share the same constants to promote a little bit of code reuse here on two very similar problems. --- ext/exif/exif.c | 16 ---------------- ext/standard/php_image.h | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 4307116b9b..745a458d53 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -78,22 +78,6 @@ typedef unsigned char uchar; /* EXIF standard defines Copyright as " [ '\0' ] ['\0']" */ #define EXIF_MAX_COPYRIGHT 2 -/* {{{ enum image_filetype - This enum is used to have ext/standard/image.c and ext/exif/exif.c use - the same constants for file types. -*/ -typedef enum -{ IMAGE_FILETYPE_UNKNOWN=0, - IMAGE_FILETYPE_GIF=1, - IMAGE_FILETYPE_JPEG, - IMAGE_FILETYPE_PNG, - IMAGE_FILETYPE_SWF, - IMAGE_FILETYPE_PSD, - IMAGE_FILETYPE_BMP, - IMAGE_FILETYPE_TIFF -} image_filetype; -/* }}} */ - /* {{{ structs This structure stores Exif header image elements in a simple manner Used to store camera data as extracted from the various ways that it can be diff --git a/ext/standard/php_image.h b/ext/standard/php_image.h index 3cde4e6ba0..d8a68efec7 100644 --- a/ext/standard/php_image.h +++ b/ext/standard/php_image.h @@ -23,4 +23,20 @@ PHP_FUNCTION(getimagesize); +/* {{{ enum image_filetype + This enum is used to have ext/standard/image.c and ext/exif/exif.c use + the same constants for file types. +*/ +typedef enum +{ IMAGE_FILETYPE_UNKNOWN=0, + IMAGE_FILETYPE_GIF=1, + IMAGE_FILETYPE_JPEG, + IMAGE_FILETYPE_PNG, + IMAGE_FILETYPE_SWF, + IMAGE_FILETYPE_PSD, + IMAGE_FILETYPE_BMP, + IMAGE_FILETYPE_TIFF +} image_filetype; +/* }}} */ + #endif /* PHP_IMAGE_H */ -- 2.50.1