[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src coding.c
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] emacs/src coding.c |
Date: |
Wed, 03 Dec 2008 02:25:00 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kenichi Handa <handa> 08/12/03 02:25:00
Modified files:
src : coding.c
Log message:
(detect_coding_system): Initialize utf_16_le_eol to -1, val to
Qnil.
(produce_chars): Initialize consumed_chars to 0.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/coding.c?cvsroot=emacs&r1=1.397&r2=1.398
Patches:
Index: coding.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/coding.c,v
retrieving revision 1.397
retrieving revision 1.398
diff -u -b -r1.397 -r1.398
--- coding.c 3 Dec 2008 01:21:59 -0000 1.397
+++ coding.c 3 Dec 2008 02:25:00 -0000 1.398
@@ -6330,7 +6330,7 @@
if (coding->src_multibyte)
{
int multibytep = 1;
- EMACS_INT consumed_chars;
+ EMACS_INT consumed_chars = 0;
while (1)
{
@@ -7690,7 +7690,7 @@
{
const unsigned char *src_end = src + src_bytes;
Lisp_Object attrs, eol_type;
- Lisp_Object val;
+ Lisp_Object val = Qnil;
struct coding_system coding;
int id;
struct coding_detection_info detect_info;
@@ -7855,7 +7855,6 @@
{
int mask = detect_info.rejected | detect_info.found;
int found = 0;
- val = Qnil;
for (i = coding_category_raw_text - 1; i >= 0; i--)
{
@@ -7918,7 +7917,7 @@
/* Then, detect eol-format if necessary. */
{
- int normal_eol = -1, utf_16_be_eol = -1, utf_16_le_eol;
+ int normal_eol = -1, utf_16_be_eol = -1, utf_16_le_eol = -1;
Lisp_Object tail;
if (VECTORP (eol_type))
@@ -7984,7 +7983,7 @@
}
}
- return (highest ? XCAR (val) : val);
+ return (highest ? (CONSP (val) ? XCAR (val) : Qnil) : val);
}
- [Emacs-diffs] emacs/src coding.c, Kenichi Handa, 2008/12/02
- [Emacs-diffs] emacs/src coding.c, Kenichi Handa, 2008/12/02
- [Emacs-diffs] emacs/src coding.c,
Kenichi Handa <=
- [Emacs-diffs] emacs/src coding.c, Kenichi Handa, 2008/12/03
- [Emacs-diffs] emacs/src coding.c, Kenichi Handa, 2008/12/03
- [Emacs-diffs] emacs/src coding.c, Chong Yidong, 2008/12/06
- [Emacs-diffs] emacs/src coding.c, Jason Rumney, 2008/12/20