Index: /trunk/BNC/bncrinex.cpp
===================================================================
--- /trunk/BNC/bncrinex.cpp	(revision 297)
+++ /trunk/BNC/bncrinex.cpp	(revision 298)
@@ -40,4 +40,6 @@
  * -----------------------------------------------------------------------*/
 
+#include <iostream.h>
+
 #include <stdlib.h>
 
@@ -55,4 +57,5 @@
 #include "bncutils.h"
 #include "bncconst.h"
+#include "bnctabledlg.h"
 #include "RTCM3/rtcm3torinex.h"
 
@@ -97,4 +100,38 @@
       if (_headerLines.last().indexOf("END OF HEADER") != -1) {
         break;
+      }
+    }
+  }
+
+  // Try to download the skeleton file
+  // ---------------------------------
+  else {
+    QStringList table;
+    bncTableDlg::getFullTable(_mountPoint.host(), _mountPoint.port(), 
+                              table, false);
+    QString net;
+    QStringListIterator it(table);
+    while (it.hasNext()) {
+      QString line = it.next();
+      if (line.indexOf("STR") == 0) {
+        QStringList tags = line.split(";");
+        if (tags.at(1) == _mountPoint.path().mid(1).toAscii()) {
+          net = tags.at(7);
+          break;
+        }
+      }
+    }
+    QString sklDir;
+    it.toFront();
+    while (it.hasNext()) {
+      QString line = it.next();
+      if (line.indexOf("NET") == 0) {
+        QStringList tags = line.split(";");
+        if (tags.at(1) == net) {
+          sklDir = tags.at(6);
+          cout << _mountPoint.path().mid(1).toAscii().data() << " "
+               << sklDir.toAscii().data() << endl;
+          break;
+        }          
       }
     }
Index: /trunk/BNC/bnctabledlg.cpp
===================================================================
--- /trunk/BNC/bnctabledlg.cpp	(revision 297)
+++ /trunk/BNC/bnctabledlg.cpp	(revision 298)
@@ -119,5 +119,13 @@
 ////////////////////////////////////////////////////////////////////////////
 t_irc bncTableDlg::getFullTable(const QString& casterHost, 
-                                int casterPort, QStringList& allLines) {
+                                int casterPort, QStringList& allLines,
+                                bool alwaysRead) {
+
+  static QMap<QString, QStringList> allTables;
+
+  if (!alwaysRead && allTables.find(casterHost) != allTables.end()) {
+    allLines = allTables.find(casterHost).value();
+    return success;
+  }
 
   allLines.clear();
@@ -168,4 +176,5 @@
   delete socket;
 
+  allTables.insert(casterHost, allLines);
   return success;
 }
