* http://localhost/cgi-bin/barcode?string
* where string is the code to be converted
*
- * $Id: BarCode.c,v 1.4 2002/06/28 17:59:24 piccardi Exp $
+ * $Id: BarCode.c,v 1.5 2002/06/28 21:07:21 piccardi Exp $
*
****************************************************************/
/*
int i;
/* write mime-type to stout */
write(STDOUT_FILENO, content, strlen(content));
-
/* execute chain of command */
for (i=0; i<4; i++) {
pipe[i] = popen(cmd_string[i], "w");
}
/* create barcode (in PS) */
pipein = popen("barcode", "w");
- /* send barcode string */
+ /* send barcode string to barcode program */
write(fileno(pipein), argv[1], strlen(argv[1]));
- /* close all pipes */
+ /* close all pipes (in reverse order) */
for (i=4; i==0; i--) {
pclose((pipe[i]));
}