X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=sources%2FBarCode.c;h=6525889b1932eb92e1721a8f267c5f922e24dd17;hp=4164acf1b2392782a0d74808fefb5ea1d310057f;hb=f554a11afa7c50c2b0267e890fb7581b6605384d;hpb=2e715e70ba0df8224ec1bf118ba34a73a21df5c5 diff --git a/sources/BarCode.c b/sources/BarCode.c index 4164acf..6525889 100644 --- a/sources/BarCode.c +++ b/sources/BarCode.c @@ -29,7 +29,7 @@ * http://localhost/cgi-bin/barcode?string * where string is the code to be converted * - * $Id: BarCode.c,v 1.5 2002/06/28 21:07:21 piccardi Exp $ + * $Id: BarCode.c,v 1.6 2002/06/30 13:26:17 piccardi Exp $ * ****************************************************************/ /* @@ -48,8 +48,6 @@ #include #include"macros.h" -void WriteMess(char *mess); - /* Program begin */ int main(int argc, char *argv[], char *envp[]) @@ -78,18 +76,10 @@ int main(int argc, char *argv[], char *envp[]) pipein = popen("barcode", "w"); /* send barcode string to barcode program */ write(fileno(pipein), argv[1], strlen(argv[1])); + pclose(pipein); /* close all pipes (in reverse order) */ for (i=4; i==0; i--) { pclose((pipe[i])); } exit(0); } -/* - * Routine to produce an HTML error message on output - */ -void WriteMess(char *mess) -{ - printf("Content-type: text/html\n\n"); - perror(mess); - printf("
\n"); -}