summaryrefslogtreecommitdiff
path: root/utilities/stepdump.cpp
diff options
context:
space:
mode:
authorRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:53:49 -0400
committerRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:53:49 -0400
commit8c8aa6b07e595cfac56838b5964ab3e96051f1b2 (patch)
treeda38e2c1979148dbd3b0c7b87f930746f5ba7f44 /utilities/stepdump.cpp
parent8d3fc864d094eeadc721f8e93436b37a5fab173e (diff)
Imported Upstream version 1.5.7
Diffstat (limited to 'utilities/stepdump.cpp')
-rw-r--r--utilities/stepdump.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/utilities/stepdump.cpp b/utilities/stepdump.cpp
index d52600a..e13a826 100644
--- a/utilities/stepdump.cpp
+++ b/utilities/stepdump.cpp
@@ -1,8 +1,13 @@
-#include <iostream.h>
+#include <iostream>
#include <string>
#include <fcntl.h>
+
+#ifndef __GNUC__
+#include <io.h>
+#else
#include <unistd.h>
+#endif
#include <lzsscomprs.h>
@@ -12,6 +17,9 @@
using namespace std;
+#ifndef NO_SWORD_NAMESPACE
+using namespace sword;
+#endif
typedef struct {
short versionRecordSize;
@@ -163,8 +171,9 @@ void readVersion(int fd, Version *versionRecord) {
if (skip) {
cout << "\nSkipping " << skip << " unknown bytes.\n";
- char skipbuf[skip];
+ char *skipbuf = new char[skip];
read(fd, skipbuf, skip);
+ delete [] skipbuf;
}
}
@@ -196,8 +205,9 @@ void readViewableHeader(int fd, ViewableHeader *viewableHeaderRecord) {
if (skip) {
cout << "\nSkipping " << skip << " unknown bytes.\n";
- char skipbuf[skip];
+ char *skipbuf = new char[skip];
read(fd, skipbuf, skip);
+ delete [] skipbuf;
}
}