qemacs-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemacs-commit] Changes to qemacs/charset.c


From: Charlie Gordon
Subject: [Qemacs-commit] Changes to qemacs/charset.c
Date: Fri, 08 Jul 2005 05:30:45 -0400

Index: qemacs/charset.c
diff -u qemacs/charset.c:1.4 qemacs/charset.c:1.5
--- qemacs/charset.c:1.4        Wed May 11 15:12:14 2005
+++ qemacs/charset.c    Fri Jul  8 09:30:44 2005
@@ -20,7 +20,7 @@
 
 QECharset *first_charset = NULL;
 
-extern QECharset charset_7bit;
+static QECharset charset_7bit;
 
 /* specific tables */
 static unsigned short table_idem[256];
@@ -171,7 +171,7 @@
     const unsigned char *p;
     int i, l;
 
-    p = *pp;
+    p = *(const unsigned char**)pp;
     c = *p++;
     if (c < 128) {
         /* fast case for ASCII */
@@ -194,10 +194,10 @@
                 c == 0xfffe || c == 0xffff)
             goto fail;
     }
-    *pp = p;
+    *(const unsigned char**)pp = p;
     return c;
  fail:
-    *pp = p;
+    *(const unsigned char**)pp = p;
     return INVALID_CHAR;
 }
 
@@ -270,7 +270,7 @@
 
 unsigned char *encode_utf8(QECharset *charset, unsigned char *q, int c)
 {
-    return utf8_encode(q, c);
+    return (unsigned char*)utf8_encode((char*)q, c);
 }
 
 static const char *aliases_utf_8[] = { "utf8", NULL };
@@ -368,7 +368,7 @@
 {
     char *q;
 
-    q = charset->encode_func(charset, buf, c);
+    q = (char *)charset->encode_func(charset, (unsigned char*)buf, c);
     if (!q) {
         q = buf;
         *q++ ='?';




reply via email to

[Prev in Thread] Current Thread [Next in Thread]