Hi Enrico,<br><br>Thansk for your advices. As I never developped very much in C with header files I don't know what's the best... I just see in another plugin that it was done like that and thought that it was the right way. However I don't understand why the 'extern' before my gean_* variables didn't work. I just saw an error into the debug messages of Geany. Maybe you can explain me that ?<br>
For the line returns, I put it it the struct configuration, so it will be configurable when I create the Preferences panel :-)<br><br>Regards,<br>Cedric<br><br><div class="gmail_quote">2009/8/13 Enrico Tröger <span dir="ltr"><<a href="mailto:enrico.troeger@uvena.de">enrico.troeger@uvena.de</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Thu, 13 Aug 2009 10:47:14 +0000, <a href="mailto:ctabin@users.sourceforge.net">ctabin@users.sourceforge.net</a> wrote:<br>

<br>
Hi,<br>
<br>
<br>
>-extern GeanyPlugin*           geany_plugin;<br>
>-extern GeanyData*             geany_data;<br>
>-extern GeanyFunctions*        geany_functions;<br>
>+GeanyPlugin*           geany_plugin;<br>
>+GeanyData*             geany_data;<br>
>+GeanyFunctions*        geany_functions;<br>
<br>
sorry, I don't see the rational behind this. Even more, I think<br>
everything in PluginEntry.h is not necessary.<br>
You should declare the above listed symbols not in the header but<br>
instead only in those source files which actually need them.<br>
Same goes for the header includes.<br>
<br>
It's not that the code is wrong but IMHO it's not the best way to<br>
handle includes and global variables.<br>
<br>
<br>
>Modified: trunk/geany-plugins/pretty-printer/src/PrettyPrinter.c<br>
>===================================================================<br>
>--- trunk/geany-plugins/pretty-printer/src/PrettyPrinter.c<br>
>2009-08-12 11:18:39 UTC (rev 894) +++<br>
>trunk/geany-plugins/pretty-printer/src/PrettyPrinter.c<br>
>2009-08-13 10:47:14 UTC (rev 895) @@ -204,7 +204,7 @@<br>
><br>
> int putNewLine()<br>
> {<br>
>-      putCharInBuffer('\n');<br>
>+      putCharInBuffer('\r\n');<br>
>       int spaces = currentDepth*options->indentLength;<br>
>       int i;<br>
>       for(i=0 ; i<spaces ; ++i)<br>
<br>
Not completely sure when this code is used and so I might be wrong. But<br>
if you want to insert line breaks, you can use the Geany preference<br>
'file_prefs.default_eol_character' to insert these line break<br>
characters the user chose in his personal settings. I personally don't<br>
like to get any CRLF's auto-inserted in my files as I use LF<br>
exclusively.<br>
<br>
<br>
Regards,<br>
Enrico<br>
<font color="#888888"><br>
--<br>
Get my GPG key from <a href="http://www.uvena.de/pub.asc" target="_blank">http://www.uvena.de/pub.asc</a><br>
</font><br>_______________________________________________<br>
Geany-devel mailing list<br>
<a href="mailto:Geany-devel@uvena.de">Geany-devel@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel</a><br>
<br></blockquote></div><br>