switch (a) {
case 0:
serv_info.serv_pid = atoi(buf);
+ WC->ctdl_pid = serv_info.serv_pid;
break;
case 1:
strcpy(serv_info.serv_nodename, buf);
if (!strcmp(buf, "000")) {
if (bq == 1)
wprintf("</I>");
- wprintf("</DIV><BR>\n");
+ wprintf("</DIV><br />\n");
return;
}
if ((intext == 1) && (isspace(buf[0]))) {
- wprintf("<BR>");
+ wprintf("<br />");
}
intext = 1;
/* Quoted text should be displayed in italics and in a
- * different colour. This code understands both Citadel/UX
- * style " >" quotes and FordBoard-style " :-)" quotes.
+ * different colour. This code understands Citadel-style
+ * " >" quotes and will convert to <BLOCKQUOTE> tags.
*/
- if ((bq == 0) &&
- ((!strncmp(buf, " >", 2)) || (!strncmp(buf, " :-)", 4)))) {
- wprintf("<SPAN CLASS=\"pull_quote\">");
+ if ((bq == 0) && (!strncmp(buf, " >", 2))) {
+ wprintf("<BLOCKQUOTE>");
bq = 1;
- } else if ((bq == 1) &&
- (strncmp(buf, " >", 2)) && (strncmp(buf, " :-)", 4))) {
- wprintf("</SPAN>");
+ } else if ((bq == 1) && (strncmp(buf, " >", 2))) {
+ wprintf("</BLOCKQUOTE>");
bq = 0;
}
+ if ((bq == 1) && (!strncmp(buf, " >", 2))) {
+ strcpy(buf, &buf[2]);
+ }
/* Activate embedded URL's */
url(buf);
void text_to_server(char *ptr, int convert_to_html)
{
char buf[SIZ];
+ char conv[4];
int ch, a, pos;
- if (convert_to_html) {
- serv_puts("<HTML><BODY>");
- }
-
pos = 0;
strcpy(buf, "");
serv_puts(buf);
strcpy(buf, "");
if (convert_to_html) {
- strcat(buf, "<BR>");
+ strcat(buf, "<br />");
}
else {
if (ptr[pos] != 0) strcat(buf, " ");
}
+ } else if ((convert_to_html)&&(strchr("#&;`'|*?-~<>^()[]{}$\\", ch) != NULL)) {
+ sprintf(conv, "%c", ch);
+ stresc(&buf[strlen(buf)], conv, 0, 0);
} else {
a = strlen(buf);
buf[a + 1] = 0;
}
serv_puts(buf);
- if (convert_to_html) {
- serv_puts("</BODY></HTML>\n");
- }
-
}