home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spezial / SPEZIAL2_97.zip / SPEZIAL2_97.iso / ANWEND / ONLINE / HYPERMAI / HYPERMAI.ZIP / libcgi / syn_mime.c < prev    next >
C/C++ Source or Header  |  1994-07-28  |  588b  |  30 lines

  1. /*
  2.  * This file is part of the LIBCGI library
  3.  *
  4.  * Copyright 1994 by Enterprise Integration Technologies Corporation
  5.  *
  6.  * This is freeware with commercialization rights reserved; see the
  7.  * LICENSE included in the distribution for specifics.
  8.  */
  9.  
  10. #include <stdio.h>
  11. #include "cgi.h"
  12.  
  13. int syn_mimeheader(buf, ct)
  14.      char *buf;
  15.      char *ct;
  16. {
  17.   int x;
  18.  
  19.   if (buf && ct) {
  20.     x = (int) sprintf(buf, "Content-Type: %s\n\n", ct);
  21.     return (x && x != EOF);
  22.   } else return 0;
  23. }
  24.  
  25. int print_mimeheader(ct)
  26.      char *ct;
  27. {
  28.   return (ct && (printf("Content-Type: %s\n\n", ct) != EOF));
  29. }
  30.