]> granicus.if.org Git - php/commitdiff
support for short comments was added to ext_skel proto files
authorHartmut Holzgraefe <hholzgra@php.net>
Tue, 31 Oct 2000 11:30:11 +0000 (11:30 +0000)
committerHartmut Holzgraefe <hholzgra@php.net>
Tue, 31 Oct 2000 11:30:11 +0000 (11:30 +0000)
theese will be used in proto comments in the source
and as <refpurpose> information in the XML docs

README.EXT_SKEL
ext/skeleton/create_stubs

index cedda53c75946a2ae5ec5ec85a02f41b91cfd27d..a887a85e5f73005d603781108df6244016e0c341 100644 (file)
@@ -51,9 +51,13 @@ FORMAT OF FUNCTION DEFINITIONS FILE
   ']'s as there where '['s. Currently, it does not harm if you forget to do it
   or there is a wrong amount of ']'s, but this may change in the future.
 
+       An additional short description may be added after the parameters. 
+  If present it will be filled into the 'proto' header comments in the stubs
+  code and the <refpurpose> tag in the XML documentation.
+
   An example:
 
-    my_function(int arg1, int arg2 [, int arg3 [, int arg4]])
+    my_function(int arg1, int arg2 [, int arg3 [, int arg4]]) this is my 1st
 
   Arguments arg3 and arg4 are optional.
 
index e302fe31be872f85017c7138e6a454ad193b1f87..f1af21fa1a1512112bd6c0484d824d3cbc7a8fa0 100755 (executable)
@@ -147,6 +147,11 @@ BEGIN {
                }
        }
 
+       if (x = gobble("\\)")) {
+               sub(/^[ \t]+/, "", line)
+               fcomments[num_funcs] = line
+       }
+
        funcs[num_funcs]   = func_name
        types[num_funcs]   = func_type
        maxargs[num_funcs] = args_max
@@ -171,7 +176,7 @@ END {
         xmlstr = "  <refentry id=\"function." refid "\">\n" \
                "   <refnamediv>\n" \
                "    <refname>" funcs[i] "</refname>\n" \
-               "    <refpurpose></refpurpose>\n" \
+               "    <refpurpose>" fcomments[i] "</refpurpose>\n" \
                "   </refnamediv>\n" \
                "   <refsect1>\n" \
                "    <title>Description</title>\n" \
@@ -261,7 +266,7 @@ END {
                        }
                }
 
-               proto = proto closeopts ")\n    */\nPHP_FUNCTION(" funcs[i] ")\n{"
+               proto = proto closeopts ")\n   " fcomments[i] " */\nPHP_FUNCTION(" funcs[i] ")\n{"
                if (maxargs[i]) {
                        zvals = zvals ";"
                        fetchargs = fetchargs ") == FAILURE)" closefetch "{\n\t\tWRONG_PARAM_COUNT;\n\t}\n"