Index: trunk/ppMerge/src/ppMerge.h
===================================================================
--- trunk/ppMerge/src/ppMerge.h	(revision 18839)
+++ trunk/ppMerge/src/ppMerge.h	(revision 18967)
@@ -15,5 +15,5 @@
 #define TIMERNAME "ppMerge"             // Name for timer
 #define PPMERGE_RECIPE "PPMERGE"        // Recipe name
-#define THREADED 1
+#define THREADED 1                      // Compile with threads?
 
 // Type of frame to merge
@@ -35,10 +35,13 @@
 } ppMergeFiles;
 
+// Group of files to read
+//
+// Each file contributes a readout, into which is read a chunk from that file
 typedef struct {
-    psArray *readouts;
-    bool read;
-    bool busy;
-    int firstScan;
-    int lastScan;
+    psArray *readouts;                  // Input readouts
+    bool read;                          // Has the scan been read?
+    bool busy;                          // Is the scan being processed?
+    int firstScan;                      // First row of the chunk to be read for this group
+    int lastScan;                       // Last row of the chunk to be read for this group
 } ppMergeFileGroup;
 
@@ -101,9 +104,16 @@
 
 
-ppMergeFileGroup *ppMergeFileGroupAlloc();
-ppMergeFileGroup *ppMergeReadChunk (bool *status, psArray *fileGroups, pmConfig *config, int numChunk);
-void *ppMergeThreadLauncher (void *data);
+// Allocator for group of files
+ppMergeFileGroup *ppMergeFileGroupAlloc(void);
 
-bool ppMergeSetThreads ();
+// Read chunk into the first available file group
+ppMergeFileGroup *ppMergeReadChunk(bool *status, // Status of read
+                                   psArray *fileGroups, // All groups
+                                   pmConfig *config, // Configuration
+                                   int numChunk // Chunk number (only for interest)
+    );
+
+// Set up thread handling
+bool ppMergeSetThreads(void);
 
 #endif
