Soft linebreaks are soft, hard linebreaks are hard. No indentation.
$Log$
+Revision 211.11 2000/03/31 03:48:52 ajc
+* text_to_server() now behaves the way web users expect text entry to work.
+ Soft linebreaks are soft, hard linebreaks are hard. No indentation.
+
Revision 211.10 2000/03/31 02:39:06 ajc
* Fixed bugs in "Site configuration" and added new fields.
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
wprintf("<EM>%s</EM><BR>\n", &buf[4]);
goto DONE;
}
- wprintf("<CENTER>Enter message below. Messages are formatted to\n");
- wprintf("the <EM>reader's</EM> screen width. To defeat the\n");
- wprintf("formatting, indent a line at least one space. \n");
- wprintf("<BR>");
now = time(NULL);
tm = (struct tm *) localtime(&now);
while (ptr[pos] != 0) {
ch = ptr[pos++];
if (ch == 10) {
- while (isspace(buf[strlen(buf) - 1]))
+ while ( (isspace(buf[strlen(buf) - 1]))
+ && (strlen(buf) > 1) )
buf[strlen(buf) - 1] = 0;
serv_puts(buf);
strcpy(buf, "");
+ if (ptr[pos] != 0) strcat(buf, " ");
} else {
a = strlen(buf);
buf[a + 1] = 0;