Index: util/cgi_common.sh =================================================================== --- util/cgi_common.sh (revision 27859) +++ util/cgi_common.sh (revision 27860) @@ -64,6 +64,8 @@ cgi_png() { + local fptmp + echo "#$fp_full#" > /tmp/L13 echo "Content-type: image/png" echo "" cparm="" @@ -79,10 +81,10 @@ then annot=$QS_annotation fi - if test ! -z "$QS_diamond" - then - cparm="$cparm --diamond" - fi +# if test ! -z "$QS_diamond" +# then +# cparm="$cparm --diamond" +# fi if test ! -z "$QS_photo" then cparm="$cparm --photo" @@ -114,5 +116,9 @@ then cparm="$cparm --annotation $annot" fi - (echo "$fptext" | $fp2anim $cparm; echo 'screenshot "/dev/stdout"') | $animator -H $animarg + + fptmp=`mktemp` + $fp2preview --outfile $fptmp $cparm "$fp_full" >/dev/null 2>&1 + cat $fptmp + rm $fptmp } Index: util/pcblib-param.cgi =================================================================== --- util/pcblib-param.cgi (revision 27859) +++ util/pcblib-param.cgi (revision 27860) @@ -3,6 +3,9 @@ ulimit -t 5 ulimit -v 80000 +export HOME=/tmp +cd /tmp + # read the config . /etc/pcblib.cgi.conf CGI=$CGI_param @@ -10,11 +13,11 @@ # import the lib . $pcb_rnd_util/cgi_common.sh + gen() { cd $gendir - params=`echo $QS_cmd | sed "s/.*[(]//;s/[)]//" ` - ./$gen "$params" + ./$gen "$fp_params" } help_params() @@ -342,6 +345,8 @@ exit fi +fp_params=`echo $QS_cmd | sed "s/.*[(]//;s/[)]//" ` +export fp_full="$gen($fp_params)" fptext=`gen` if test ! "$?" = 0 then