Changes to qemacs/charset.c

Charlie Gordon <[email protected]>
Newsgroups gmane.editors.qemacs.devel
Message-ID <[email protected]>
Index: qemacs/charset.c
diff -u qemacs/charset.c:1.2 qemacs/charset.c:1.3
--- qemacs/charset.c:1.2	Wed May  4 19:40:26 2005
+++ qemacs/charset.c	Mon May  9 06:21:49 2005
@@ -65,6 +65,7 @@
         table_utf8[i] = ESCAPE_CHAR;
 
     qe_register_charset(&charset_8859_1);
+    qe_register_charset(&charset_vt100);
     qe_register_charset(&charset_utf8);
     qe_register_charset(&charset_7bit);
 }
@@ -108,6 +109,33 @@
 };
 
 /********************************************************/
+/* vt100 */
+
+static void decode_vt100_init(CharsetDecodeState *s)
+{
+    s->table = table_idem;
+}
+
+static unsigned char *encode_vt100(QECharset *charset, 
+				   unsigned char *p, int c)
+{
+    if (c <= 0xff) {
+        *p++ = c;
+        return p;
+    } else {
+        return NULL;
+    }
+}
+
+QECharset charset_vt100 = {
+    "vt100",
+    NULL,
+    decode_vt100_init,
+    NULL,
+    encode_vt100,
+};
+
+/********************************************************/
 /* 7 bit */
 
 static unsigned char *encode_7bit(QECharset *charset,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.