[DGD]varargs void foo(object bar)
Marc Spoorendonk
marc at freud.et.tudelft.nl
Mon Nov 30 14:29:39 CET 1998
On Mon, 30 Nov 1998, Frank Schmidt wrote:
> (lost track of what functions I've made man-pages for, mail me if
> you got any clever unix-tricks e.g. with grepping to get an
> overview over all functions. The files are scattered over several
> subdirectory levels).
Hmm.. Some time ago i wrote a little script to do exactly that:
---------------------- begin -------------------------------------
#!/bin/sh
#
# funcs -- by Marc Spoorendonk 1998
#
# Dumps all function declarations in a source file
#
egrep "\
^[ \t]*\
(nomask |)\
(varargs |)\
(static |private |public |)\
(varargs |)\
(void|int|mapping|string|mixed|float|object)\
[ \*]*\
[_0-9A-Za-z]+\
\(.*\)\
" "$*" /dev/null
------------------------------ end -----------------------------------
If you want to find a function and dont know where it is:
---------------------- begin -----------------------------------
#!/bin/sh
#
# findfunc -- by Marc Spoorendonk 1998
#
# Searches through source files untill it finds the declaration of the specified
# function.
#
find . -name \*.c -type f -exec ~/bin/funcs {} \; | grep "$1"
----------------------- end -------------------------------------
If you want to find all functions then just do:
find . -name \*.c -type f -exec ~/bin/funcs {} \;
I guess this is what you were asking for.
Regards,
Marc Spoorendonk
--
Marc Spoorendonk
Department of Electrical Engineering
Delft University of Technology
e-mail : Marc at freud.et.tudelft.nl
mud : telnet://freud.et.tudelft.nl:8888
URL : http://freud.et.tudelft.nl/~marc/index.html
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list