Merge branches/fastlib-armadillo/fastlib/file into fastlib-stl/fastlib/file
(breaks build until I merge data/, in just a moment)
This commit is contained in:
@@ -108,6 +108,7 @@ void TextLineReader::Error(const char *format, ...) {
|
||||
|
||||
success_t TextLineReader::Open(const char *fname) {
|
||||
f_ = fopen(fname, "r");
|
||||
fname_ = strncpy(new char[strlen(fname) + 1], fname, strlen(fname) + 1);
|
||||
line_num_ = 0;
|
||||
has_line_ = false;
|
||||
fname_ = fname;
|
||||
|
||||
@@ -46,14 +46,10 @@
|
||||
|
||||
#include "../base/base.h"
|
||||
|
||||
#include <string>
|
||||
#include <cstdio>
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
/**
|
||||
* Helper for reading text files.
|
||||
*
|
||||
@@ -100,15 +96,15 @@ class TextLineReader {
|
||||
(void)fclose(f_);
|
||||
f_ = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Return the name of the file we are working with.
|
||||
* This will return NULL if no file has been opened yet.
|
||||
*/
|
||||
const char *filename() const {
|
||||
return fname_.c_str();
|
||||
return fname_;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Are there more lines left?
|
||||
*/
|
||||
@@ -251,7 +247,6 @@ class TextTokenizer {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
bool MatchNoCase(const char *str) {
|
||||
if (next_.EqualsNoCase(str)) {
|
||||
Gobble();
|
||||
@@ -260,7 +255,6 @@ class TextTokenizer {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
bool MatchInteger() {
|
||||
return MatchType(INTEGER);
|
||||
|
||||
Reference in New Issue
Block a user