[Geany-devel] Function Definition

jordan phosphor at xxxxx
Wed Apr 14 12:25:15 UTC 2010

I'm trying to write a plug-in that among other things adds a function
header.    Unfortunately this is also my first C program so it has been
more of  a learning experience then anything, but I'm finally at the
point where it sort of works.

So far it has been a trial and error sort of thing using devhelp and
various web sites, but now I am at the point where I need some guidance
that is Geany specific.  Currently my plug-in reads the current line and
breaks it down, however it's my understanding that some C programmers
may break a function definition over several lines, in which case my
plug-in would not work properly.  I would also like to make it so the
function definition for whatever the current function is would be used.

So this brings me to my questions, is there an easy way to determine if
the current position in the editor is part of a function or not?  If so
is there an easy way to get the function definition?  If not could
someone maybe point me to some tutorials about parsing text in c.

Also I was wondering if it's possible to use Valgrind to profile a plug-in?

Also currently the header that is generated by my plug-in c style multi
line hard coded, and I was wondering if at some time more of the methods
in templates.c would be opened up to the API? 


More information about the Devel mailing list