X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fgen_curlinfo.php;h=9fae4cb8d78c6baee7873b89a7a491e1a3c1d22e;hb=refs%2Fheads%2Fmaster;hp=92ff65e42859bb64b732498eff4158e76e65a0c3;hpb=e3976774f27b4129cbfd7d227aaa7e177f1b735c;p=m6w6%2Fext-http diff --git a/scripts/gen_curlinfo.php b/scripts/gen_curlinfo.php index 92ff65e..ab4391d 100755 --- a/scripts/gen_curlinfo.php +++ b/scripts/gen_curlinfo.php @@ -42,6 +42,9 @@ $ifdefs = array( 'RETRY_AFTER' => 'PHP_HTTP_CURL_VERSION(7,66,0)', 'EFFECTIVE_METHOD' => 'PHP_HTTP_CURL_VERSION(7,72,0)', 'PROXY_ERROR' => 'PHP_HTTP_CURL_VERSION(7,73,0)', + 'REFERER' => 'PHP_HTTP_CURL_VERSION(7,76,0)', + 'CAINFO' => 'PHP_HTTP_CURL_VERSION(7,84,0)', + 'CAPATH' => 'PHP_HTTP_CURL_VERSION(7,84,0)', ); $exclude = array( 'ACTIVESOCKET', @@ -102,12 +105,12 @@ $templates = array( ', ); -$infos = file_re('curl.h', '/^\s*(CURLINFO_(\w+))\s*=\s*CURLINFO_(STRING|LONG|DOUBLE|SLIST|OFF_T)\s*\+\s*\d+\s*,?\s*$/m'); - +$infos = file_re('curl.h', '/\s*(CURLINFO_(\w+))\s*(?:CURL_DEPRECATED\(\d+\.\d+\.\d+,\s*"[\w _-]+"\))?\s*=\s*CURLINFO_(STRING|LONG|DOUBLE|SLIST|OFF_T)\s*\+\s*\d+\s*,?\s*/m'); +var_dump($infos); ob_start(); foreach ($infos as $info) { list(, $full, $short, $type) = $info; - if (in_array($short, $exclude) || substr($short, -2) === "_T") continue; + if (in_array($short, $exclude)) continue; if (isset($ifdefs[$short])) printf("#if %s\n", $ifdefs[$short]); printf($templates[$type], $full, strtolower((isset($translate[$short])) ? $translate[$short] : $short)); if (isset($ifdefs[$short])) printf("#endif\n");