Revision: 3688 http://geany.svn.sourceforge.net/geany/?rev=3688&view=rev Author: eht16 Date: 2009-04-05 21:22:49 +0000 (Sun, 05 Apr 2009)
Log Message: ----------- Fix typo in the G_LIKELY checks, introduced in last commit. Fix the size of the styles array.
Modified Paths: -------------- trunk/ChangeLog trunk/src/highlighting.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-04-05 21:07:40 UTC (rev 3687) +++ trunk/ChangeLog 2009-04-05 21:22:49 UTC (rev 3688) @@ -20,6 +20,9 @@ src/utils.c, src/utils.h, src/vte.c: Start using G_LIKELY/G_UNLIKELY macros to gain a little more performance when building the code with gcc. + * src/highlighting.c: + Fix typo in the G_LIKELY checks, introduced in last commit. + Fix the size of the styles array.
2009-04-03 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/highlighting.c =================================================================== --- trunk/src/highlighting.c 2009-04-05 21:07:40 UTC (rev 3687) +++ trunk/src/highlighting.c 2009-04-05 21:22:49 UTC (rev 3688) @@ -58,7 +58,7 @@ } StyleSet;
/* each filetype has a styleset except GEANY_FILETYPES_NONE, which uses common_style_set */ -static StyleSet style_sets[GEANY_MAX_BUILT_IN_FILETYPES - 1] = {{0, NULL, NULL, NULL}}; +static StyleSet style_sets[GEANY_MAX_BUILT_IN_FILETYPES] = {{0, NULL, NULL, NULL}};
enum /* Geany common styling */ @@ -189,7 +189,7 @@ if (list == NULL) list = g_key_file_get_string_list(config, "styling", key_name, &len, NULL);
- if (G_LIKELY(list) != NULL && G_UNLIKELY(list[0] != NULL)) + if (G_LIKELY(list != NULL) && G_UNLIKELY(list[0] != NULL)) style->foreground = (gint) utils_strtod(list[0], NULL, FALSE); else style->foreground = rotate_rgb(default_style->foreground); @@ -199,11 +199,11 @@ else style->background = rotate_rgb(default_style->background);
- if (G_LIKELY(list) != NULL && G_LIKELY(list[2] != NULL)) + if (G_LIKELY(list != NULL) && G_LIKELY(list[2] != NULL)) style->bold = utils_atob(list[2]); else style->bold = default_style->bold;
- if (G_LIKELY(list) != NULL && list[3] != NULL) + if (G_LIKELY(list != NULL) && list[3] != NULL) style->italic = utils_atob(list[3]); else style->italic = default_style->italic;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.