[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs charset.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs charset.c |
Date: |
Thu, 27 Mar 2008 07:27:07 +0000 |
CVSROOT: /cvsroot/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 08/03/27 07:27:07
Modified files:
. : charset.c
Log message:
simplifications
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/charset.c?cvsroot=qemacs&r1=1.18&r2=1.19
Patches:
Index: charset.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/charset.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- charset.c 8 Jan 2008 16:37:54 -0000 1.18
+++ charset.c 27 Mar 2008 07:27:07 -0000 1.19
@@ -299,15 +299,11 @@
void charset_decode_init(CharsetDecodeState *s, QECharset *charset)
{
- unsigned short *table;
-
s->table = NULL; /* fail safe */
if (charset->table_alloc) {
- table = qe_malloc_array(unsigned short, 256);
- if (!table) {
+ s->table = qe_malloc_array(unsigned short, 256);
+ if (!s->table) {
charset = &charset_8859_1;
- } else {
- s->table = table;
}
}
s->charset = charset;
@@ -318,8 +314,7 @@
void charset_decode_close(CharsetDecodeState *s)
{
- if (s->charset->table_alloc &&
- s->charset != &charset_8859_1)
+ if (s->charset->table_alloc)
qe_free(&s->table);
/* safety */
memset(s, 0, sizeof(CharsetDecodeState));
- [Qemacs-commit] qemacs charset.c,
Charlie Gordon <=