summaryrefslogtreecommitdiff
path: root/src/modules/filters/utf8latin1.cpp
diff options
context:
space:
mode:
authorRoberto C. Sanchez <roberto@connexer.com>2014-05-12 08:21:30 -0400
committerRoberto C. Sanchez <roberto@connexer.com>2014-05-12 08:21:30 -0400
commit7a00574163029c0c2b649878c95d5acbd083564a (patch)
treec13cc5736025834df2874ed87ee8598070025ea6 /src/modules/filters/utf8latin1.cpp
parentb745315323de9f27538edac9453205ca70e6186e (diff)
Imported Upstream version 1.7.2+dfsg
Diffstat (limited to 'src/modules/filters/utf8latin1.cpp')
-rw-r--r--src/modules/filters/utf8latin1.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/filters/utf8latin1.cpp b/src/modules/filters/utf8latin1.cpp
index 25df0c1..1bf8d3b 100644
--- a/src/modules/filters/utf8latin1.cpp
+++ b/src/modules/filters/utf8latin1.cpp
@@ -1,10 +1,10 @@
/******************************************************************************
*
- * UTF8Latin1 - SWFilter descendant to convert UTF-8 to Latin-1
+ * utf8latin1.cpp - SWFilter descendant to convert UTF-8 to Latin-1
*
+ * $Id: utf8latin1.cpp 2980 2013-09-14 21:51:47Z scribe $
*
- *
- * Copyright 2009 CrossWire Bible Society (http://www.crosswire.org)
+ * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
* P. O. Box 2528
* Tempe, AZ 85280-2528
@@ -26,8 +26,10 @@
#include <utf8latin1.h>
#include <swbuf.h>
+
SWORD_NAMESPACE_START
+
UTF8Latin1::UTF8Latin1(char rchar) : replacementChar(rchar) {
}
@@ -36,14 +38,12 @@ char UTF8Latin1::processText(SWBuf &text, const SWKey *key, const SWModule *modu
{
unsigned char *from;
- int len;
unsigned long uchar;
unsigned char significantFirstBits, subsequent;
if ((unsigned long)key < 2) {// hack, we're en(1)/de(0)ciphering
return (char)-1;
}
- len = strlen(text.c_str()) + 1; // shift string to right of buffer
SWBuf orig = text;
from = (unsigned char*)orig.c_str();
@@ -87,5 +87,6 @@ char UTF8Latin1::processText(SWBuf &text, const SWKey *key, const SWModule *modu
return 0;
}
+
SWORD_NAMESPACE_END