From 4779eb63e4d412e772e494f843c1485b0718aaa4 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 21 Jul 2004 02:45:15 +0000 Subject: [PATCH] * Completed the "Internet Configuration" screen --- webcit/ChangeLog | 4 ++++ webcit/inetconf.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 00029866f..b99e6974f 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,7 @@ $Log$ +Revision 522.18 2004/07/21 02:45:15 ajc +* Completed the "Internet Configuration" screen + Revision 522.17 2004/07/16 19:13:37 ajc *** empty log message *** @@ -1983,3 +1986,4 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix + diff --git a/webcit/inetconf.c b/webcit/inetconf.c index c77b0a898..8858d5af2 100644 --- a/webcit/inetconf.c +++ b/webcit/inetconf.c @@ -139,7 +139,13 @@ void display_inetconf(void) wprintf("(Delete)\n"); } } - wprintf(" (add)\n"); + wprintf("
\n" + "" + "" + "", ic_keyword[which]); + wprintf("" + "" + "
\n"); do_template("endbox"); wprintf(""); if (which % 2 != 0) { @@ -158,8 +164,42 @@ void display_inetconf(void) void save_inetconf(void) { + char buf[SIZ]; + char ename[SIZ]; + char etype[SIZ]; + char newconfig[65536]; - strcpy(WC->ImportantMessage, "FIXME did we do anything?"); + strcpy(newconfig, ""); + serv_printf("CONF GETSYS|application/x-citadel-internet-config"); + serv_gets(buf); + if (buf[0] == '1') while (serv_gets(buf), strcmp(buf, "000")) { + extract(ename, buf, 0); + extract(etype, buf, 1); + if (strlen(buf) == 0) { + /* skip blank lines */ + } + else if ((!strcasecmp(ename, bstr("ename"))) + && (!strcasecmp(etype, bstr("etype"))) + && (!strcasecmp(bstr("oper"), "delete")) + ) { + sprintf(WC->ImportantMessage, "%s deleted.", ename); + } + else { + if (strlen(newconfig) > 0) strcat(newconfig, "\n"); + strcat(newconfig, buf); + } + } + serv_printf("CONF PUTSYS|application/x-citadel-internet-config"); + serv_gets(buf); + if (buf[0] == '4') { + serv_puts(newconfig); + if (!strcasecmp(bstr("oper"), "add")) { + serv_printf("%s|%s", bstr("ename"), bstr("etype") ); + sprintf(WC->ImportantMessage, "%s added.", bstr("ename")); + } + serv_puts("000"); + } + display_inetconf(); } -- 2.30.2