about summary refs log tree commit diff
path: root/converter/other/pnmtops.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-05-27 19:44:34 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-05-27 19:44:34 +0000
commitda4bc5f31a30819ca618732b3d0a4ed63b9d51ef (patch)
tree1c9f41f4b4248b10dfa8d1e88a1d4e985d55e417 /converter/other/pnmtops.c
parentdca8d4d3005f51eeffe2cdf35792c26b95f27dae (diff)
downloadnetpbm-mirror-da4bc5f31a30819ca618732b3d0a4ed63b9d51ef.tar.gz
netpbm-mirror-da4bc5f31a30819ca618732b3d0a4ed63b9d51ef.tar.xz
netpbm-mirror-da4bc5f31a30819ca618732b3d0a4ed63b9d51ef.zip
move comment
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1913 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/pnmtops.c')
-rw-r--r--converter/other/pnmtops.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/converter/other/pnmtops.c b/converter/other/pnmtops.c
index ef0f2afe..1cf23be7 100644
--- a/converter/other/pnmtops.c
+++ b/converter/other/pnmtops.c
@@ -1884,6 +1884,21 @@ convertRaster(struct pam * const inpamP,
 
 
 
+/* FILE MANAGEMENT: File management is pretty hairy here.  A filter, which
+   runs in its own process, needs to be able to cause its output file to
+   close because it might be an internal pipe and the next stage needs to
+   know output is done.  So the forking process must close its copy of the
+   file descriptor.  BUT: if the output of the filter is not an internal
+   pipe but this program's output, then we don't want it closed when the
+   filter terminates because we'll need it to be open for the next image
+   the program converts (with a whole new chain of filters).
+   
+   To prevent the progam output file from getting closed, we pass a
+   duplicate of it to spawnFilters() and keep the original open.
+*/
+
+
+
 static void
 convertPage(FILE *       const ifP, 
             int          const turnflag, 
@@ -1969,19 +1984,6 @@ convertPage(FILE *       const ifP,
     initOutputEncoder(&oe, inpam.width, bitsPerSample,
                       rle, flate, ascii85, psFilter);
 
-    /* FILE MANAGEMENT: File management is pretty hairy here.  A filter, which
-       runs in its own process, needs to be able to cause its output file to
-       close because it might be an internal pipe and the next stage needs to
-       know output is done.  So the forking process must close its copy of the
-       file descriptor.  BUT: if the output of the filter is not an internal
-       pipe but this program's output, then we don't want it closed when the
-       filter terminates because we'll need it to be open for the next image
-       the program converts (with a whole new chain of filters).
-
-       To prevent the progam output file from getting closed, we pass a
-       duplicate of it to spawnFilters() and keep the original open.
-    */
-
     fflush(stdout);
     filterChainOfP = fdopen(dup(fileno(stdout)), "w");
         /* spawnFilters() closes this.  See FILE MANAGEMENT above */