--- a/2da.cpp
+++ b/2da.cpp
@@ -81,6 +81,13 @@
   }
   while(1);
   return 0;
+}
+
+void SetupReader(int max)
+{
+  xorflag=0;
+  position=0;
+  maxlength=max;
 }
 
 int read_string(FILE *fpoi, char *pattern, char *tmpbuff=NULL, int length=0)