]> granicus.if.org Git - php/commitdiff
Commit a bit of random plane hacking.
authorRasmus Lerdorf <rasmus@php.net>
Thu, 16 Aug 2001 00:16:00 +0000 (00:16 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Thu, 16 Aug 2001 00:16:00 +0000 (00:16 +0000)
 - A slight exif fix from the latest version of jhead
 - Make ext_skel's confirm_module_compiled function consistent

ext/exif/exif.c
ext/skeleton/skeleton.c
ext/skeleton/skeleton.php

index 927eaf929336a4bfdfe9ecec1bc1aefbad7fc8a7..41087d2a927351da31c0d64251b3274027423e42 100644 (file)
@@ -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: 
index b53df673dee0468776c82563403e6d01ebc31617..22e017d4faa00e1022af3e632e9a67ab2227e146 100644 (file)
@@ -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);
 }
 /* }}} */
index 744edb00e7ce36498181bebd7afedcba678331ed..6774d6362457353b4a7b8b422d00488c20c4ef44 100644 (file)
@@ -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);