public CSVFile(string path) { _path = String.Copy(path); _nCols = 0; _firstCol = _lastCol = null; _file = new TDFile(path); }
/* TODO: need to rewrite getline() to support * unicode localization catalogues. Also would * be nice to support existing non-Unicode catalogues. */ public static String getline(TDFile fp) { throw new NotImplementedException(); //int i; //String buffpos; //bool notEOF; //if(!linebuff) { // maxline = 256; // linebuff = new String[maxline]; // if (!linebuff) // return null; //} //buffpos = linebuff; //i = maxline; //linebuff[maxline - 2] = 'n'; //while ((notEOF = fp.ReadLine(buffpos, i))) { // if(linebuff[maxline - 2] != 'n') { // i = maxline - 1; // maxline += 256; // linebuff = (String)realloc(linebuff, maxline); // Erik: Original code => realloc(linebuff , maxline * sizeof(linebuff[0])); // if (!linebuff) // return null; // buffpos = &linebuff[i]; // i = maxline - i; // linebuff[maxline - 2] = 'n'; // } else // break; //} //if(!notEOF) // return 0; //return linebuff; }