From: Rasmus Lerdorf Date: Thu, 16 Aug 2001 00:16:00 +0000 (+0000) Subject: Commit a bit of random plane hacking. X-Git-Tag: PRE_SUBST_Z_MACROS~505 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b4c2a2ff5a06cf049eb674198365b079eca756f;p=php 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 --- diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 927eaf9293..41087d2a92 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -995,6 +995,14 @@ static int scan_JPEG_header (ImageInfoType *ImageInfo, FILE *infile, Section_t * } 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: diff --git a/ext/skeleton/skeleton.c b/ext/skeleton/skeleton.c index b53df673de..22e017d4fa 100644 --- a/ext/skeleton/skeleton.c +++ b/ext/skeleton/skeleton.c @@ -131,17 +131,14 @@ PHP_MINFO_FUNCTION(extname) 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); } /* }}} */ diff --git a/ext/skeleton/skeleton.php b/ext/skeleton/skeleton.php index 744edb00e7..6774d63624 100644 --- a/ext/skeleton/skeleton.php +++ b/ext/skeleton/skeleton.php @@ -1,5 +1,14 @@ \n"; +foreach($functions as $func) { + echo $func."
\n"; +} +echo "
\n"; $function = 'confirm_' . $module . '_compiled'; if (extension_loaded($module)) { $str = $function($module);