Close outfile *after* the last output is done...
authorPeter Verthez <Peter.Verthez@advalvas.be>
Sat, 21 Sep 2002 20:14:46 +0000 (20:14 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Sat, 21 Sep 2002 20:14:46 +0000 (20:14 +0000)
t/standalone.c

index 3f149c0d1a021e5590eed04f2b35e8eafc7b5ad3..fdf26611000dffbda46cc905e22d8b54922d2956 100644 (file)
@@ -313,13 +313,12 @@ int main(int argc, char* argv[])
     output(0, "\n=== Parsing file %s\n", file_name);
     result |= gedcom_parse_file(file_name);
   }
-  fclose(outfile);
   if (result == 0) {
     output(1, "Parse succeeded\n");
-    return 0;
   }
   else {
     output(1, "Parse failed\n");
-    return 1;
-  }  
+  }
+  fclose(outfile);
+  return result;
 }