test.c
- Code: Select all Expand view
- // build it doing: gcc test.c -otest
#include <stdio.h>
int main()
{
printf( "%s%s\n\n", "Content-Type:", "text/plain" );
printf( "%s\n", "Hello world from CGI" );
return 0;
}
You can test it on http://www.modharbour.org/cgi-bin/test
Execution speed: around 100ms
Now, using a small Harbour test:
testh.prg
- Code: Select all Expand view
- REQUEST HB_GT_STD_DEFAULT
REQUEST HB_GT_STD
function Main()
Test()
return nil
procedure HB_GTSYS
return
#pragma BEGINDUMP
#include <hbapi.h>
#include <stdio.h>
HB_FUNC( TEST )
{
printf( "%s%s\n\n", "Content-Type:", "text/plain" );
printf( "%s\n", "Hello world from CGI" );
}
#pragma ENDDUMP
You can test it on http://www.modharbour.org/cgi-bin/testh
Execution speed: around 130ms