cvs: php4 /ext/exif exif.c /ext/skeleton skeleton.c skeleton.php
| From: | Rasmus Lerdorf | Date: | Thu, 16 Aug 2001 00:16:00 +0000 |
| Subject: | cvs: php4 /ext/exif exif.c /ext/skeleton skeleton.c skeleton.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6878@lists.php.net to get a copy of this message | ||
rasmus Wed Aug 15 20:16:00 2001 EDT
Modified files:
/php4/ext/exif exif.c
/php4/ext/skeleton skeleton.c skeleton.php
Log:
Commit a bit of random plane hacking.
- A slight exif fix from the latest version of jhead
- Make ext_skel's confirm_module_compiled function consistent
Index: php4/ext/exif/exif.c
diff -u php4/ext/exif/exif.c:1.29 php4/ext/exif/exif.c:1.30
--- php4/ext/exif/exif.c:1.29 Sat Aug 11 12:38:26 2001
+++ php4/ext/exif/exif.c Wed Aug 15 20:16:00 2001
@@ -995,6 +995,14 @@
}
break;
+ case M_JFIF:
+ /* Regular jpegs always have this tag, exif images have the
+ * exif marker instead, althogh ACDsee will write images with
+ * both markers. this program will re-create this marker on
+ * absence of exif marker. Hence no need to keep the copy
+ * from the file. */
+ efree(Sections[--(*SectionsRead)].Data);
+ break;
case M_SOF0:
case M_SOF1:
Index: php4/ext/skeleton/skeleton.c
diff -u php4/ext/skeleton/skeleton.c:1.23 php4/ext/skeleton/skeleton.c:1.24
--- php4/ext/skeleton/skeleton.c:1.23 Thu Aug 9 00:47:47 2001
+++ php4/ext/skeleton/skeleton.c Wed Aug 15 20:16:00 2001
@@ -131,17 +131,14 @@
Return a string to confirm that the module is compiled in */
PHP_FUNCTION(confirm_extname_compiled)
{
- zval **arg;
- int len;
+ char *arg = NULL;
+ int arg_len, len;
char string[256];
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
- ZEND_WRONG_PARAM_COUNT();
- }
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &arg, &arg_len) ==
FAILURE)
+ return;
- convert_to_string_ex(arg);
-
- len = sprintf(string, "Congratulations! You have successfully modified ext/%.78s/config.m4.
Module %.78s is now compiled into PHP.", "extname", Z_STRVAL_PP(arg));
+ len = sprintf(string, "Congratulations! You have successfully modified ext/%.78s/config.m4.
Module %.78s is now compiled into PHP.", "extname", arg);
RETURN_STRINGL(string, len, 1);
}
/* }}} */
Index: php4/ext/skeleton/skeleton.php
diff -u php4/ext/skeleton/skeleton.php:1.3 php4/ext/skeleton/skeleton.php:1.4
--- php4/ext/skeleton/skeleton.php:1.3 Sun Jul 16 14:51:00 2000
+++ php4/ext/skeleton/skeleton.php Wed Aug 15 20:16:00 2001
@@ -1,5 +1,14 @@
<?
+if(!extension_loaded('extname')) {
+ dl('extname.so');
+}
$module = 'extname';
+$functions = get_extension_funcs($module);
+echo "Functions available in the test extension:<br>\n";
+foreach($functions as $func) {
+ echo $func."<br>\n";
+}
+echo "<br>\n";
$function = 'confirm_' . $module . '_compiled';
if (extension_loaded($module)) {
$str = $function($module);