int cgistarthdrs(cp, type)
cgistarthdrs() function is called to start printing the
HTTP headers for the CGI program's output. As it begins the headers,
it must be called before any other output is printed. The
parameter is a string indicating what
Content-Type should be
printed; it defaults to
CHARPN is given.
Further headers (if any) can be printed after the
cgiendhdrs() function is called after all headers are
printed, and before the CGI program's document content is printed; it
prints a newline to indicate the end of headers. Both
cgiendhdrs() return 1 if successful
and 0 on error.
Even if a given CGI program doesn't make use of HTTP headers directly, it should still call
cgiendhdrs(). Among other things, this will allow the state
variables set with
putcgi() to be sent/saved; otherwise they
may be lost.