#!/usr/bin/perl -w

################################################################
# SingleChart.pl 
# generate a chart in HTTP response format, i.e. it contains HTTP
# mime header and the image binary data.
################################################################

require("./cgi-lib.pl") ||  die "can't locate cgi-lib.pl";
require("./share-lib.pl") ||  die "can't locate share-lib.pl";

&ReadParse(*para);
$| = 1;
#&checkSCode;
foreach $name ( keys(%para) ) {
	push(@query, "$name=$para{$name}");
}
$comline = join("\\\&", @query);
#print $comline;
# generate the chart by calling 'gifChart'
system("./gifChart $comline");
