Index: trunk/BNC/bncantex.cpp
===================================================================
--- trunk/BNC/bncantex.cpp	(revision 2881)
+++ trunk/BNC/bncantex.cpp	(revision 2882)
@@ -53,9 +53,14 @@
 ////////////////////////////////////////////////////////////////////////////
 bncAntex::~bncAntex() {
+  QMapIterator<QString, t_antMap*> it(_maps);
+  while (it.hasNext()) {
+    it.next();
+    delete it.value();
+  }
 }
 
 // 
 ////////////////////////////////////////////////////////////////////////////
-void bncAntex::readFile(const QString& fileName) {
+t_irc bncAntex::readFile(const QString& fileName) {
 
   QFile inFile(fileName);
@@ -66,5 +71,27 @@
   while ( !in.atEnd() ) {
     QString line = in.readLine();
+  
+    t_antMap* newMap = 0;
+    if      (line.indexOf("START OF ANTENNA") == 60) {
+      if (newMap) {
+        delete newMap;
+        return failure;
+      }
+      else {
+        newMap = new t_antMap();
+      }
+    } 
 
+    else if (line.indexOf("END OF ANTENNA") == 60) {
+      if (newMap) {
+        _maps[newMap->antName] = newMap;
+        newMap = 0;
+      }
+      else {
+        return failure;
+      }
+    }
   }
+
+  return success;
 }
Index: trunk/BNC/bncantex.h
===================================================================
--- trunk/BNC/bncantex.h	(revision 2881)
+++ trunk/BNC/bncantex.h	(revision 2882)
@@ -28,4 +28,5 @@
 #include <QtCore>
 #include <newmat.h>
+#include "bncconst.h"
 #include "bnctime.h"
 
@@ -34,5 +35,5 @@
   bncAntex();
   ~bncAntex();
-  void readFile(const QString& fileName);
+  t_irc readFile(const QString& fileName);
 
  private:
@@ -48,14 +49,22 @@
   class t_antMap {
    public:
-    QString  antName;
-    double   phaseCenterL1[3];
-    double   phaseCenterL2[3];
-    t_frqMap frqMapL1;
-    t_frqMap frqMapL2;
-    bncTime  validFrom;
-    bncTime  validTo;
+    t_antMap() {
+      frqMapL1 = 0;
+      frqMapL2 = 0;
+    }
+    ~t_antMap() {
+      delete frqMapL1;
+      delete frqMapL2;
+    }
+    QString   antName;
+    double    phaseCenterL1[3];
+    double    phaseCenterL2[3];
+    t_frqMap* frqMapL1;
+    t_frqMap* frqMapL2;
+    bncTime   validFrom;
+    bncTime   validTo;
   };
 
-  QMap<QString, t_antMap> _maps;
+  QMap<QString, t_antMap*> _maps;
 };
 
