[Geany-devel] SF.net SVN: geany-plugins:[895] trunk/geany-plugins/pretty-printer/src
Enrico Tröger
enrico.troeger at xxxxx
Thu Aug 13 21:37:47 UTC 2009
On Thu, 13 Aug 2009 10:47:14 +0000, ctabin at 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
--
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20090813/14a4394f/attachment.pgp>
More information about the Devel
mailing list