cvs: php4 /ext/exif exif.c /ext/standard basic_functions.c image.c php_image.h
| From: | Marcus B�rger | Date: | Sun, 23 Jun 2002 00:43:12 +0000 |
| Subject: | cvs: php4 /ext/exif exif.c /ext/standard basic_functions.c image.c php_image.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12459@lists.php.net to get a copy of this message | ||
helly Sat Jun 22 20:43:12 2002 EDT
Modified files:
/php4/ext/standard basic_functions.c image.c php_image.h
/php4/ext/exif exif.c
Log:
-imagetype2mimetype renamed to image_type_to_mime_type
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.480 php4/ext/standard/basic_functions.c:1.481
--- php4/ext/standard/basic_functions.c:1.480 Sat Jun 22 14:14:39 2002
+++ php4/ext/standard/basic_functions.c Sat Jun 22 20:43:11 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.480 2002/06/22 18:14:39 helly Exp $ */
+/* $Id: basic_functions.c,v 1.481 2002/06/23 00:43:11 helly Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -281,7 +281,7 @@
PHP_FE(iptcparse, NULL)
PHP_FE(iptcembed, NULL)
PHP_FE(getimagesize, second_args_force_ref)
- PHP_FE(imagetype2mimetype, NULL)
+ PHP_FE(image_type_to_mime_type, NULL)
PHP_FE(phpinfo, NULL)
PHP_FE(phpversion, NULL)
Index: php4/ext/standard/image.c
diff -u php4/ext/standard/image.c:1.58 php4/ext/standard/image.c:1.59
--- php4/ext/standard/image.c:1.58 Sat Jun 22 14:14:39 2002
+++ php4/ext/standard/image.c Sat Jun 22 20:43:11 2002
@@ -16,7 +16,7 @@
| Marcus Boerger <helly@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: image.c,v 1.58 2002/06/22 18:14:39 helly Exp $ */
+/* $Id: image.c,v 1.59 2002/06/23 00:43:11 helly Exp $ */
/*
* Based on Daniel Schmitt's imageinfo.c which carried the following
* Copyright notice.
@@ -65,7 +65,7 @@
PHPAPI const char php_sig_tif_ii[4] = {'I','I', (char)0x2A, (char)0x00};
PHPAPI const char php_sig_tif_mm[4] = {'M','M', (char)0x00, (char)0x2A};
PHPAPI const char php_sig_jpc[3] = {(char)0xFF, (char)0x4F, (char)0xff};
-/* REMEMBER TO ADD MIME-TYPE TO FUNCTION php_imagetype2mimetype */
+/* REMEMBER TO ADD MIME-TYPE TO FUNCTION php_image_type_to_mime_type */
/* return info as a struct, to make expansion easier */
@@ -668,9 +668,9 @@
}
/* }}} */
-/* {{{ php_imagetype2mimetype
+/* {{{ php_image_type_to_mime_type
* Convert internal image_type to mime type */
-PHPAPI const char * php_imagetype2mimetype(int image_type)
+PHPAPI const char * php_image_type_to_mime_type(int image_type)
{
switch( image_type) {
case IMAGE_FILETYPE_GIF:
@@ -697,9 +697,9 @@
}
/* }}} */
-/* {{{ proto array imagetype2mimetype(int imagetype)
+/* {{{ proto array image_type_to_mime_type(int imagetype)
Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail,
exif_imagetype */
-PHP_FUNCTION(imagetype2mimetype)
+PHP_FUNCTION(image_type_to_mime_type)
{
zval **p_image_type;
int arg_c = ZEND_NUM_ARGS();
@@ -708,7 +708,7 @@
WRONG_PARAM_COUNT;
}
zval_dtor(*p_image_type);
- ZVAL_STRING(return_value, (char*)php_imagetype2mimetype(Z_LVAL_PP(p_image_type)), 1);
+ ZVAL_STRING(return_value, (char*)php_image_type_to_mime_type(Z_LVAL_PP(p_image_type)), 1);
}
/* }}} */
@@ -868,7 +868,7 @@
if (result->channels != 0) {
add_assoc_long(return_value, "channels", result->channels);
}
- add_assoc_string(return_value, "mime", (char*)php_imagetype2mimetype(itype), 1);
+ add_assoc_string(return_value, "mime", (char*)php_image_type_to_mime_type(itype), 1);
efree(result);
} else {
RETURN_FALSE;
Index: php4/ext/standard/php_image.h
diff -u php4/ext/standard/php_image.h:1.16 php4/ext/standard/php_image.h:1.17
--- php4/ext/standard/php_image.h:1.16 Sat Jun 22 19:43:16 2002
+++ php4/ext/standard/php_image.h Sat Jun 22 20:43:11 2002
@@ -17,14 +17,14 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_image.h,v 1.16 2002/06/22 23:43:16 helly Exp $ */
+/* $Id: php_image.h,v 1.17 2002/06/23 00:43:11 helly Exp $ */
#ifndef PHP_IMAGE_H
#define PHP_IMAGE_H
PHP_FUNCTION(getimagesize);
-PHP_FUNCTION(imagetype2mimetype);
+PHP_FUNCTION(image_type_to_mime_type);
/* {{{ enum image_filetype
This enum is used to have ext/standard/image.c and ext/exif/exif.c use
@@ -51,6 +51,6 @@
PHPAPI int php_getimagetype(php_stream *stream, char *filetype TSRMLS_DC);
-PHPAPI const char * php_imagetype2mimetype(int image_type);
+PHPAPI const char * php_image_type_to_mime_type(int image_type);
#endif /* PHP_IMAGE_H */
Index: php4/ext/exif/exif.c
diff -u php4/ext/exif/exif.c:1.94 php4/ext/exif/exif.c:1.95
--- php4/ext/exif/exif.c:1.94 Sat Jun 22 19:43:16 2002
+++ php4/ext/exif/exif.c Sat Jun 22 20:43:11 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: exif.c,v 1.94 2002/06/22 23:43:16 helly Exp $ */
+/* $Id: exif.c,v 1.95 2002/06/23 00:43:11 helly Exp $ */
/* ToDos
*
@@ -107,7 +107,7 @@
};
/* }}} */
-#define EXIF_VERSION "1.4 $Id: exif.c,v 1.94 2002/06/22 23:43:16 helly Exp $"
+#define EXIF_VERSION "1.4 $Id: exif.c,v 1.95 2002/06/23 00:43:11 helly Exp $"
/* {{{ PHP_MINFO_FUNCTION
*/
@@ -3330,7 +3330,7 @@
exif_iif_add_int(&ImageInfo, SECTION_FILE, "FileDateTime", ImageInfo.FileDateTime);
exif_iif_add_int(&ImageInfo, SECTION_FILE, "FileSize", ImageInfo.FileSize);
exif_iif_add_int(&ImageInfo, SECTION_FILE, "FileType", ImageInfo.FileType);
- exif_iif_add_str(&ImageInfo, SECTION_FILE, "MimeType",
(char*)php_imagetype2mimetype(ImageInfo.FileType));
+ exif_iif_add_str(&ImageInfo, SECTION_FILE, "MimeType",
(char*)php_image_type_to_mime_type(ImageInfo.FileType));
exif_iif_add_str(&ImageInfo, SECTION_FILE, "SectionsFound", sections_str ?
sections_str : "NONE");
#ifdef EXIF_DEBUG
@@ -3396,7 +3396,7 @@
exif_scan_thumbnail(&ImageInfo);
}
exif_iif_add_int(&ImageInfo, SECTION_COMPUTED, "Thumbnail.FileType",
ImageInfo.Thumbnail.filetype);
- exif_iif_add_str(&ImageInfo, SECTION_COMPUTED, "Thumbnail.MimeType",
(char*)php_imagetype2mimetype(ImageInfo.Thumbnail.filetype));
+ exif_iif_add_str(&ImageInfo, SECTION_COMPUTED, "Thumbnail.MimeType",
(char*)php_image_type_to_mime_type(ImageInfo.Thumbnail.filetype));
}
if (ImageInfo.Thumbnail.width && ImageInfo.Thumbnail.height) {
exif_iif_add_int(&ImageInfo, SECTION_COMPUTED, "Thumbnail.Height",
ImageInfo.Thumbnail.height);