Dolda2000 GitWeb
/
doldaconnect.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Nicer, recursive implementation of read-hl.
[doldaconnect.git]
/
config
/
util
/
dolconf.c
diff --git
a/config/util/dolconf.c
b/config/util/dolconf.c
index
52cffe1
..
7a8b2fa
100644
(file)
--- 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);
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--) {
buf[len] = 0;
*p = p2 + ((*p2 == '\"')?1:0);
for(p2 = buf; *p2; p2++, len--) {
@@
-739,11
+739,11
@@
int saveconfig(void)
{
struct cfvar *cv;
{
struct cfvar *cv;
+ cfw2conf();
if((cv = cfwvalid()) != NULL) {
msgbox(GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, cv->vld->invmsg, cv->rname);
return(-1);
}
if((cv = cfwvalid()) != NULL) {
msgbox(GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, cv->vld->invmsg, cv->rname);
return(-1);
}
- cfw2conf();
return(writeconfig());
}
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;
{
if(saveconfig())
return;
@@
-786,13
+786,13
@@
void cb_cfw_ok_activate(GtkWidget *widget, gpointer uudata)
state = -1;
}
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;
}
{
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;
{
if(saveconfig())
return;