Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
0220c518
Commit
0220c518
authored
Jan 18, 1995
by
Karl Heuer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change all occurences of SWITCH_ENUM_BUG to use SWITCH_ENUM_CAST instead.
parent
c1d4ff30
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
78 deletions
+18
-78
src/alloc.c
src/alloc.c
+2
-6
src/data.c
src/data.c
+5
-21
src/keyboard.c
src/keyboard.c
+1
-5
src/syntax.c
src/syntax.c
+9
-41
src/xdisp.c
src/xdisp.c
+1
-5
No files found.
src/alloc.c
View file @
0220c518
/* Storage allocation and gc for GNU Emacs Lisp interpreter.
Copyright (C) 1985,
19
86,
19
88,
19
93,
19
94 Free Software Foundation, Inc.
Copyright (C) 1985, 86, 88, 93, 94
, 95
Free Software Foundation, Inc.
This file is part of GNU Emacs.
...
...
@@ -1502,11 +1502,7 @@ mark_object (objptr)
if
(
last_marked_index
==
LAST_MARKED_SIZE
)
last_marked_index
=
0
;
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
XGCTYPE
(
obj
))
#else
switch
(
XGCTYPE
(
obj
))
#endif
switch
(
SWITCH_ENUM_CAST
(
XGCTYPE
(
obj
)))
{
case
Lisp_String
:
{
...
...
src/data.c
View file @
0220c518
/* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter.
Copyright (C) 1985,
19
86,
19
88,
19
93,
19
94 Free Software Foundation, Inc.
Copyright (C) 1985, 86, 88, 93, 94
, 95
Free Software Foundation, Inc.
This file is part of GNU Emacs.
...
...
@@ -656,11 +656,7 @@ store_symval_forwarding (sym, valcontents, newval)
Lisp_Object
sym
;
register
Lisp_Object
valcontents
,
newval
;
{
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
XTYPE
(
valcontents
))
#else
switch
(
XTYPE
(
valcontents
))
#endif
switch
(
SWITCH_ENUM_CAST
(
XTYPE
(
valcontents
)))
{
case
Lisp_Misc
:
switch
(
XMISC
(
valcontents
)
->
type
)
...
...
@@ -1630,11 +1626,7 @@ arith_driver (code, nargs, args)
register
int
accum
;
register
int
next
;
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
code
)
#else
switch
(
code
)
#endif
switch
(
SWITCH_ENUM_CAST
(
code
))
{
case
Alogior
:
case
Alogxor
:
...
...
@@ -1661,11 +1653,7 @@ arith_driver (code, nargs, args)
#endif
/* LISP_FLOAT_TYPE */
args
[
argnum
]
=
val
;
/* runs into a compiler bug. */
next
=
XINT
(
args
[
argnum
]);
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
code
)
#else
switch
(
code
)
#endif
switch
(
SWITCH_ENUM_CAST
(
code
))
{
case
Aadd
:
accum
+=
next
;
break
;
case
Asub
:
...
...
@@ -1725,11 +1713,7 @@ float_arith_driver (accum, argnum, code, nargs, args)
args
[
argnum
]
=
val
;
/* runs into a compiler bug. */
next
=
XINT
(
args
[
argnum
]);
}
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
code
)
#else
switch
(
code
)
#endif
switch
(
SWITCH_ENUM_CAST
(
code
))
{
case
Aadd
:
accum
+=
next
;
...
...
src/keyboard.c
View file @
0220c518
...
...
@@ -2637,11 +2637,7 @@ make_lispy_event (event)
{
int
i
;
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
event
->
kind
)
#else
switch
(
event
->
kind
)
#endif
switch
(
SWITCH_ENUM_CAST
(
event
->
kind
))
{
/* A simple keystroke. */
case
ascii_keystroke
:
...
...
src/syntax.c
View file @
0220c518
/* GNU Emacs routines to deal with syntax tables; also word and list parsing.
Copyright (C) 1985, 1987, 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1985, 1987, 1993, 1994
, 1995
Free Software Foundation, Inc.
This file is part of GNU Emacs.
...
...
@@ -401,11 +401,7 @@ describe_syntax (value)
insert_string
(
"
\t
which means: "
);
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
code
)
#else
switch
(
code
)
#endif
switch
(
SWITCH_ENUM_CAST
(
code
))
{
case
Swhitespace
:
insert_string
(
"whitespace"
);
break
;
...
...
@@ -905,11 +901,7 @@ scan_lists (from, count, depth, sexpflag)
if
(
SYNTAX_PREFIX
(
c
))
continue
;
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
code
)
#else
switch
(
code
)
#endif
switch
(
SWITCH_ENUM_CAST
(
code
))
{
case
Sescape
:
case
Scharquote
:
...
...
@@ -922,11 +914,7 @@ scan_lists (from, count, depth, sexpflag)
/* This word counts as a sexp; return at end of it. */
while
(
from
<
stop
)
{
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
SYNTAX
(
FETCH_CHAR
(
from
)))
#else
switch
(
SYNTAX
(
FETCH_CHAR
(
from
)))
#endif
switch
(
SWITCH_ENUM_CAST
(
SYNTAX
(
FETCH_CHAR
(
from
))))
{
case
Scharquote
:
case
Sescape
:
...
...
@@ -1001,11 +989,7 @@ scan_lists (from, count, depth, sexpflag)
{
if
(
from
>=
stop
)
goto
lose
;
if
(
FETCH_CHAR
(
from
)
==
stringterm
)
break
;
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
SYNTAX
(
FETCH_CHAR
(
from
)))
#else
switch
(
SYNTAX
(
FETCH_CHAR
(
from
)))
#endif
switch
(
SWITCH_ENUM_CAST
(
SYNTAX
(
FETCH_CHAR
(
from
))))
{
case
Scharquote
:
case
Sescape
:
...
...
@@ -1059,11 +1043,7 @@ scan_lists (from, count, depth, sexpflag)
if
(
SYNTAX_PREFIX
(
c
))
continue
;
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
(
quoted
?
Sword
:
code
))
#else
switch
(
quoted
?
Sword
:
code
)
#endif
switch
(
SWITCH_ENUM_CAST
(
quoted
?
Sword
:
code
))
{
case
Sword
:
case
Ssymbol
:
...
...
@@ -1466,11 +1446,7 @@ scan_sexps_forward (stateptr, from, end, targetdepth,
if
(
SYNTAX_PREFIX
(
FETCH_CHAR
(
from
-
1
)))
continue
;
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
code
)
#else
switch
(
code
)
#endif
switch
(
SWITCH_ENUM_CAST
(
code
))
{
case
Sescape
:
case
Scharquote
:
...
...
@@ -1488,11 +1464,7 @@ scan_sexps_forward (stateptr, from, end, targetdepth,
symstarted:
while
(
from
<
end
)
{
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
SYNTAX
(
FETCH_CHAR
(
from
)))
#else
switch
(
SYNTAX
(
FETCH_CHAR
(
from
)))
#endif
switch
(
SWITCH_ENUM_CAST
(
SYNTAX
(
FETCH_CHAR
(
from
))))
{
case
Scharquote
:
case
Sescape
:
...
...
@@ -1583,11 +1555,7 @@ scan_sexps_forward (stateptr, from, end, targetdepth,
{
if
(
from
>=
end
)
goto
done
;
if
(
FETCH_CHAR
(
from
)
==
state
.
instring
)
break
;
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
SYNTAX
(
FETCH_CHAR
(
from
)))
#else
switch
(
SYNTAX
(
FETCH_CHAR
(
from
)))
#endif
switch
(
SWITCH_ENUM_CAST
(
SYNTAX
(
FETCH_CHAR
(
from
))))
{
case
Scharquote
:
case
Sescape
:
...
...
src/xdisp.c
View file @
0220c518
...
...
@@ -2878,11 +2878,7 @@ display_mode_element (w, vpos, hpos, depth, minendcol, maxendcol, elt)
depth
++
;
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
XTYPE
(
elt
))
#else
switch
(
XTYPE
(
elt
))
#endif
switch
(
SWITCH_ENUM_CAST
(
XTYPE
(
elt
)))
{
case
Lisp_String
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment