[Evaluate command line a bit and load a file if given
Andreas Röver <roever@users.sourceforge.net>**20041204154240]  < > {
hunk ./src/gui/MainWindow.cpp 313
-  mainWindow->show(argn, argv);
+  mainWindow->show();
+
+  if (argn == 2) {
+
+    ifstream instr(argv[1]);
+
+    puzzle_c * p2 = new puzzle_c(&instr);
+
+    if (!p2) {
+      fl_alert("Could not load file, maybe not a puzzle?");
+    } else {
+      if (fname) delete [] fname;
+      fname = new char[strlen(argv[1])+1];
+      strcpy(fname, argv[1]);
+
+      char nm[300];
+      snprintf(nm, 299, "BurrTools - %s", fname);
+      mainWindow->label(nm);
+
+      delete puzzle;
+      puzzle = p2;
+
+      activatePiece(0);
+      PcSel2->setPuzzle(puzzle);
+      TaskSelectionTab->value(TabPieces);
+
+      removeAssmThread();
+
+      changed = false;
+    }
+  }
}
