- if (type)
- wo_printf(wc, "Content-type: %s\n\n", type);
-}
-
-int wo_puthtml (WCLIENT wc, char *name)
-{
- FILE *f;
- char ch;
-
- wo_clear(wc, "text/html");
- if (!(f = fopen(name, "r")))
- {
- wo_printf(wc, "<BR>Failed to open file: %s<BR>", name);
- return 0;
- }
- while (ch = getc(f), !feof(f))
- {
- if (wo_putc(wc, ch) < 0)
- {
- fclose(f);
- return -1;
- }
- }
- fclose(f);
- return 0;