X-Git-Url: http://git.dolda2000.com/gitweb/?p=doldaconnect.git;a=blobdiff_plain;f=config%2Futil%2Fdolconf.c;h=7a8b2fa87f545ddc080fe495271e7f004cde63c7;hp=52cffe11d75b59fd703ede03b7bc799e58db7722;hb=42aa110f8f5706c799ff96df0ed4b41327c70b26;hpb=5668485ca093b3ae72eccca01fcfe06fbe338dae diff --git a/config/util/dolconf.c b/config/util/dolconf.c index 52cffe1..7a8b2fa 100644 --- a/config/util/dolconf.c +++ b/config/util/dolconf.c @@ -233,7 +233,7 @@ char *getword(char **p) p2 = *p + strlen(*p); len = p2 - *p - ((*p2 == '\"')?1:0); buf = smalloc(len + 1); - memcpy(buf, *p, len); + memcpy(buf, *p + ((delim == '\"')?1:0), len); buf[len] = 0; *p = p2 + ((*p2 == '\"')?1:0); for(p2 = buf; *p2; p2++, len--) { @@ -739,11 +739,11 @@ int saveconfig(void) { struct cfvar *cv; + cfw2conf(); if((cv = cfwvalid()) != NULL) { msgbox(GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, cv->vld->invmsg, cv->rname); return(-1); } - cfw2conf(); return(writeconfig()); } @@ -777,7 +777,7 @@ void cb_cfw_quit_activate(GtkWidget *widget, gpointer uudata) } */ -void cb_cfw_ok_activate(GtkWidget *widget, gpointer uudata) +void cb_cfw_ok_clicked(GtkWidget *widget, gpointer uudata) { if(saveconfig()) return; @@ -786,13 +786,13 @@ void cb_cfw_ok_activate(GtkWidget *widget, gpointer uudata) state = -1; } -void cb_cfw_cancel_activate(GtkWidget *widget, gpointer uudata) +void cb_cfw_cancel_clicked(GtkWidget *widget, gpointer uudata) { gtk_main_quit(); state = -1; } -void cb_cfw_apply_activate(GtkWidget *widget, gpointer uudata) +void cb_cfw_apply_clicked(GtkWidget *widget, gpointer uudata) { if(saveconfig()) return;