SF.net SVN: geany:[4764] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Mon Mar 15 14:48:43 UTC 2010


Revision: 4764
          http://geany.svn.sourceforge.net/geany/?rev=4764&view=rev
Author:   eht16
Date:     2010-03-15 14:48:43 +0000 (Mon, 15 Mar 2010)

Log Message:
-----------
Add utils_copy_environment() to the plugin API.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/plugins/geanyfunctions.h
    trunk/src/plugindata.h
    trunk/src/plugins.c
    trunk/src/utils.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-03-15 14:06:29 UTC (rev 4763)
+++ trunk/ChangeLog	2010-03-15 14:48:43 UTC (rev 4764)
@@ -7,6 +7,9 @@
  * wscript:
    Fix/Improve GIT repository detection
    (patch by Thomas Martitz, thanks).
+ * plugins/geanyfunctions.h, src/plugindata.h, src/plugins.c,
+   src/utils.c:
+   Add utils_copy_environment() to the plugin API.
 
 
 2010-03-15  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>

Modified: trunk/plugins/geanyfunctions.h
===================================================================
--- trunk/plugins/geanyfunctions.h	2010-03-15 14:06:29 UTC (rev 4763)
+++ trunk/plugins/geanyfunctions.h	2010-03-15 14:48:43 UTC (rev 4764)
@@ -232,6 +232,8 @@
 	geany_functions->p_utils->utils_str_remove_chars
 #define utils_get_file_list_full \
 	geany_functions->p_utils->utils_get_file_list_full
+#define utils_copy_environment \
+	geany_functions->p_utils->utils_copy_environment
 #define ui_dialog_vbox_new \
 	geany_functions->p_ui->ui_dialog_vbox_new
 #define ui_frame_new_with_alignment \

Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h	2010-03-15 14:06:29 UTC (rev 4763)
+++ trunk/src/plugindata.h	2010-03-15 14:48:43 UTC (rev 4764)
@@ -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 = 176,
+	GEANY_API_VERSION = 177,
 
 	/** The Application Binary Interface (ABI) version, incremented whenever
 	 * existing fields in the plugin data types have to be changed or reordered. */
@@ -393,6 +393,8 @@
 	gchar*		(*utils_str_remove_chars) (gchar *string, const gchar *chars);
 	GSList*		(*utils_get_file_list_full)(const gchar *path, gboolean full_path, gboolean sort,
 				GError **error);
+	gchar**		(*utils_copy_environment)(const gchar **exclude_vars, const gchar *first_varname, ...);
+
 }
 UtilsFuncs;
 

Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c	2010-03-15 14:06:29 UTC (rev 4763)
+++ trunk/src/plugins.c	2010-03-15 14:48:43 UTC (rev 4764)
@@ -210,6 +210,7 @@
 	&utils_str_middle_truncate,
 	&utils_str_remove_chars,
 	&utils_get_file_list_full,
+	&utils_copy_environment
 };
 
 static UIUtilsFuncs uiutils_funcs = {

Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c	2010-03-15 14:06:29 UTC (rev 4763)
+++ trunk/src/utils.c	2010-03-15 14:48:43 UTC (rev 4764)
@@ -1916,12 +1916,20 @@
 }
 
 
-/* Copies the current environment into a new array.
- * exclude_vars is a NULL-terminated array of variable names which should be not copied.
+/**
+ * Copies the current environment into a new array.
+ * @a exclude_vars is a @c NULL-terminated array of variable names which should be not copied.
  * All further arguments are key, value pairs of variables which should be added to
  * the environment.
  *
- * The argument list must be terminated with NULL. */
+ * The argument list must be @c NULL-terminated.
+ *
+ * @param exclude_vars @c NULL-terminated array of variable names to exclude.
+ * @param first_varname Name of the first variable to copy into the new array.
+ * @param ... Key-value pairs of variable names and values, @c NULL-terminated.
+ *
+ * @return The new environment array.
+ **/
 gchar **utils_copy_environment(const gchar **exclude_vars, const gchar *first_varname, ...)
 {
 	gchar **result;


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