Misc. updates to get a clean make on Linux. A bit of
[catagits/fcgi2.git] / examples / tiny-cgi.c
1 /* 
2  * tiny-cgi.c --
3  *
4  *      CGI example program
5  *
6  *
7  * Copyright (c) 1996 Open Market, Inc.
8  *
9  * See the file "LICENSE.TERMS" for information on usage and redistribution
10  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11  *
12  */
13
14 #ifndef lint
15 static const char rcsid[] = "$Id: tiny-cgi.c,v 1.1 1997/09/16 15:36:28 stanleyg Exp $";
16 #endif /* not lint */
17
18 #include <stdio.h>
19 #include <stdlib.h>
20
21 void main(void)
22 {
23     int count = 0;
24     printf("Content-type: text/html\r\n"
25            "\r\n"
26            "<title>CGI Hello!</title>"
27            "<h1>CGI Hello!</h1>"
28            "Request number %d running on host <i>%s</i>\n",
29            ++count, getenv("SERVER_NAME"));
30 }