aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1997-04-11 21:58:13 +0000
committerKarl Heuer1997-04-11 21:58:13 +0000
commite98227af46feb11e1cb05137e1c7fad74210d1e9 (patch)
treea9c75b8b9ac5b105039c414c2c865a9ed4497370 /src
parentc219c2a01ca320fc7fc2707079ec7b390420d7fd (diff)
downloademacs-e98227af46feb11e1cb05137e1c7fad74210d1e9.tar.gz
emacs-e98227af46feb11e1cb05137e1c7fad74210d1e9.zip
(DOWNCASE): Return int, not Lisp_Object.
(UPPERCASEP): Use DOWNCASE. (UPCASE_TABLE): New macro. (NOCASEP, UPCASE1): Use UPCASE_TABLE. [!NO_UNION_TYPE] (make_number): Declare.
Diffstat (limited to 'src')
-rw-r--r--src/lisp.h53
1 files changed, 28 insertions, 25 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 54af82be6e1..2900d919cfa 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -372,6 +372,8 @@ extern int pure_size;
372#define XSET(var, vartype, ptr) \ 372#define XSET(var, vartype, ptr) \
373 (((var).s.type = ((char) (vartype))), ((var).s.val = ((int) (ptr)))) 373 (((var).s.type = ((char) (vartype))), ((var).s.val = ((int) (ptr))))
374 374
375extern Lisp_Object make_number ();
376
375/* During garbage collection, XGCTYPE must be used for extracting types 377/* During garbage collection, XGCTYPE must be used for extracting types
376 so that the mark bit is ignored. XMARKBIT access the markbit. 378 so that the mark bit is ignored. XMARKBIT access the markbit.
377 Markbits are used only in particular slots of particular structure types. 379 Markbits are used only in particular slots of particular structure types.
@@ -574,7 +576,7 @@ struct Lisp_Vector
574 except for that the former omits several slots at the tail. A sub 576 except for that the former omits several slots at the tail. A sub
575 char table appears only in an element of a char table, and there's 577 char table appears only in an element of a char table, and there's
576 no way to access it directly from Emacs Lisp program. */ 578 no way to access it directly from Emacs Lisp program. */
577 579
578/* This is the number of slots that apply to characters or character 580/* This is the number of slots that apply to characters or character
579 sets. The first 128 are for ASCII, the next 128 are for 8-bit 581 sets. The first 128 are for ASCII, the next 128 are for 8-bit
580 European characters, and the last 128 are for multibyte characters. 582 European characters, and the last 128 are for multibyte characters.
@@ -598,7 +600,7 @@ struct Lisp_Vector
598 600
599/* This is the number of slots that every sub char table must have. 601/* This is the number of slots that every sub char table must have.
600 This counts the ordinary slots and the top and defalt slot. */ 602 This counts the ordinary slots and the top and defalt slot. */
601#define SUB_CHAR_TABLE_STANDARD_SLOTS (SUB_CHAR_TABLE_ORDINARY_SLOTS + 2) 603#define SUB_CHAR_TABLE_STANDARD_SLOTS (SUB_CHAR_TABLE_ORDINARY_SLOTS + 2)
602 604
603/* Return the number of "extra" slots in the char table CT. */ 605/* Return the number of "extra" slots in the char table CT. */
604 606
@@ -688,7 +690,7 @@ struct Lisp_Symbol
688 This type is treated in most respects as a pseudovector, 690 This type is treated in most respects as a pseudovector,
689 but since we never dynamically allocate or free them, 691 but since we never dynamically allocate or free them,
690 we don't need a next-vector field. */ 692 we don't need a next-vector field. */
691 693
692struct Lisp_Subr 694struct Lisp_Subr
693 { 695 {
694 EMACS_INT size; 696 EMACS_INT size;
@@ -852,9 +854,9 @@ union Lisp_Misc
852/* Optional Lisp floating point type */ 854/* Optional Lisp floating point type */
853struct Lisp_Float 855struct Lisp_Float
854 { 856 {
855 Lisp_Object type; /* essentially used for mark-bit 857 Lisp_Object type; /* essentially used for mark-bit
856 and chaining when on free-list */ 858 and chaining when on free-list */
857 double data; 859 double data;
858 }; 860 };
859#endif /* LISP_FLOAT_TYPE */ 861#endif /* LISP_FLOAT_TYPE */
860 862
@@ -1099,7 +1101,7 @@ typedef unsigned char UCHAR;
1099 do { if (!WINDOWP ((x))) x = wrong_type_argument (Qwindowp, (x)); } while (0) 1101 do { if (!WINDOWP ((x))) x = wrong_type_argument (Qwindowp, (x)); } while (0)
1100 1102
1101/* This macro rejects windows on the interior of the window tree as 1103/* This macro rejects windows on the interior of the window tree as
1102 "dead", which is what we want; this is an argument-checking macro, and 1104 "dead", which is what we want; this is an argument-checking macro, and
1103 the user should never get access to interior windows. 1105 the user should never get access to interior windows.
1104 1106
1105 A window of any sort, leaf or interior, is dead iff the buffer, 1107 A window of any sort, leaf or interior, is dead iff the buffer,
@@ -1313,36 +1315,37 @@ extern char *stack_bottom;
1313 1315
1314#define QUITP (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) 1316#define QUITP (!NILP (Vquit_flag) && NILP (Vinhibit_quit))
1315 1317
1316/* 1 if CH is upper case. */ 1318/* Current buffer's map from characters to lower-case characters. */
1317 1319
1318#define UPPERCASEP(CH) \ 1320#define DOWNCASE_TABLE XCHAR_TABLE (current_buffer->downcase_table)->contents
1319 (XCHAR_TABLE (current_buffer->downcase_table)->contents[CH] != (CH))
1320 1321
1321/* 1 if CH is lower case. */ 1322/* Current buffer's map from characters to upper-case characters. */
1322 1323
1323#define LOWERCASEP(CH) (!UPPERCASEP (CH) && !NOCASEP(CH)) 1324#define UPCASE_TABLE XCHAR_TABLE (current_buffer->upcase_table)->contents
1324 1325
1325/* 1 if CH is neither upper nor lower case. */ 1326/* Downcase a character, or make no change if that cannot be done. */
1326 1327
1327#define NOCASEP(CH) \ 1328#define DOWNCASE(CH) (XFASTINT (DOWNCASE_TABLE[CH]))
1328 (XCHAR_TABLE (current_buffer->upcase_table)->contents[CH] == (CH))
1329 1329
1330/* Upcase a character, or make no change if that cannot be done. */ 1330/* 1 if CH is upper case. */
1331 1331
1332#define UPCASE(CH) (!UPPERCASEP (CH) ? UPCASE1 (CH) : (CH)) 1332#define UPPERCASEP(CH) (DOWNCASE(CH) != (CH))
1333 1333
1334/* Upcase a character known to be not upper case. */ 1334/* 1 if CH is neither upper nor lower case. */
1335 1335
1336#define UPCASE1(CH) (XCHAR_TABLE (current_buffer->upcase_table)->contents[CH]) 1336#define NOCASEP(CH) (XFASTINT (UPCASE_TABLE[CH]) == (CH))
1337 1337
1338/* Downcase a character, or make no change if that cannot be done. */ 1338/* 1 if CH is lower case. */
1339 1339
1340#define DOWNCASE(CH) \ 1340#define LOWERCASEP(CH) (!UPPERCASEP (CH) && !NOCASEP(CH))
1341 (XCHAR_TABLE (current_buffer->downcase_table)->contents[CH])
1342 1341
1343/* Current buffer's map from characters to lower-case characters. */ 1342/* Upcase a character, or make no change if that cannot be done. */
1344 1343
1345#define DOWNCASE_TABLE XCHAR_TABLE (current_buffer->downcase_table)->contents 1344#define UPCASE(CH) (!UPPERCASEP (CH) ? UPCASE1 (CH) : (CH))
1345
1346/* Upcase a character known to be not upper case. */
1347
1348#define UPCASE1(CH) (XFASTINT (UPCASE_TABLE[CH]))
1346 1349
1347extern Lisp_Object Vascii_downcase_table; 1350extern Lisp_Object Vascii_downcase_table;
1348 1351
@@ -1409,7 +1412,7 @@ struct gcpro
1409/* Call staticpro (&var) to protect static variable `var'. */ 1412/* Call staticpro (&var) to protect static variable `var'. */
1410 1413
1411void staticpro(); 1414void staticpro();
1412 1415
1413#define UNGCPRO (gcprolist = gcpro1.next) 1416#define UNGCPRO (gcprolist = gcpro1.next)
1414 1417
1415/* Evaluate expr, UNGCPRO, and then return the value of expr. */ 1418/* Evaluate expr, UNGCPRO, and then return the value of expr. */
@@ -1898,7 +1901,7 @@ extern long *xmalloc (), *xrealloc ();
1898extern void xfree (); 1901extern void xfree ();
1899 1902
1900extern char *egetenv (); 1903extern char *egetenv ();
1901 1904
1902/* Set up the name of the machine we're running on. */ 1905/* Set up the name of the machine we're running on. */
1903extern void init_system_name (); 1906extern void init_system_name ();
1904 1907