comparison src/coding.c @ 37858:fd7c0dac2110

Use SYMBOL_VALUE/ SET_SYMBOL_VALUE macros instead of accessing symbols' value directly.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 21 May 2001 12:34:11 +0000
parents 8a086ca42e43
children
comparison
equal deleted inserted replaced
37857:b3fd27aaa58d 37858:fd7c0dac2110
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 5
5 This file is part of GNU Emacs. 6 This file is part of GNU Emacs.
6 7
7 GNU Emacs is free software; you can redistribute it and/or modify 8 GNU Emacs is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
4107 idx = 0; 4108 idx = 0;
4108 while (mask && ! (mask & 1)) mask >>= 1, idx++; 4109 while (mask && ! (mask & 1)) mask >>= 1, idx++;
4109 if (! mask) 4110 if (! mask)
4110 idx = CODING_CATEGORY_IDX_RAW_TEXT; 4111 idx = CODING_CATEGORY_IDX_RAW_TEXT;
4111 4112
4112 val = XSYMBOL (XVECTOR (Vcoding_category_table)->contents[idx])->value; 4113 val = SYMBOL_VALUE (XVECTOR (Vcoding_category_table)->contents[idx]);
4113 4114
4114 if (coding->eol_type != CODING_EOL_UNDECIDED) 4115 if (coding->eol_type != CODING_EOL_UNDECIDED)
4115 { 4116 {
4116 Lisp_Object tmp; 4117 Lisp_Object tmp;
4117 4118
6860 6861
6861 for (i = CODING_CATEGORY_IDX_EMACS_MULE; i < CODING_CATEGORY_IDX_MAX; i++) 6862 for (i = CODING_CATEGORY_IDX_EMACS_MULE; i < CODING_CATEGORY_IDX_MAX; i++)
6862 { 6863 {
6863 Lisp_Object val; 6864 Lisp_Object val;
6864 6865
6865 val = XSYMBOL (XVECTOR (Vcoding_category_table)->contents[i])->value; 6866 val = SYMBOL_VALUE (XVECTOR (Vcoding_category_table)->contents[i]);
6866 if (!NILP (val)) 6867 if (!NILP (val))
6867 { 6868 {
6868 if (! coding_system_table[i]) 6869 if (! coding_system_table[i])
6869 coding_system_table[i] = ((struct coding_system *) 6870 coding_system_table[i] = ((struct coding_system *)
6870 xmalloc (sizeof (struct coding_system))); 6871 xmalloc (sizeof (struct coding_system)));