Revision: 5173
http://geany.svn.sourceforge.net/geany/?rev=5173&view=rev
Author: ntrel
Date: 2010-08-17 13:51:59 +0000 (Tue, 17 Aug 2010)
Log Message:
-----------
Fix formatting in read_regex().
Modified Paths:
--------------
trunk/src/build.c
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2010-08-16 19:16:08 UTC (rev 5172)
+++ trunk/src/build.c 2010-08-17 13:51:59 UTC (rev 5173)
@@ -2132,17 +2132,11 @@
gboolean changed = FALSE;
const gchar *reg = gtk_entry_get_text(GTK_ENTRY(regexentry));
- if (
- (
- (src == NULL /* originally there was no regex */
- || *src == NULL /* or it was NULL*/
- )
- && NZV(reg) > 0 /* and something was typed */
- )
- ||(src != NULL /* originally there was a regex*/
- && strcmp(*src, reg) != 0 /* and it has been changed */
- )
- )
+ if (((src == NULL /* originally there was no regex */
+ || *src == NULL) /* or it was NULL*/
+ && NZV(reg)) /* and something was typed */
+ || (src != NULL /* originally there was a regex*/
+ && strcmp(*src, reg) != 0)) /* and it has been changed */
{
if (dst != NULL)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5169
http://geany.svn.sourceforge.net/geany/?rev=5169&view=rev
Author: ntrel
Date: 2010-08-16 16:53:40 +0000 (Mon, 16 Aug 2010)
Log Message:
-----------
item: update included regex library (and other CTags improvements)
Modified Paths:
--------------
trunk/TODO
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2010-08-16 12:32:18 UTC (rev 5168)
+++ trunk/TODO 2010-08-16 16:53:40 UTC (rev 5169)
@@ -13,6 +13,7 @@
o common default highlighting styles configurable for all
programming languages (done for C-like filetypes using
filetypes.common named styles)
+ o update included regex library (and other CTags improvements)
o (better custom filetype support)
o (custom template insertion - so user can add licenses, etc)
o (selectable menu of arguments to use for Make, from Make Custom)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5168
http://geany.svn.sourceforge.net/geany/?rev=5168&view=rev
Author: ntrel
Date: 2010-08-16 12:32:18 +0000 (Mon, 16 Aug 2010)
Log Message:
-----------
Fix infinite loop in Markdown lexer (patch by Colomban Wendling,
thanks).
Modified Paths:
--------------
trunk/ChangeLog
trunk/scintilla/LexMarkdown.cxx
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-08-16 12:21:22 UTC (rev 5167)
+++ trunk/ChangeLog 2010-08-16 12:32:18 UTC (rev 5168)
@@ -3,6 +3,9 @@
* src/filetypes.c:
Fix segfault on Tools->Reload Configuration when no documents are
open (#3037079).
+ * scintilla/LexMarkdown.cxx:
+ Fix infinite loop in Markdown lexer (patch by Colomban Wendling,
+ thanks).
2010-08-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/scintilla/LexMarkdown.cxx
===================================================================
--- trunk/scintilla/LexMarkdown.cxx 2010-08-16 12:21:22 UTC (rev 5167)
+++ trunk/scintilla/LexMarkdown.cxx 2010-08-16 12:32:18 UTC (rev 5168)
@@ -100,9 +100,9 @@
static bool HasPrevLineContent(StyleContext &sc) {
int i = 0;
// Go back to the previous newline
- while ((--i + sc.currentPos) && !IsNewline(sc.GetRelative(i)))
+ while ((--i + (int)sc.currentPos) >= 0 && !IsNewline(sc.GetRelative(i)))
;
- while (--i + sc.currentPos) {
+ while ((--i + (int)sc.currentPos) >= 0) {
if (IsNewline(sc.GetRelative(i)))
break;
if (!IsASpaceOrTab(sc.GetRelative(i)))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5166
http://geany.svn.sourceforge.net/geany/?rev=5166&view=rev
Author: ntrel
Date: 2010-08-16 11:47:50 +0000 (Mon, 16 Aug 2010)
Log Message:
-----------
r5163 | eht16 | 2010-08-15 14:33:32 +0100 (Sun, 15 Aug 2010) | 1 line
Rewrite the logic to auto detect encodings a bit to make it more readable and fix a slightly wrong detection on Windows (closes #3019573).
Modified Paths:
--------------
branches/Geany-0_19_1/ChangeLog
branches/Geany-0_19_1/NEWS
branches/Geany-0_19_1/src/encodings.c
Modified: branches/Geany-0_19_1/ChangeLog
===================================================================
--- branches/Geany-0_19_1/ChangeLog 2010-08-16 11:22:45 UTC (rev 5165)
+++ branches/Geany-0_19_1/ChangeLog 2010-08-16 11:47:50 UTC (rev 5166)
@@ -2,6 +2,10 @@
* wscript:
Check for libsocket on OpenSolaris to fix build.
+ * src/encodings.c:
+ Rewrite the logic to auto detect encodings a bit to make it more
+ readable and fix a slightly wrong detection on Windows
+ (closes #3019573).
2010-08-13 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: branches/Geany-0_19_1/NEWS
===================================================================
--- branches/Geany-0_19_1/NEWS 2010-08-16 11:22:45 UTC (rev 5165)
+++ branches/Geany-0_19_1/NEWS 2010-08-16 11:47:50 UTC (rev 5166)
@@ -6,6 +6,7 @@
and switching document tabs).
* Fix using filetype extension patterns with upper case letters on
Windows (#3028856).
+ * Fix a slightly wrong encoding detection on Windows (#3019573).
* Re-enable comment folding.
* Fix not loading plugins built against a newer API when Geany doesn't
provide the required version given in PLUGIN_VERSION_CHECK().
Modified: branches/Geany-0_19_1/src/encodings.c
===================================================================
--- branches/Geany-0_19_1/src/encodings.c 2010-08-16 11:22:45 UTC (rev 5165)
+++ branches/Geany-0_19_1/src/encodings.c 2010-08-16 11:47:50 UTC (rev 5166)
@@ -563,34 +563,38 @@
if (G_UNLIKELY(i == encodings[GEANY_ENCODING_NONE].idx))
continue;
- if (i == -1)
+ if (check_regex)
{
- if (preferred_charset != -1)
- {
- charset = encodings[preferred_charset].charset;
- geany_debug("Using preferred charset: %s", charset);
- }
- else
- continue;
- }
- else if (check_regex)
- {
check_regex = FALSE;
charset = regex_charset;
+ i = -2; /* keep i below the start value to have it again at -1 on the next loop run */
}
else if (check_locale)
{
check_locale = FALSE;
charset = locale_charset;
+ i = -2; /* keep i below the start value to have it again at -1 on the next loop run */
}
- else
+ else if (i == -1)
+ {
+ if (preferred_charset >= 0)
+ {
+ charset = encodings[preferred_charset].charset;
+ geany_debug("Using preferred charset: %s", charset);
+ }
+ else
+ continue;
+ }
+ else if (i >= 0)
charset = encodings[i].charset;
+ else /* in this case we have i == -2, continue to increase i and go ahead */
+ continue;
-
if (G_UNLIKELY(charset == NULL))
continue;
- geany_debug("Trying to convert %" G_GSIZE_FORMAT " bytes of data from %s into UTF-8.", size, charset);
+ geany_debug("Trying to convert %" G_GSIZE_FORMAT " bytes of data from %s into UTF-8.",
+ size, charset);
utf8_content = encodings_convert_to_utf8_from_charset(buffer, size, charset, FALSE);
if (G_LIKELY(utf8_content != NULL))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5165
http://geany.svn.sourceforge.net/geany/?rev=5165&view=rev
Author: ntrel
Date: 2010-08-16 11:22:45 +0000 (Mon, 16 Aug 2010)
Log Message:
-----------
r5162 | eht16 | 2010-08-15 13:53:09 +0100 (Sun, 15 Aug 2010) | 1 line
Check for libsocket on OpenSolaris to fix build.
Modified Paths:
--------------
branches/Geany-0_19_1/ChangeLog
branches/Geany-0_19_1/NEWS
branches/Geany-0_19_1/wscript
Modified: branches/Geany-0_19_1/ChangeLog
===================================================================
--- branches/Geany-0_19_1/ChangeLog 2010-08-15 17:44:31 UTC (rev 5164)
+++ branches/Geany-0_19_1/ChangeLog 2010-08-16 11:22:45 UTC (rev 5165)
@@ -1,3 +1,9 @@
+2010-08-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * wscript:
+ Check for libsocket on OpenSolaris to fix build.
+
+
2010-08-13 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* win32-config.h, geany.nsi, configure.ac, doc/geany.txt,
Modified: branches/Geany-0_19_1/NEWS
===================================================================
--- branches/Geany-0_19_1/NEWS 2010-08-15 17:44:31 UTC (rev 5164)
+++ branches/Geany-0_19_1/NEWS 2010-08-16 11:22:45 UTC (rev 5165)
@@ -17,6 +17,7 @@
* Fix build menu translation problems.
* Fix segfault on Tools->Reload Configuration when no documents are
open (#3037079).
+ * Fix building with Waf on Solaris.
* Fix a memory leak (thanks to Daniel Marjamäki).
* Use g_free instead of free (patch by Daniel Marjamäki, thanks).
Modified: branches/Geany-0_19_1/wscript
===================================================================
--- branches/Geany-0_19_1/wscript 2010-08-15 17:44:31 UTC (rev 5164)
+++ branches/Geany-0_19_1/wscript 2010-08-16 11:22:45 UTC (rev 5165)
@@ -196,6 +196,11 @@
conf.check(function_name='mkstemp', header_name='stdlib.h')
conf.check(function_name='strstr', header_name='string.h', mandatory=True)
+ # check sunOS socket support
+ if Options.platform == 'sunos':
+ conf.check(function_name='socket', lib='socket',
+ header_name='sys/socket.h', uselib_store='SUNOS_SOCKET', mandatory=True)
+
# check for cxx after the header and function checks have been done to ensure they are
# checked with cc not cxx
conf.check_tool('compiler_cxx misc')
@@ -385,7 +390,7 @@
source = geany_sources,
includes = '. src/ scintilla/include/ tagmanager/include/',
defines = 'G_LOG_DOMAIN="Geany"',
- uselib = 'GTK GIO WIN32',
+ uselib = 'GTK GIO WIN32 SUNOS_SOCKET',
uselib_local = 'scintilla tagmanager',
add_objects = 'geany-rc' if is_win32 else None
)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5164
http://geany.svn.sourceforge.net/geany/?rev=5164&view=rev
Author: eht16
Date: 2010-08-15 17:44:31 +0000 (Sun, 15 Aug 2010)
Log Message:
-----------
Add editor_goto_pos() to the plugin API.
Modified Paths:
--------------
trunk/ChangeLog
trunk/plugins/geanyfunctions.h
trunk/src/editor.c
trunk/src/plugindata.h
trunk/src/plugins.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-08-15 13:33:32 UTC (rev 5163)
+++ trunk/ChangeLog 2010-08-15 17:44:31 UTC (rev 5164)
@@ -6,6 +6,9 @@
Rewrite the logic to auto detect encodings a bit to make it more
readable and fix a slightly wrong detection on Windows
(closes #3019573).
+ * plugins/geanyfunctions.h, src/editor.c, src/plugindata.h,
+ src/plugins.c:
+ Add editor_goto_pos() to the plugin API.
2010-08-13 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/plugins/geanyfunctions.h
===================================================================
--- trunk/plugins/geanyfunctions.h 2010-08-15 13:33:32 UTC (rev 5163)
+++ trunk/plugins/geanyfunctions.h 2010-08-15 17:44:31 UTC (rev 5164)
@@ -90,6 +90,8 @@
geany_functions->p_editor->editor_insert_text_block
#define editor_get_eol_char_mode \
geany_functions->p_editor->editor_get_eol_char_mode
+#define editor_goto_pos \
+ geany_functions->p_editor->editor_goto_pos
#define scintilla_send_message \
geany_functions->p_scintilla->scintilla_send_message
#define scintilla_new \
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2010-08-15 13:33:32 UTC (rev 5163)
+++ trunk/src/editor.c 2010-08-15 17:44:31 UTC (rev 5164)
@@ -4620,8 +4620,16 @@
}
-/* Move to position @a pos, switching to the document if necessary,
- * setting a marker if @a mark is set. */
+/** Moves to position @a pos, switching to the document if necessary,
+ * setting a marker if @a mark is set.
+ *
+ * @param editor Editor.
+ * @param pos The position.
+ * @param mark Whether to set a mark on the position.
+ * @return @c TRUE if action has been performed, otherwise @c FALSE.
+ *
+ * @since 0.20
+ **/
gboolean editor_goto_pos(GeanyEditor *editor, gint pos, gboolean mark)
{
gint page_num;
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2010-08-15 13:33:32 UTC (rev 5163)
+++ trunk/src/plugindata.h 2010-08-15 17:44:31 UTC (rev 5164)
@@ -50,7 +50,7 @@
enum {
/** The Application Programming Interface (API) version, incremented
* whenever any plugin data types are modified or appended to. */
- GEANY_API_VERSION = 193,
+ GEANY_API_VERSION = 194,
/** The Application Binary Interface (ABI) version, incremented whenever
* existing fields in the plugin data types have to be changed or reordered. */
@@ -599,6 +599,7 @@
gboolean replace_newlines);
gint (*editor_get_eol_char_mode) (struct GeanyEditor *editor);
+ gboolean (*editor_goto_pos) (struct GeanyEditor *editor, gint pos, gboolean mark);
}
EditorFuncs;
Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c 2010-08-15 13:33:32 UTC (rev 5163)
+++ trunk/src/plugins.c 2010-08-15 17:44:31 UTC (rev 5164)
@@ -123,7 +123,8 @@
&editor_get_eol_char_len,
&editor_get_eol_char,
&editor_insert_text_block,
- &editor_get_eol_char_mode
+ &editor_get_eol_char_mode,
+ &editor_goto_pos
};
static ScintillaFuncs scintilla_funcs = {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.