Mercurial > emacs
comparison src/syntax.h @ 720:2d227cb41a0a
*** empty log message ***
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 23 Jun 1992 01:41:24 +0000 |
parents | 80cdb2387043 |
children | 721e4f57c8b0 |
comparison
equal
deleted
inserted
replaced
719:3007551721dc | 720:2d227cb41a0a |
---|---|
47 Sendcomment, /* for a comment-ending character */ | 47 Sendcomment, /* for a comment-ending character */ |
48 Smax /* Upper bound on codes that are meaningful */ | 48 Smax /* Upper bound on codes that are meaningful */ |
49 }; | 49 }; |
50 | 50 |
51 #define SYNTAX(c) \ | 51 #define SYNTAX(c) \ |
52 ((enum syntaxcode) (XINT (XVECTOR (current_buffer->syntax_table)->contents[c]) & 0377)) | 52 ((enum syntaxcode) (XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) & 0377)) |
53 | 53 |
54 /* The next 8 bits of the number is a character, | 54 /* The next 8 bits of the number is a character, |
55 the matching delimiter in the case of Sopen or Sclose. */ | 55 the matching delimiter in the case of Sopen or Sclose. */ |
56 | 56 |
57 #define SYNTAX_MATCH(c) \ | 57 #define SYNTAX_MATCH(c) \ |
58 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[c]) >> 8) & 0377) | 58 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 8) & 0377) |
59 | 59 |
60 /* Then there are five single-bit flags that have the following meanings: | 60 /* Then there are five single-bit flags that have the following meanings: |
61 1. This character is the first of a two-character comment-start sequence. | 61 1. This character is the first of a two-character comment-start sequence. |
62 2. This character is the second of a two-character comment-start sequence. | 62 2. This character is the second of a two-character comment-start sequence. |
63 3. This character is the first of a two-character comment-end sequence. | 63 3. This character is the first of a two-character comment-end sequence. |
65 5. This character is a prefix, for backward-prefix-chars. | 65 5. This character is a prefix, for backward-prefix-chars. |
66 Note that any two-character sequence whose first character has flag 1 | 66 Note that any two-character sequence whose first character has flag 1 |
67 and whose second character has flag 2 will be interpreted as a comment start. */ | 67 and whose second character has flag 2 will be interpreted as a comment start. */ |
68 | 68 |
69 #define SYNTAX_COMSTART_FIRST(c) \ | 69 #define SYNTAX_COMSTART_FIRST(c) \ |
70 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[c]) >> 16) & 1) | 70 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 16) & 1) |
71 | 71 |
72 #define SYNTAX_COMSTART_SECOND(c) \ | 72 #define SYNTAX_COMSTART_SECOND(c) \ |
73 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[c]) >> 17) & 1) | 73 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 17) & 1) |
74 | 74 |
75 #define SYNTAX_COMEND_FIRST(c) \ | 75 #define SYNTAX_COMEND_FIRST(c) \ |
76 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[c]) >> 18) & 1) | 76 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 18) & 1) |
77 | 77 |
78 #define SYNTAX_COMEND_SECOND(c) \ | 78 #define SYNTAX_COMEND_SECOND(c) \ |
79 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[c]) >> 19) & 1) | 79 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 19) & 1) |
80 | 80 |
81 #define SYNTAX_PREFIX(c) \ | 81 #define SYNTAX_PREFIX(c) \ |
82 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[c]) >> 20) & 1) | 82 ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 20) & 1) |
83 | 83 |
84 /* This array, indexed by a character, contains the syntax code which that | 84 /* This array, indexed by a character, contains the syntax code which that |
85 character signifies (as a char). For example, | 85 character signifies (as a char). For example, |
86 (enum syntaxcode) syntax_spec_code['w'] is Sword. */ | 86 (enum syntaxcode) syntax_spec_code['w'] is Sword. */ |
87 | 87 |