summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--plugins/xchat-plugin.h20
-rw-r--r--src/common/plugin.c10
-rw-r--r--src/common/plugin.h10
-rw-r--r--src/common/xchat-plugin.h20
4 files changed, 30 insertions, 30 deletions
diff --git a/plugins/xchat-plugin.h b/plugins/xchat-plugin.h
index 48e3bc02..15799424 100644
--- a/plugins/xchat-plugin.h
+++ b/plugins/xchat-plugin.h
@@ -138,16 +138,16 @@ struct _xchat_plugin
 	void (*xchat_free) (xchat_plugin *ph,
 	    void *ptr);
 	int (*xchat_set_pluginpref_str) (xchat_plugin *ph,
-		char *var,
-		char *value);
+		const char *var,
+		const char *value);
 	int (*xchat_get_pluginpref_str) (xchat_plugin *ph,
-		char *var,
+		const char *var,
 		char *dest);
 	int (*xchat_set_pluginpref_int) (xchat_plugin *ph,
-		char *var,
+		const char *var,
 		int value);
 	int (*xchat_get_pluginpref_int) (xchat_plugin *ph,
-		char *var);
+		const char *var);
 };
 #endif
 
@@ -305,21 +305,21 @@ xchat_free (xchat_plugin *ph,
 
 int
 xchat_set_pluginpref_str (xchat_plugin *ph,
-		char *var,
-		char *value);
+		const char *var,
+		const char *value);
 
 int
 xchat_get_pluginpref_str (xchat_plugin *ph,
-		char *var,
+		const char *var,
 		char *dest);
 
 int
 xchat_set_pluginpref_int (xchat_plugin *ph,
-		char *var,
+		const char *var,
 		int value);
 int
 xchat_get_pluginpref_int (xchat_plugin *ph,
-		char *var);
+		const char *var);
 
 #if !defined(PLUGIN_C) && defined(WIN32)
 #ifndef XCHAT_PLUGIN_HANDLE
diff --git a/src/common/plugin.c b/src/common/plugin.c
index b5b10a0e..b443b586 100644
--- a/src/common/plugin.c
+++ b/src/common/plugin.c
@@ -1584,7 +1584,7 @@ xchat_free (xchat_plugin *ph, void *ptr)
 }
 
 int
-xchat_set_pluginpref_str (xchat_plugin *pl, char *var, char *value)
+xchat_set_pluginpref_str (xchat_plugin *pl, const char *var, const char *value)
 {
 	FILE *fpIn;
 	int fhOut;
@@ -1653,7 +1653,7 @@ xchat_set_pluginpref_str (xchat_plugin *pl, char *var, char *value)
 
 		fclose (fpIn);
 
-		if (!prevConfig)
+		if (!prevConfig)	/* var doesn't exist currently, append */
 		{
 			sprintf (buffer, "%s = %s\n", var, value);
 			write (fhOut, buffer, strlen (buffer));
@@ -1680,7 +1680,7 @@ xchat_set_pluginpref_str (xchat_plugin *pl, char *var, char *value)
 }
 
 int
-xchat_get_pluginpref_str (xchat_plugin *pl, char *var, char *dest)
+xchat_get_pluginpref_str (xchat_plugin *pl, const char *var, char *dest)
 {
 	int fh;
 	int l;
@@ -1732,7 +1732,7 @@ xchat_get_pluginpref_str (xchat_plugin *pl, char *var, char *dest)
 }
 
 int
-xchat_set_pluginpref_int (xchat_plugin *pl, char *var, int value)
+xchat_set_pluginpref_int (xchat_plugin *pl, const char *var, int value)
 {
 	char buffer[12];
 
@@ -1741,7 +1741,7 @@ xchat_set_pluginpref_int (xchat_plugin *pl, char *var, int value)
 }
 
 int
-xchat_get_pluginpref_int (xchat_plugin *pl, char *var)
+xchat_get_pluginpref_int (xchat_plugin *pl, const char *var)
 {
 	char buffer[12];
 
diff --git a/src/common/plugin.h b/src/common/plugin.h
index 858ed815..cddb86fb 100644
--- a/src/common/plugin.h
+++ b/src/common/plugin.h
@@ -99,16 +99,16 @@ struct _xchat_plugin
 	void (*xchat_free) (xchat_plugin *ph,
 	    void *ptr);
 	int (*xchat_set_pluginpref_str) (xchat_plugin *ph,
-		char *var,
-		char *value);
+		const char *var,
+		const char *value);
 	int (*xchat_get_pluginpref_str) (xchat_plugin *ph,
-		char *var,
+		const char *var,
 		char *dest);
 	int (*xchat_set_pluginpref_int) (xchat_plugin *ph,
-		char *var,
+		const char *var,
 		int value);
 	int (*xchat_get_pluginpref_int) (xchat_plugin *ph,
-		char *var);
+		const char *var);
 	void *(*xchat_dummy4) (xchat_plugin *ph);
 	void *(*xchat_dummy3) (xchat_plugin *ph);
 	void *(*xchat_dummy2) (xchat_plugin *ph);
diff --git a/src/common/xchat-plugin.h b/src/common/xchat-plugin.h
index 48e3bc02..15799424 100644
--- a/src/common/xchat-plugin.h
+++ b/src/common/xchat-plugin.h
@@ -138,16 +138,16 @@ struct _xchat_plugin
 	void (*xchat_free) (xchat_plugin *ph,
 	    void *ptr);
 	int (*xchat_set_pluginpref_str) (xchat_plugin *ph,
-		char *var,
-		char *value);
+		const char *var,
+		const char *value);
 	int (*xchat_get_pluginpref_str) (xchat_plugin *ph,
-		char *var,
+		const char *var,
 		char *dest);
 	int (*xchat_set_pluginpref_int) (xchat_plugin *ph,
-		char *var,
+		const char *var,
 		int value);
 	int (*xchat_get_pluginpref_int) (xchat_plugin *ph,
-		char *var);
+		const char *var);
 };
 #endif
 
@@ -305,21 +305,21 @@ xchat_free (xchat_plugin *ph,
 
 int
 xchat_set_pluginpref_str (xchat_plugin *ph,
-		char *var,
-		char *value);
+		const char *var,
+		const char *value);
 
 int
 xchat_get_pluginpref_str (xchat_plugin *ph,
-		char *var,
+		const char *var,
 		char *dest);
 
 int
 xchat_set_pluginpref_int (xchat_plugin *ph,
-		char *var,
+		const char *var,
 		int value);
 int
 xchat_get_pluginpref_int (xchat_plugin *ph,
-		char *var);
+		const char *var);
 
 #if !defined(PLUGIN_C) && defined(WIN32)
 #ifndef XCHAT_PLUGIN_HANDLE