1 |
/* GNU Emacs case conversion functions. |
/* GNU Emacs case conversion functions. |
2 |
Copyright (C) 1985, 1994, 1997 Free Software Foundation, Inc. |
Copyright (C) 1985,94,97,98,99, 2001, 2002, 2004 |
3 |
|
Free Software Foundation, Inc. |
4 |
|
|
5 |
This file is part of GNU Emacs. |
This file is part of GNU Emacs. |
6 |
|
|
54 |
int flags = XINT (obj) & flagbits; |
int flags = XINT (obj) & flagbits; |
55 |
int multibyte = ! NILP (current_buffer->enable_multibyte_characters); |
int multibyte = ! NILP (current_buffer->enable_multibyte_characters); |
56 |
|
|
57 |
|
/* If the character has higher bits set |
58 |
|
above the flags, return it unchanged. |
59 |
|
It is not a real character. */ |
60 |
|
if ((unsigned) XFASTINT (obj) > (unsigned) flagbits) |
61 |
|
return obj; |
62 |
|
|
63 |
c1 = XFASTINT (obj) & ~flagbits; |
c1 = XFASTINT (obj) & ~flagbits; |
64 |
if (! multibyte) |
if (! multibyte) |
65 |
MAKE_CHAR_MULTIBYTE (c1); |
MAKE_CHAR_MULTIBYTE (c1); |
66 |
c = DOWNCASE (c1); |
c = DOWNCASE (c1); |
67 |
if (inword || c == c1) |
if (inword) |
68 |
|
XSETFASTINT (obj, c | flags); |
69 |
|
else if (c == (XFASTINT (obj) & ~flagbits)) |
70 |
{ |
{ |
71 |
if (! inword) |
if (! inword) |
72 |
c = UPCASE1 (c1); |
c = UPCASE1 (c1); |