* 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 $
*
****************************************************************/
/*
#include <time.h>
#include"macros.h"
-void WriteMess(char *mess);
-
/* Program begin */
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("<br>\n");
-}