diff options
Diffstat (limited to 'globals.c')
-rw-r--r-- | globals.c | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -2,7 +2,9 @@ #include "globals.h" - +/** +* Set text value in given parameter +*/ void set_parameter_text (GtkWidget *entry, gchar **param) { gchar *tmp; @@ -12,7 +14,7 @@ void set_parameter_text (GtkWidget *entry, gchar **param) if(!g_strcmp0(tmp,"")) { g_free(tmp); - tmp = NULL; + tmp = g_strdup(NULL);; } g_free(*param); @@ -21,8 +23,9 @@ void set_parameter_text (GtkWidget *entry, gchar **param) g_free(tmp); } + /** -* Boolean value in given parameter +* Set boolean value in given parameter */ void set_parameter_bool (GtkWidget *checkbox, gboolean *param) { @@ -31,8 +34,11 @@ void set_parameter_bool (GtkWidget *checkbox, gboolean *param) - -gchar *get_ncpmount_command () +/** +* Return ncpmount command with options and mountpoint +* if length != NULL return length of ret string +*/ +gchar *get_ncpmount_command (gint *length) { GString *command; gchar *ret; @@ -155,6 +161,9 @@ gchar *get_ncpmount_command () if(cmd_params.mount_point != NULL) command = g_string_append (command, cmd_params.mount_point); + if(length != NULL) + *length = command->len; + ret = command->str; g_string_free(command, FALSE); |