[sword-cvs] sword/utilities vs2osisref.cpp,1.5,1.6
sword@www.crosswire.org
sword@www.crosswire.org
Tue, 15 Jul 2003 15:45:37 -0700
Update of /usr/local/cvsroot/sword/utilities
In directory www:/tmp/cvs-serv20480/utilities
Modified Files:
vs2osisref.cpp
Log Message:
no message
Index: vs2osisref.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/utilities/vs2osisref.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- vs2osisref.cpp 29 May 2003 23:15:29 -0000 1.5
+++ vs2osisref.cpp 15 Jul 2003 22:45:35 -0000 1.6
@@ -2,7 +2,6 @@
#include <fcntl.h>
#include <iostream>
#include <fstream>
-#include <string>
#ifndef __GNUC__
#include <io.h>
@@ -31,7 +30,7 @@
const char *convertToOSIS(const char *inRef, const SWKey *key) {
- static std::string outRef;
+ static SWBuf outRef;
outRef = "";
@@ -76,7 +75,8 @@
}
outRef+=buf;
}
- outRef+=startFrag;
+ if (startFrag < (inRef + strlen(inRef)))
+ outRef+=startFrag;
return outRef.c_str();
}
@@ -91,9 +91,8 @@
VerseKey verseKey;
int i = strlen(argv[1]) + 1;
char * verseString = new char[i];
- *verseString = 0;
- strcpy (verseString, argv[1]);
- verseString[i + 1] = 0;
+ strcpy (verseString, argv[1]);
+ verseString[i - 1] = 0;
if (argc > 2) {
verseKey = argv[2];