aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/stream.cpp4
-rw-r--r--common/stream.h2
-rw-r--r--engines/sci/engine/kfile.cpp2
-rw-r--r--engines/sword2/resman.cpp2
-rw-r--r--engines/sword2/screen.cpp2
-rw-r--r--graphics/font.cpp2
-rw-r--r--test/common/stream.h14
7 files changed, 14 insertions, 14 deletions
diff --git a/common/stream.cpp b/common/stream.cpp
index 07ca37555d..6737eafc9c 100644
--- a/common/stream.cpp
+++ b/common/stream.cpp
@@ -94,7 +94,7 @@ enum {
CR = 0x0D
};
-char *SeekableReadStream::readLine_NEW(char *buf, size_t bufSize) {
+char *SeekableReadStream::readLine(char *buf, size_t bufSize) {
assert(buf != 0 && bufSize > 1);
char *p = buf;
size_t len = 0;
@@ -162,7 +162,7 @@ String SeekableReadStream::readLine() {
String line;
while (line.lastChar() != '\n') {
char buf[256];
- if (!readLine_NEW(buf, 256))
+ if (!readLine(buf, 256))
break;
line += buf;
}
diff --git a/common/stream.h b/common/stream.h
index 0c8eecb6e0..02d170132d 100644
--- a/common/stream.h
+++ b/common/stream.h
@@ -374,7 +374,7 @@ public:
* @param bufSize the size of the buffer
* @return a pointer to the read string, or NULL if an error occurred
*/
- virtual char *readLine_NEW(char *s, size_t bufSize);
+ virtual char *readLine(char *s, size_t bufSize);
/**
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 665142c90c..bd586e5565 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -224,7 +224,7 @@ static void fgets_wrapper(EngineState *s, char *dest, int maxsize, int handle) {
error("fgets_wrapper: Trying to read from file '%s' opened for writing", f->_name.c_str());
return;
}
- f->_in->readLine_NEW(dest, maxsize);
+ f->_in->readLine(dest, maxsize);
// The returned string must not have an ending LF
int strSize = strlen(dest);
if (strSize > 0) {
diff --git a/engines/sword2/resman.cpp b/engines/sword2/resman.cpp
index 330abf4adf..d8545d9c95 100644
--- a/engines/sword2/resman.cpp
+++ b/engines/sword2/resman.cpp
@@ -117,7 +117,7 @@ bool ResourceManager::init() {
char *buf = _resFiles[_totalClusters].fileName;
uint len = sizeof(_resFiles[_totalClusters].fileName);
- if (!file.readLine_NEW(buf, len))
+ if (!file.readLine(buf, len))
break;
int pos = strlen(buf);
diff --git a/engines/sword2/screen.cpp b/engines/sword2/screen.cpp
index 79818945dd..fb2e108b2f 100644
--- a/engines/sword2/screen.cpp
+++ b/engines/sword2/screen.cpp
@@ -977,7 +977,7 @@ void Screen::rollCredits() {
while (1) {
char buffer[80];
- char *line = f.readLine_NEW(buffer, sizeof(buffer));
+ char *line = f.readLine(buffer, sizeof(buffer));
if (line) {
// Replace invalid character codes prevent the 'dud'
diff --git a/graphics/font.cpp b/graphics/font.cpp
index ad478440a9..c6053e9eb3 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -524,7 +524,7 @@ int bdf_read_bitmaps(Common::SeekableReadStream &fp, NewFontData* pf) {
}
/* read the next non-comment line, returns buf or NULL if EOF*/
-// TODO: Can we use SeekableReadStream::readLine resp. readLine_NEW instead?
+// TODO: Can we use SeekableReadStream::readLine instead?
char *bdf_getline(Common::SeekableReadStream &fp, char *buf, int len) {
int c;
char *b;
diff --git a/test/common/stream.h b/test/common/stream.h
index 553bbe6c66..8f989009cd 100644
--- a/test/common/stream.h
+++ b/test/common/stream.h
@@ -10,18 +10,18 @@ class ReadLineStreamTestSuite : public CxxTest::TestSuite {
char buffer[100];
- TS_ASSERT_DIFFERS((char *)0, ms.readLine_NEW(buffer, sizeof(buffer)));
+ TS_ASSERT_DIFFERS((char *)0, ms.readLine(buffer, sizeof(buffer)));
TS_ASSERT_EQUALS(0, strcmp(buffer, "ab\n"));
- TS_ASSERT_DIFFERS((char *)0, ms.readLine_NEW(buffer, sizeof(buffer)));
+ TS_ASSERT_DIFFERS((char *)0, ms.readLine(buffer, sizeof(buffer)));
TS_ASSERT_EQUALS(0, strcmp(buffer, "\n"));
- TS_ASSERT_DIFFERS((char *)0, ms.readLine_NEW(buffer, sizeof(buffer)));
+ TS_ASSERT_DIFFERS((char *)0, ms.readLine(buffer, sizeof(buffer)));
TS_ASSERT_EQUALS(0, strcmp(buffer, "c\n"));
TS_ASSERT(!ms.eos());
- TS_ASSERT_EQUALS((char *)0, ms.readLine_NEW(buffer, sizeof(buffer)));
+ TS_ASSERT_EQUALS((char *)0, ms.readLine(buffer, sizeof(buffer)));
TS_ASSERT(ms.eos());
}
@@ -32,13 +32,13 @@ class ReadLineStreamTestSuite : public CxxTest::TestSuite {
char buffer[100];
- TS_ASSERT_DIFFERS((char *)0, ms.readLine_NEW(buffer, sizeof(buffer)));
+ TS_ASSERT_DIFFERS((char *)0, ms.readLine(buffer, sizeof(buffer)));
TS_ASSERT_EQUALS(0, strcmp(buffer, "ab\n"));
- TS_ASSERT_DIFFERS((char *)0, ms.readLine_NEW(buffer, sizeof(buffer)));
+ TS_ASSERT_DIFFERS((char *)0, ms.readLine(buffer, sizeof(buffer)));
TS_ASSERT_EQUALS(0, strcmp(buffer, "\n"));
- TS_ASSERT_DIFFERS((char *)0, ms.readLine_NEW(buffer, sizeof(buffer)));
+ TS_ASSERT_DIFFERS((char *)0, ms.readLine(buffer, sizeof(buffer)));
TS_ASSERT_EQUALS(0, strcmp(buffer, "c"));
TS_ASSERT(ms.eos());