summaryrefslogtreecommitdiffstats
path: root/src/rccenca.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rccenca.c')
-rw-r--r--src/rccenca.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/rccenca.c b/src/rccenca.c
index e46847e..a550051 100644
--- a/src/rccenca.c
+++ b/src/rccenca.c
@@ -1,3 +1,22 @@
+/*
+ LibRCC - interface to enca library
+
+ Copyright (C) 2005-2008 Suren A. Chilingaryan <csa@dside.dyndns.org>
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of version 2 of the GNU General Public License as published
+ by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+
#include <stdio.h>
#include <string.h>
@@ -96,7 +115,7 @@ rcc_autocharset_id rccEnca(rcc_engine_context ctx, const char *buf, int len) {
internal = rccEngineGetInternal(ctx);
if ((!internal)||(!buf)) return (rcc_charset_id)-1;
- ee = enca_analyse_const((EncaAnalyser)ctx->internal,buf,len?len:strlen(buf));
+ ee = enca_analyse_const((EncaAnalyser)ctx->internal,(const unsigned char*)buf,len?len:strlen(buf));
if (ee.charset<0) return (rcc_charset_id)-1;
charset = enca_charset_name(ee.charset, ENCA_NAME_STYLE_ICONV);