On Thu, 13 Aug 2009 10:47:14 +0000, ctabin@users.sourceforge.net wrote:
Hi,
-extern GeanyPlugin* geany_plugin; -extern GeanyData* geany_data; -extern GeanyFunctions* geany_functions; +GeanyPlugin* geany_plugin; +GeanyData* geany_data; +GeanyFunctions* geany_functions;
sorry, I don't see the rational behind this. Even more, I think everything in PluginEntry.h is not necessary. You should declare the above listed symbols not in the header but instead only in those source files which actually need them. Same goes for the header includes.
It's not that the code is wrong but IMHO it's not the best way to handle includes and global variables.
Modified: trunk/geany-plugins/pretty-printer/src/PrettyPrinter.c
--- trunk/geany-plugins/pretty-printer/src/PrettyPrinter.c 2009-08-12 11:18:39 UTC (rev 894) +++ trunk/geany-plugins/pretty-printer/src/PrettyPrinter.c 2009-08-13 10:47:14 UTC (rev 895) @@ -204,7 +204,7 @@
int putNewLine() {
- putCharInBuffer('\n');
- putCharInBuffer('\r\n'); int spaces = currentDepth*options->indentLength; int i; for(i=0 ; i<spaces ; ++i)
Not completely sure when this code is used and so I might be wrong. But if you want to insert line breaks, you can use the Geany preference 'file_prefs.default_eol_character' to insert these line break characters the user chose in his personal settings. I personally don't like to get any CRLF's auto-inserted in my files as I use LF exclusively.
Regards, Enrico