X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=scripts%2Fgen_curlinfo.php;h=f7c6cdb53d55ad0dfc5f3b124256495c1cb57fbc;hb=e29a410679b63b8f96b6890d1418f39d9ed489cc;hp=92bde38a562cbc6d7ccb8d3af923f0399b760078;hpb=feba1657a156f10d687e6e239e95e26536270eaa;p=m6w6%2Fext-http diff --git a/scripts/gen_curlinfo.php b/scripts/gen_curlinfo.php index 92bde38..f7c6cdb 100644 --- a/scripts/gen_curlinfo.php +++ b/scripts/gen_curlinfo.php @@ -1,10 +1,13 @@ +#!/usr/bin/env php "connect_code" + 'HTTP_CONNECTCODE' => "connect_code", + 'COOKIELIST' => 'cookies', ); $templates = array( @@ -74,8 +78,7 @@ foreach ($infos as $info) { list(, $full, $short, $type) = $info; if (in_array($short, $exclude)) continue; if (isset($ifdefs[$short])) printf("#if HTTP_CURL_VERSION(%s)\n", $ifdefs[$short]); - if (isset($translate[$short])) $short = $translate[$short]; - printf($templates[$type], $full, strtolower($short)); + printf($templates[$type], $full, strtolower((isset($translate[$short])) ? $translate[$short] : $short)); if (isset($ifdefs[$short])) printf("#endif\n"); }