File: testload.c

package info (click to toggle)
libecgi 0.6.2-2.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,004 kB
  • ctags: 307
  • sloc: ansic: 1,781; makefile: 126; sh: 13; xml: 7
file content (30 lines) | stat: -rw-r--r-- 572 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <stdio.h>
#include <stdlib.h>
#include "ecgi.h"

int main()
{
	int i=0;
	extern char **environ;

	setvbuf(stdout, NULL, _IOLBF, 0);
	setvbuf(stderr, NULL, _IOLBF, 0);

	printf("Content-Type: text/html\n\n<html><body><pre>\n");
	
	printf("loading data from /tmp/ecgitstdump\n");
	cgiLoadDebugData("/tmp/ecgitstdump");
	printf("loading done\n");
	listDump();
	printf("dump done!\n");

	cgi_done();

	printf("Free'd all Test complete! cgi lib working!\n");
	
	printf("Dumping environment:\n");
	while(environ[i]!=NULL)
		printf("%s\n", environ[i++]);
	
	return(0);
}