diff options
author | Jouni Ahto <jah@php.net> | 2000-06-10 05:47:22 +0000 |
---|---|---|
committer | Jouni Ahto <jah@php.net> | 2000-06-10 05:47:22 +0000 |
commit | f3c1222da3284bbbc7e2ce26af2dd2470cec4a59 (patch) | |
tree | 20c75b0933ffc30a867ff93c2a4a50abd8db9b0d /ext/skeleton | |
parent | b54f9152800f3e80ead28c58920992410a64dd90 (diff) | |
download | php-git-f3c1222da3284bbbc7e2ce26af2dd2470cec4a59.tar.gz |
- Fix typos, add default case to switch and other small things.
Diffstat (limited to 'ext/skeleton')
-rwxr-xr-x | ext/skeleton/create_stubs | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/ext/skeleton/create_stubs b/ext/skeleton/create_stubs index 986bdfb28e..8e7179cb30 100755 --- a/ext/skeleton/create_stubs +++ b/ext/skeleton/create_stubs @@ -66,7 +66,7 @@ END { useswitch = maxargs[i] - minargs[i] funcvals = resources = handleargs = "" - proto = "/* {{{ #proto " types[i] " " funcs[i] "(" + proto = "/* {{{ proto " types[i] " " funcs[i] "(" if (maxargs[i]) { zvals = "\tzval " @@ -98,9 +98,9 @@ END { if (useswitch) { if (j > minargs[i]-1) { - handleargs = "\t\tcase " j+1 ";\n\t\t\t" convert(argtypes[i,j], argnames[i,j]) "\t\t\t/* Fall-through. */\n" handleargs + handleargs = "\t\tcase " j+1 ":\n\t\t\t" convert(argtypes[i,j], argnames[i,j]) "\t\t\t/* Fall-through. */\n" handleargs } else if (j >= minargs[i]-1) { - handleargs = "\t\tcase " j+1 ";\n\t\t\t" convert(argtypes[i,j], argnames[i,j]) handleargs + handleargs = "\t\tcase " j+1 ":\n\t\t\t" convert(argtypes[i,j], argnames[i,j]) handleargs } else { handleargs = "\t\t\t" convert(argtypes[i,j], argnames[i,j]) handleargs } @@ -112,21 +112,24 @@ END { proto = proto closeopts ")\n */\nPHP_FUNCTION(" funcs[i] ")\n{" if (maxargs[i]) { zvals = zvals ";" - fetchargs = fetchargs ") == FAILURE) {\n\t\tWRONG_PARAM_COUNT();\n\t}\n" + fetchargs = fetchargs ") == FAILURE) {\n\t\tWRONG_PARAM_COUNT;\n\t}\n" } if (resources ) funcvals = funcvals "\t???LS_FETCH();\n" - if (useswitch) handleargs = "\tswitch (argc) {\n" handleargs "\t\t\tbreak;\n\t}" - - print proto > "function_stubs" - if (zvals) print zvals > "function_stubs" - if (funcvals) print funcvals > "function_stubs" - if (fetchargs) print fetchargs > "function_stubs" - if (resources) print resources > "function_stubs" - if (handleargs) print handleargs > "function_stubs" - print "\n\tphp_error(E_WARNING, \"" funcs[i] ": not yet implemented\");" > "function_stubs" - print "}\n/* }}} */\n" > "function_stubs" - print "PHP_FUNCTION(" funcs[i] ");" > "function_declarations" - print "\tPHP_FE(" funcs[i] ",\tNULL)" > "function_entries" + if (useswitch) handleargs = "\tswitch (argc) {\n" handleargs "\t\t\tbreak;\n\t\tdefault:\n\t\t\tWRONG_PARAM_COUNT;\n\t}" + + print proto > extname "/function_stubs" + if (zvals) print zvals > extname "/function_stubs" + if (funcvals) print funcvals > extname "/function_stubs" + if (fetchargs) print fetchargs > extname "/function_stubs" + if (resources) { + print resources > extname "/function_stubs" + print "" > extname "/function_warning" + } + if (handleargs) print handleargs > extname "/function_stubs" + print "\n\tphp_error(E_WARNING, \"" funcs[i] ": not yet implemented\");" > extname "/function_stubs" + print "}\n/* }}} */\n" > extname "/function_stubs" + print "PHP_FUNCTION(" funcs[i] ");" > extname "/function_declarations" + print "\tPHP_FE(" funcs[i] ",\tNULL)" > extname "/function_entries" } } |