[sword-svn] r1827 - trunk/utilities
dglassey at crosswire.org
dglassey at crosswire.org
Fri Jun 10 06:21:34 MST 2005
Author: dglassey
Date: 2005-06-10 06:21:34 -0700 (Fri, 10 Jun 2005)
New Revision: 1827
Modified:
trunk/utilities/imp2vs.cpp
Log:
clean up some commented code
Modified: trunk/utilities/imp2vs.cpp
===================================================================
--- trunk/utilities/imp2vs.cpp 2005-06-10 13:18:21 UTC (rev 1826)
+++ trunk/utilities/imp2vs.cpp 2005-06-10 13:21:34 UTC (rev 1827)
@@ -7,16 +7,7 @@
#include <fstream>
using namespace std;
-#if 0
-#ifndef __GNUC__
-#include <io.h>
-#else
-#include <unistd.h>
-#endif
-#endif
-
#include <iostream>
-#include <string>
#include <rawtext.h>
@@ -26,27 +17,6 @@
using sword::SWText;
using sword::ListKey;
#endif
-#if 0
-int readline(FILE* infile, string &linebuffer) {
- signed char c;
- int lbPtr = 0;
- linebuffer = string(1048576,' ');
- while ((c = fgetc(infile)) != EOF) {
- if(lbPtr < linebuffer.size())
- linebuffer[lbPtr++] = c;
- else {
- linebuffer.resize(linebuffer.size()+1048576);
- linebuffer[lbPtr++] = c;
- }
- //lbPtr++;
- if (c == 10) {
- linebuffer.resize(lbPtr);
- return (linebuffer.size());
- }
- }
- return 0;
-}
-#endif
int main(int argc, char **argv) {
@@ -70,7 +40,6 @@
}
ifstream infile(argv[1]);
- //infile = argv[1], "r");
SWText* mod;
RawText::createModule(modname.c_str());
@@ -86,7 +55,6 @@
getline(infile,linebuffer);
final = (!infile.eof()) + 1;
- //final = ((bool)(readline(infile, linebuffer)) + 1);
while (final) {
if (linebuffer.substr(0,3) == "$$$" || final == 1) {
@@ -159,7 +127,6 @@
}
}
}
- //linebuffer.resize(linebuffer.size()-1);
keybuffer = linebuffer.substr(3,linebuffer.size()) ;
entbuffer.resize(0);
}
@@ -170,13 +137,8 @@
if (final) {
getline(infile,linebuffer);
final = (!infile.eof()) + 1;
- //final = ((bool)(readline(infile, linebuffer)) + 1);
}
}
- //delete entbuffer;
- //delete linebuffer;
- //delete keybuffer;
-
return 0;
}
More information about the sword-cvs
mailing list