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.
If you turn on your statusbar, will see the "scope" this show the function that you are now in. It is still buggy with php syntax but it is good point to start according me. Your idea is good, i like it, this will provide easy way to documenting the code, go ahead!
-------- Оригинално писмо -------- От: jordan Относно: [Geany-devel] Function Definition До: geany-devel@uvena.de Изпратено на: Сряда, 2010, Април 14 15:25:15 EEST
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?
-Jordan _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel