/* $Id$ */
+#include <ctype.h>
#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <stdio.h>
+#include <fcntl.h>
#include <signal.h>
#include <sys/types.h>
-#include <ctype.h>
+#include <sys/wait.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <limits.h>
+#include <netinet/in.h>
+#include <netdb.h>
#include <string.h>
+#include <pwd.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <pthread.h>
+#include <signal.h>
#include "webcit.h"
-#include "child.h"
+
/*
* display the form for paging (x-messaging) another user
char buf[256];
char user[256];
- printf("HTTP/1.0 200 OK\n");
output_headers(1);
wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=007700><TR><TD>");
char sc[256];
char buf[256];
- printf("HTTP/1.0 200 OK\n");
output_headers(1);
strcpy(recp, bstr("recp"));
if (strcmp(sc, "Send message")) {
wprintf("<EM>Message was not sent.</EM><BR>\n");
- return;
- }
- serv_printf("SEXP %s|%s", recp, msgtext);
- serv_gets(buf);
-
- if (buf[0] == '2') {
- wprintf("<EM>Message has been sent to ");
- escputs(recp);
- wprintf(".</EM><BR>\n");
} else {
- wprintf("<EM>%s</EM><BR>\n", &buf[4]);
+ serv_printf("SEXP %s|%s", recp, msgtext);
+ serv_gets(buf);
+
+ if (buf[0] == '2') {
+ wprintf("<EM>Message has been sent to ");
+ escputs(recp);
+ wprintf(".</EM><BR>\n");
+ } else {
+ wprintf("<EM>%s</EM><BR>\n", &buf[4]);
+ }
}
-
wDumpContent(1);
}
void do_chat(void)
{
- printf("HTTP/1.0 200 OK\n");
output_headers(1);
wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=000077><TR><TD>");
wprintf("<applet codebase=\"/static\" ");
wprintf("code=\"wcchat\" width=2 height=2>\n");
- wprintf("<PARAM NAME=username VALUE=\"%s\">\n", wc_username);
- wprintf("<PARAM NAME=password VALUE=\"%s\">\n", wc_password);
+ wprintf("<PARAM NAME=username VALUE=\"%s\">\n", WC->wc_username);
+ wprintf("<PARAM NAME=password VALUE=\"%s\">\n", WC->wc_password);
wprintf("<H2>Oops!</H2>Looks like your browser doesn't support Java, ");
wprintf("so you won't be able to access Chat. Sorry.\n");
wprintf("</applet>\n");