comparison src/coding.c @ 88862:108e2535280d

(adjust_coding_eol_type): Fix eol_type/eol_seen mixup.
author Dave Love <fx@gnu.org>
date Wed, 17 Jul 2002 10:20:32 +0000
parents 13a375bc220d
children af9012fdad56
comparison
equal deleted inserted replaced
88861:5ca38cce6f72 88862:108e2535280d
1 /* Coding system handler (conversion, detection, and etc). 1 /* Coding system handler (conversion, detection, and etc).
2 Copyright (C) 1995, 1997, 1998 Electrotechnical Laboratory, JAPAN. 2 Copyright (C) 1995, 1997, 1998 Electrotechnical Laboratory, JAPAN.
3 Licensed to the Free Software Foundation. 3 Licensed to the Free Software Foundation.
4 Copyright (C) 2001 Free Software Foundation, Inc. 4 Copyright (C) 2001, 2002 Free Software Foundation, Inc.
5 Copyright (C) 2001, 2002 5 Copyright (C) 2001, 2002
6 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
7 Registration Number H13PRO009 7 Registration Number H13PRO009
8 8
9 This file is part of GNU Emacs. 9 This file is part of GNU Emacs.
4980 Lisp_Object eol_type; 4980 Lisp_Object eol_type;
4981 4981
4982 eol_type = CODING_ID_EOL_TYPE (coding->id); 4982 eol_type = CODING_ID_EOL_TYPE (coding->id);
4983 if (eol_seen & EOL_SEEN_LF) 4983 if (eol_seen & EOL_SEEN_LF)
4984 coding->id = CODING_SYSTEM_ID (AREF (eol_type, 0)); 4984 coding->id = CODING_SYSTEM_ID (AREF (eol_type, 0));
4985 else if (eol_type & EOL_SEEN_CRLF) 4985 else if (eol_seen & EOL_SEEN_CRLF)
4986 coding->id = CODING_SYSTEM_ID (AREF (eol_type, 1)); 4986 coding->id = CODING_SYSTEM_ID (AREF (eol_type, 1));
4987 else if (eol_type & EOL_SEEN_CR) 4987 else if (eol_seen & EOL_SEEN_CR)
4988 coding->id = CODING_SYSTEM_ID (AREF (eol_type, 2)); 4988 coding->id = CODING_SYSTEM_ID (AREF (eol_type, 2));
4989 } 4989 }
4990 4990
4991 /* Detect how a text specified in CODING is encoded. If a coding 4991 /* Detect how a text specified in CODING is encoded. If a coding
4992 system is detected, update fields of CODING by the detected coding 4992 system is detected, update fields of CODING by the detected coding