diff options
| author | Karl Heuer | 1995-01-18 20:52:48 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-01-18 20:52:48 +0000 |
| commit | 0220c51857539b3bf812c3c0948efaa3429c3852 (patch) | |
| tree | 98f18803cb65ab459c3e4e87b367b4a42da74489 /src | |
| parent | c1d4ff308d5e9d24b4c3cc95b5fa9b3ad4af42a8 (diff) | |
| download | emacs-0220c51857539b3bf812c3c0948efaa3429c3852.tar.gz emacs-0220c51857539b3bf812c3c0948efaa3429c3852.zip | |
Change all occurences of SWITCH_ENUM_BUG to use SWITCH_ENUM_CAST instead.
Diffstat (limited to 'src')
| -rw-r--r-- | src/alloc.c | 8 | ||||
| -rw-r--r-- | src/data.c | 26 | ||||
| -rw-r--r-- | src/keyboard.c | 6 | ||||
| -rw-r--r-- | src/syntax.c | 50 | ||||
| -rw-r--r-- | src/xdisp.c | 6 |
5 files changed, 18 insertions, 78 deletions
diff --git a/src/alloc.c b/src/alloc.c index 24acdaafea9..621cb6d3c0e 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. | 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994 Free Software Foundation, Inc. | 2 | Copyright (C) 1985, 86, 88, 93, 94, 95 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -1502,11 +1502,7 @@ mark_object (objptr) | |||
| 1502 | if (last_marked_index == LAST_MARKED_SIZE) | 1502 | if (last_marked_index == LAST_MARKED_SIZE) |
| 1503 | last_marked_index = 0; | 1503 | last_marked_index = 0; |
| 1504 | 1504 | ||
| 1505 | #ifdef SWITCH_ENUM_BUG | 1505 | switch (SWITCH_ENUM_CAST (XGCTYPE (obj))) |
| 1506 | switch ((int) XGCTYPE (obj)) | ||
| 1507 | #else | ||
| 1508 | switch (XGCTYPE (obj)) | ||
| 1509 | #endif | ||
| 1510 | { | 1506 | { |
| 1511 | case Lisp_String: | 1507 | case Lisp_String: |
| 1512 | { | 1508 | { |
diff --git a/src/data.c b/src/data.c index 482be25e1cb..93e3811be4b 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter. | 1 | /* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994 Free Software Foundation, Inc. | 2 | Copyright (C) 1985, 86, 88, 93, 94, 95 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -656,11 +656,7 @@ store_symval_forwarding (sym, valcontents, newval) | |||
| 656 | Lisp_Object sym; | 656 | Lisp_Object sym; |
| 657 | register Lisp_Object valcontents, newval; | 657 | register Lisp_Object valcontents, newval; |
| 658 | { | 658 | { |
| 659 | #ifdef SWITCH_ENUM_BUG | 659 | switch (SWITCH_ENUM_CAST (XTYPE (valcontents))) |
| 660 | switch ((int) XTYPE (valcontents)) | ||
| 661 | #else | ||
| 662 | switch (XTYPE (valcontents)) | ||
| 663 | #endif | ||
| 664 | { | 660 | { |
| 665 | case Lisp_Misc: | 661 | case Lisp_Misc: |
| 666 | switch (XMISC (valcontents)->type) | 662 | switch (XMISC (valcontents)->type) |
| @@ -1630,11 +1626,7 @@ arith_driver (code, nargs, args) | |||
| 1630 | register int accum; | 1626 | register int accum; |
| 1631 | register int next; | 1627 | register int next; |
| 1632 | 1628 | ||
| 1633 | #ifdef SWITCH_ENUM_BUG | 1629 | switch (SWITCH_ENUM_CAST (code)) |
| 1634 | switch ((int) code) | ||
| 1635 | #else | ||
| 1636 | switch (code) | ||
| 1637 | #endif | ||
| 1638 | { | 1630 | { |
| 1639 | case Alogior: | 1631 | case Alogior: |
| 1640 | case Alogxor: | 1632 | case Alogxor: |
| @@ -1661,11 +1653,7 @@ arith_driver (code, nargs, args) | |||
| 1661 | #endif /* LISP_FLOAT_TYPE */ | 1653 | #endif /* LISP_FLOAT_TYPE */ |
| 1662 | args[argnum] = val; /* runs into a compiler bug. */ | 1654 | args[argnum] = val; /* runs into a compiler bug. */ |
| 1663 | next = XINT (args[argnum]); | 1655 | next = XINT (args[argnum]); |
| 1664 | #ifdef SWITCH_ENUM_BUG | 1656 | switch (SWITCH_ENUM_CAST (code)) |
| 1665 | switch ((int) code) | ||
| 1666 | #else | ||
| 1667 | switch (code) | ||
| 1668 | #endif | ||
| 1669 | { | 1657 | { |
| 1670 | case Aadd: accum += next; break; | 1658 | case Aadd: accum += next; break; |
| 1671 | case Asub: | 1659 | case Asub: |
| @@ -1725,11 +1713,7 @@ float_arith_driver (accum, argnum, code, nargs, args) | |||
| 1725 | args[argnum] = val; /* runs into a compiler bug. */ | 1713 | args[argnum] = val; /* runs into a compiler bug. */ |
| 1726 | next = XINT (args[argnum]); | 1714 | next = XINT (args[argnum]); |
| 1727 | } | 1715 | } |
| 1728 | #ifdef SWITCH_ENUM_BUG | 1716 | switch (SWITCH_ENUM_CAST (code)) |
| 1729 | switch ((int) code) | ||
| 1730 | #else | ||
| 1731 | switch (code) | ||
| 1732 | #endif | ||
| 1733 | { | 1717 | { |
| 1734 | case Aadd: | 1718 | case Aadd: |
| 1735 | accum += next; | 1719 | accum += next; |
diff --git a/src/keyboard.c b/src/keyboard.c index 8dde43e59b8..e67549c6e8f 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -2637,11 +2637,7 @@ make_lispy_event (event) | |||
| 2637 | { | 2637 | { |
| 2638 | int i; | 2638 | int i; |
| 2639 | 2639 | ||
| 2640 | #ifdef SWITCH_ENUM_BUG | 2640 | switch (SWITCH_ENUM_CAST (event->kind)) |
| 2641 | switch ((int) event->kind) | ||
| 2642 | #else | ||
| 2643 | switch (event->kind) | ||
| 2644 | #endif | ||
| 2645 | { | 2641 | { |
| 2646 | /* A simple keystroke. */ | 2642 | /* A simple keystroke. */ |
| 2647 | case ascii_keystroke: | 2643 | case ascii_keystroke: |
diff --git a/src/syntax.c b/src/syntax.c index 8aeb5bdd519..46f9ddd77e2 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* GNU Emacs routines to deal with syntax tables; also word and list parsing. | 1 | /* GNU Emacs routines to deal with syntax tables; also word and list parsing. |
| 2 | Copyright (C) 1985, 1987, 1993, 1994 Free Software Foundation, Inc. | 2 | Copyright (C) 1985, 1987, 1993, 1994, 1995 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -401,11 +401,7 @@ describe_syntax (value) | |||
| 401 | 401 | ||
| 402 | insert_string ("\twhich means: "); | 402 | insert_string ("\twhich means: "); |
| 403 | 403 | ||
| 404 | #ifdef SWITCH_ENUM_BUG | 404 | switch (SWITCH_ENUM_CAST (code)) |
| 405 | switch ((int) code) | ||
| 406 | #else | ||
| 407 | switch (code) | ||
| 408 | #endif | ||
| 409 | { | 405 | { |
| 410 | case Swhitespace: | 406 | case Swhitespace: |
| 411 | insert_string ("whitespace"); break; | 407 | insert_string ("whitespace"); break; |
| @@ -905,11 +901,7 @@ scan_lists (from, count, depth, sexpflag) | |||
| 905 | if (SYNTAX_PREFIX (c)) | 901 | if (SYNTAX_PREFIX (c)) |
| 906 | continue; | 902 | continue; |
| 907 | 903 | ||
| 908 | #ifdef SWITCH_ENUM_BUG | 904 | switch (SWITCH_ENUM_CAST (code)) |
| 909 | switch ((int) code) | ||
| 910 | #else | ||
| 911 | switch (code) | ||
| 912 | #endif | ||
| 913 | { | 905 | { |
| 914 | case Sescape: | 906 | case Sescape: |
| 915 | case Scharquote: | 907 | case Scharquote: |
| @@ -922,11 +914,7 @@ scan_lists (from, count, depth, sexpflag) | |||
| 922 | /* This word counts as a sexp; return at end of it. */ | 914 | /* This word counts as a sexp; return at end of it. */ |
| 923 | while (from < stop) | 915 | while (from < stop) |
| 924 | { | 916 | { |
| 925 | #ifdef SWITCH_ENUM_BUG | 917 | switch (SWITCH_ENUM_CAST (SYNTAX (FETCH_CHAR (from)))) |
| 926 | switch ((int) SYNTAX (FETCH_CHAR (from))) | ||
| 927 | #else | ||
| 928 | switch (SYNTAX (FETCH_CHAR (from))) | ||
| 929 | #endif | ||
| 930 | { | 918 | { |
| 931 | case Scharquote: | 919 | case Scharquote: |
| 932 | case Sescape: | 920 | case Sescape: |
| @@ -1001,11 +989,7 @@ scan_lists (from, count, depth, sexpflag) | |||
| 1001 | { | 989 | { |
| 1002 | if (from >= stop) goto lose; | 990 | if (from >= stop) goto lose; |
| 1003 | if (FETCH_CHAR (from) == stringterm) break; | 991 | if (FETCH_CHAR (from) == stringterm) break; |
| 1004 | #ifdef SWITCH_ENUM_BUG | 992 | switch (SWITCH_ENUM_CAST (SYNTAX (FETCH_CHAR (from)))) |
| 1005 | switch ((int) SYNTAX (FETCH_CHAR (from))) | ||
| 1006 | #else | ||
| 1007 | switch (SYNTAX (FETCH_CHAR (from))) | ||
| 1008 | #endif | ||
| 1009 | { | 993 | { |
| 1010 | case Scharquote: | 994 | case Scharquote: |
| 1011 | case Sescape: | 995 | case Sescape: |
| @@ -1059,11 +1043,7 @@ scan_lists (from, count, depth, sexpflag) | |||
| 1059 | if (SYNTAX_PREFIX (c)) | 1043 | if (SYNTAX_PREFIX (c)) |
| 1060 | continue; | 1044 | continue; |
| 1061 | 1045 | ||
| 1062 | #ifdef SWITCH_ENUM_BUG | 1046 | switch (SWITCH_ENUM_CAST (quoted ? Sword : code)) |
| 1063 | switch ((int) (quoted ? Sword : code)) | ||
| 1064 | #else | ||
| 1065 | switch (quoted ? Sword : code) | ||
| 1066 | #endif | ||
| 1067 | { | 1047 | { |
| 1068 | case Sword: | 1048 | case Sword: |
| 1069 | case Ssymbol: | 1049 | case Ssymbol: |
| @@ -1466,11 +1446,7 @@ scan_sexps_forward (stateptr, from, end, targetdepth, | |||
| 1466 | 1446 | ||
| 1467 | if (SYNTAX_PREFIX (FETCH_CHAR (from - 1))) | 1447 | if (SYNTAX_PREFIX (FETCH_CHAR (from - 1))) |
| 1468 | continue; | 1448 | continue; |
| 1469 | #ifdef SWITCH_ENUM_BUG | 1449 | switch (SWITCH_ENUM_CAST (code)) |
| 1470 | switch ((int) code) | ||
| 1471 | #else | ||
| 1472 | switch (code) | ||
| 1473 | #endif | ||
| 1474 | { | 1450 | { |
| 1475 | case Sescape: | 1451 | case Sescape: |
| 1476 | case Scharquote: | 1452 | case Scharquote: |
| @@ -1488,11 +1464,7 @@ scan_sexps_forward (stateptr, from, end, targetdepth, | |||
| 1488 | symstarted: | 1464 | symstarted: |
| 1489 | while (from < end) | 1465 | while (from < end) |
| 1490 | { | 1466 | { |
| 1491 | #ifdef SWITCH_ENUM_BUG | 1467 | switch (SWITCH_ENUM_CAST (SYNTAX (FETCH_CHAR (from)))) |
| 1492 | switch ((int) SYNTAX (FETCH_CHAR (from))) | ||
| 1493 | #else | ||
| 1494 | switch (SYNTAX (FETCH_CHAR (from))) | ||
| 1495 | #endif | ||
| 1496 | { | 1468 | { |
| 1497 | case Scharquote: | 1469 | case Scharquote: |
| 1498 | case Sescape: | 1470 | case Sescape: |
| @@ -1583,11 +1555,7 @@ scan_sexps_forward (stateptr, from, end, targetdepth, | |||
| 1583 | { | 1555 | { |
| 1584 | if (from >= end) goto done; | 1556 | if (from >= end) goto done; |
| 1585 | if (FETCH_CHAR (from) == state.instring) break; | 1557 | if (FETCH_CHAR (from) == state.instring) break; |
| 1586 | #ifdef SWITCH_ENUM_BUG | 1558 | switch (SWITCH_ENUM_CAST (SYNTAX (FETCH_CHAR (from)))) |
| 1587 | switch ((int) SYNTAX (FETCH_CHAR (from))) | ||
| 1588 | #else | ||
| 1589 | switch (SYNTAX (FETCH_CHAR (from))) | ||
| 1590 | #endif | ||
| 1591 | { | 1559 | { |
| 1592 | case Scharquote: | 1560 | case Scharquote: |
| 1593 | case Sescape: | 1561 | case Sescape: |
diff --git a/src/xdisp.c b/src/xdisp.c index 91ffad37d63..e58a1cdd069 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2878,11 +2878,7 @@ display_mode_element (w, vpos, hpos, depth, minendcol, maxendcol, elt) | |||
| 2878 | 2878 | ||
| 2879 | depth++; | 2879 | depth++; |
| 2880 | 2880 | ||
| 2881 | #ifdef SWITCH_ENUM_BUG | 2881 | switch (SWITCH_ENUM_CAST (XTYPE (elt))) |
| 2882 | switch ((int) XTYPE (elt)) | ||
| 2883 | #else | ||
| 2884 | switch (XTYPE (elt)) | ||
| 2885 | #endif | ||
| 2886 | { | 2882 | { |
| 2887 | case Lisp_String: | 2883 | case Lisp_String: |
| 2888 | { | 2884 | { |