Index: trunk/ppImage/src/ppImageAddstar.c
===================================================================
--- trunk/ppImage/src/ppImageAddstar.c	(revision 8751)
+++ trunk/ppImage/src/ppImageAddstar.c	(revision 10144)
@@ -21,6 +21,6 @@
     pmFPAfile *file = psMetadataLookupPtr (&status, config->files, "PSASTRO.OUTPUT");
     if (!status) {
-	psError (PS_ERR_IO, true, "no PSASTRO.OUTPUT file defined");
-	return false;
+        psError (PS_ERR_IO, true, "no PSASTRO.OUTPUT file defined");
+        return false;
     }
 
@@ -30,8 +30,8 @@
     pmFPAview *view = pmFPAviewAlloc (0);
     if (file->fileLevel == PM_FPA_LEVEL_CHIP) {
-	// call addstar on this file
-	setFilename (file, view);
-	addstarFile (addstarCommand, file->filename);
-	return true;
+        // call addstar on this file
+        setFilename (file, view);
+        addstarFile (addstarCommand, file->filename);
+        return true;
     }
 
@@ -40,37 +40,37 @@
         if (!chip->process || !chip->file_exists) { continue; }
 
-	if (file->fileLevel == PM_FPA_LEVEL_CHIP) {
-	    // call addstar on this file
-	    setFilename (file, view);
-	    addstarFile (addstarCommand, file->filename);
-	    continue;
-	}
+        if (file->fileLevel == PM_FPA_LEVEL_CHIP) {
+            // call addstar on this file
+            setFilename (file, view);
+            addstarFile (addstarCommand, file->filename);
+            continue;
+        }
 
-	while ((cell = pmFPAviewNextCell (view, file->fpa, 1)) != NULL) {
-	    psLogMsg ("ppImageAddstar", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
-	    if (! cell->process || ! cell->file_exists) { continue; }
+        while ((cell = pmFPAviewNextCell (view, file->fpa, 1)) != NULL) {
+            psLogMsg ("ppImageAddstar", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
+            if (! cell->process || ! cell->file_exists) { continue; }
 
-	    if (file->fileLevel == PM_FPA_LEVEL_CELL) {
-		// call addstar on this file
-		setFilename (file, view);
-		addstarFile (addstarCommand, file->filename);
-		continue;
-	    }
+            if (file->fileLevel == PM_FPA_LEVEL_CELL) {
+                // call addstar on this file
+                setFilename (file, view);
+                addstarFile (addstarCommand, file->filename);
+                continue;
+            }
 
-	    // process each of the readouts
-	    while ((readout = pmFPAviewNextReadout (view, file->fpa, 1)) != NULL) {
-		if (! readout->data_exists) { continue; }
+            // process each of the readouts
+            while ((readout = pmFPAviewNextReadout (view, file->fpa, 1)) != NULL) {
+                if (! readout->data_exists) { continue; }
 
-		if (file->fileLevel == PM_FPA_LEVEL_READOUT) {
-		    // call addstar on this file
-		    setFilename (file, view);
-		    addstarFile (addstarCommand, file->filename);
-		    continue;
-		} else {
-		    psError (PS_ERR_IO, true, "inconsistent fileLevel for %s: %d\n", file->name, file->fileLevel);
-		    return false;
-		}
-	    }
-	}
+                if (file->fileLevel == PM_FPA_LEVEL_READOUT) {
+                    // call addstar on this file
+                    setFilename (file, view);
+                    addstarFile (addstarCommand, file->filename);
+                    continue;
+                } else {
+                    psError (PS_ERR_IO, true, "inconsistent fileLevel for %s: %d\n", file->name, file->fileLevel);
+                    return false;
+                }
+            }
+        }
     }
     return true;
@@ -90,10 +90,10 @@
     // indirect filenames are not allowed for output
     if (!strcasecmp (file->filename, "@FILES")) {
-	psError(PS_ERR_IO, true, "indirect filenames are not allowed for output : %s\n", file->name);
-	return false;
+        psError(PS_ERR_IO, true, "indirect filenames are not allowed for output : %s\n", file->name);
+        return false;
     }
     if (!strcasecmp (file->filename, "@DETDB")) {
-	psError(PS_ERR_IO, true, "detrend db filenames are not allowed for output : %s\n", file->name);
-	return false;
+        psError(PS_ERR_IO, true, "detrend db filenames are not allowed for output : %s\n", file->name);
+        return false;
     }
     return true;
@@ -104,11 +104,11 @@
     bool status;
     char *addstarLine = psStringSubstitute (addstarCommand, filename, "%s");
-	
+
     // catch addstar stderr/stdout and do what?
     psIOBuffer *buffer = psIOBufferAlloc (512);
     psPipe *pipe = psPipeOpen (addstarLine);
-    status = psIOBufferReadEmpty (buffer, 100, pipe->stdout);
+    status = psIOBufferReadEmpty (buffer, 100, pipe->fd_stdout);
     if (!status) {
-	psError (PS_ERR_IO, false, "detselect is not responding");
+        psError (PS_ERR_IO, false, "detselect is not responding");
     }
     psFree (addstarLine);
