Nuovo esempio (funzionante) e primo abbozzo delle spiegazioni delle fifo.
[gapil.git] / sources / BarCode.c
index fbea4aee3eb8a5fa8f1cbe83750c6d5ec42ed423..4164acf1b2392782a0d74808fefb5ea1d310057f 100644 (file)
@@ -29,7 +29,7 @@
  * 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 $ 
  *
  ****************************************************************/
 /* 
@@ -69,7 +69,6 @@ int main(int argc, char *argv[], char *envp[])
     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");
@@ -77,9 +76,9 @@ int main(int argc, char *argv[], char *envp[])
     }
     /* 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]));
     }