SF.net SVN: geany:[3312] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Thu Dec 4 13:55:11 UTC 2008


Revision: 3312
          http://geany.svn.sourceforge.net/geany/?rev=3312&view=rev
Author:   ntrel
Date:     2008-12-04 13:55:11 +0000 (Thu, 04 Dec 2008)

Log Message:
-----------
Allow generating macros for functions with digits in the name.
Don't generate dummyprefix_scintilla_send_message and lookup_widget
macros.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/plugins/geanyfunctions.h
    trunk/plugins/genapi.py
    trunk/src/plugins.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-12-04 13:26:48 UTC (rev 3311)
+++ trunk/ChangeLog	2008-12-04 13:55:11 UTC (rev 3312)
@@ -6,6 +6,10 @@
    Deprecate pluginmacros.h in favour of geanyfunctions.h.
    Move geany macro to plugindata.h.
    Remove geanyfunctions.h dependency on pluginmacros.h.
+ * src/plugins.c, plugins/geanyfunctions.h, plugins/genapi.py:
+   Allow generating macros for functions with digits in the name.
+   Don't generate dummyprefix_scintilla_send_message and lookup_widget
+   macros.
 
 
 2008-12-03  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>

Modified: trunk/plugins/geanyfunctions.h
===================================================================
--- trunk/plugins/geanyfunctions.h	2008-12-04 13:26:48 UTC (rev 3311)
+++ trunk/plugins/geanyfunctions.h	2008-12-04 13:55:11 UTC (rev 3312)
@@ -53,8 +53,6 @@
 	geany_functions->p_scintilla->send_message
 #define scintilla_new \
 	geany_functions->p_scintilla->new
-#define dummyprefix_scintilla_send_message \
-	geany_functions->p_dummyprefix->scintilla_send_message
 #define sci_cmd \
 	geany_functions->p_sci->cmd
 #define sci_start_undo_action \
@@ -137,10 +135,10 @@
 	geany_functions->p_utils->get_file_list
 #define utils_write_file \
 	geany_functions->p_utils->write_file
-#define utils_get_locale_from_utf \
-	geany_functions->p_utils->get_locale_from_utf
-#define utils_get_utf \
-	geany_functions->p_utils->get_utf
+#define utils_get_locale_from_utf8 \
+	geany_functions->p_utils->get_locale_from_utf8
+#define utils_get_utf8_from_locale \
+	geany_functions->p_utils->get_utf8_from_locale
 #define utils_remove_ext_from_filename \
 	geany_functions->p_utils->remove_ext_from_filename
 #define utils_mkdir \
@@ -185,8 +183,6 @@
 	geany_functions->p_dialogs->show_msgbox
 #define dialogs_show_save_as \
 	geany_functions->p_dialogs->show_save_as
-#define lookup_widget \
-	geany_functions->p_lookup->widget
 #define msgwin_status_add \
 	geany_functions->p_msgwin->status_add
 #define msgwin_compiler_add_fmt \
@@ -197,10 +193,10 @@
 	geany_functions->p_msgwin->clear_tab
 #define msgwin_switch_tab \
 	geany_functions->p_msgwin->switch_tab
-#define encodings_convert_to_utf \
-	geany_functions->p_encodings->convert_to_utf
-#define encodings_convert_to_utf \
-	geany_functions->p_encodings->convert_to_utf
+#define encodings_convert_to_utf8 \
+	geany_functions->p_encodings->convert_to_utf8
+#define encodings_convert_to_utf8_from_charset \
+	geany_functions->p_encodings->convert_to_utf8_from_charset
 #define encodings_get_charset_from_index \
 	geany_functions->p_encodings->get_charset_from_index
 #define keybindings_send_command \

Modified: trunk/plugins/genapi.py
===================================================================
--- trunk/plugins/genapi.py	2008-12-04 13:26:48 UTC (rev 3311)
+++ trunk/plugins/genapi.py	2008-12-04 13:55:11 UTC (rev 3312)
@@ -40,7 +40,7 @@
 			l = f.readline()
 			if l == "":
 				break;
-			m = re.match("^\t&([a-z_]+)", l)
+			m = re.match("^\t&([a-z][a-z0-9_]+)", l)
 			if m:
 				s = m.group(1)
 				if not s.endswith('_funcs'):
@@ -51,7 +51,7 @@
 	return names
 
 def get_api_tuple(str):
-	m = re.match("^([a-z]+)_([a-z_]+)$", str)
+	m = re.match("^([a-z]+)_([a-z][a-z0-9_]+)$", str)
 	return 'p_' + m.group(1), m.group(2)
 
 

Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c	2008-12-04 13:26:48 UTC (rev 3311)
+++ trunk/src/plugins.c	2008-12-04 13:55:11 UTC (rev 3312)
@@ -145,10 +145,10 @@
 };
 
 /* Macro to prevent a duplicate macro being generated in geanyfunctions.h */
-#define dummyprefix_scintilla_send_message scintilla_send_message
+#define _scintilla_send_message_macro	scintilla_send_message
 
 static SciFuncs sci_funcs = {
-	&dummyprefix_scintilla_send_message,
+	&_scintilla_send_message_macro,
 	&sci_cmd,
 	&sci_start_undo_action,
 	&sci_end_undo_action,
@@ -228,9 +228,12 @@
 	&dialogs_show_save_as
 };
 
+/* Macro to prevent confusing macro being generated in geanyfunctions.h */
+#define _lookup_widget_macro	lookup_widget
+
 /* deprecated */
 static SupportFuncs support_funcs = {
-	&lookup_widget
+	&_lookup_widget_macro
 };
 
 static MsgWinFuncs msgwin_funcs = {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list