aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2008-09-06 09:57:15 +0000
committerEli Zaretskii2008-09-06 09:57:15 +0000
commit18a2979dce79e6c23f140e58afd7e6878b2d25a2 (patch)
treee5fb1bba39b9599eb68fcfeec4816192b5066704 /src
parentda2cfeef7a578a7d9010d45193938e706ff609bc (diff)
downloademacs-18a2979dce79e6c23f140e58afd7e6878b2d25a2.tar.gz
emacs-18a2979dce79e6c23f140e58afd7e6878b2d25a2.zip
Fix spelling and wording of comments.
Diffstat (limited to 'src')
-rw-r--r--src/character.h53
1 files changed, 26 insertions, 27 deletions
diff --git a/src/character.h b/src/character.h
index 1731448d1d0..44b8b29101a 100644
--- a/src/character.h
+++ b/src/character.h
@@ -101,14 +101,14 @@ extern char unibyte_has_multibyte_table[256];
101 } while (0) 101 } while (0)
102 102
103 103
104/* If C is not ASCII, make it multibyte. It assumes C < 256. */ 104/* If C is not ASCII, make it multibyte. Assumes C < 256. */
105#define MAKE_CHAR_MULTIBYTE(c) \ 105#define MAKE_CHAR_MULTIBYTE(c) \
106 (eassert ((c) >= 0 && (c) < 256), (c) = unibyte_to_multibyte_table[(c)]) 106 (eassert ((c) >= 0 && (c) < 256), (c) = unibyte_to_multibyte_table[(c)])
107 107
108/* This is the maximum byte length of multibyte form. */ 108/* This is the maximum byte length of multibyte form. */
109#define MAX_MULTIBYTE_LENGTH 5 109#define MAX_MULTIBYTE_LENGTH 5
110 110
111/* Return a Lisp character whose character code is C. It assumes C is 111/* Return a Lisp character whose character code is C. Assumes C is
112 a valid character code. */ 112 a valid character code. */
113#define make_char(c) make_number (c) 113#define make_char(c) make_number (c)
114 114
@@ -118,8 +118,7 @@ extern char unibyte_has_multibyte_table[256];
118/* Nonzero iff X is a character. */ 118/* Nonzero iff X is a character. */
119#define CHARACTERP(x) (NATNUMP (x) && XFASTINT (x) <= MAX_CHAR) 119#define CHARACTERP(x) (NATNUMP (x) && XFASTINT (x) <= MAX_CHAR)
120 120
121/* Nonzero iff C is valid as a character code. GENERICP is not used 121/* Nonzero iff C is valid as a character code. GENERICP is not used. */
122 now. */
123#define CHAR_VALID_P(c, genericp) ((unsigned) (c) <= MAX_CHAR) 122#define CHAR_VALID_P(c, genericp) ((unsigned) (c) <= MAX_CHAR)
124 123
125/* Check if Lisp object X is a character or not. */ 124/* Check if Lisp object X is a character or not. */
@@ -200,9 +199,9 @@ extern char unibyte_has_multibyte_table[256];
200 2) 199 2)
201 200
202 201
203/* Store multibyte form of the character C in P. The caller should 202/* Store multibyte form of the character C in P and advance P to the
204 allocate at least MAX_MULTIBYTE_LENGTH bytes area at P in advance. 203 end of the multibyte form. The caller should allocate at least
205 And, advance P to the end of the multibyte form. */ 204 MAX_MULTIBYTE_LENGTH bytes area at P in advance. */
206 205
207#define CHAR_STRING_ADVANCE(c, p) \ 206#define CHAR_STRING_ADVANCE(c, p) \
208 do { \ 207 do { \
@@ -233,8 +232,8 @@ extern char unibyte_has_multibyte_table[256];
233 (ASCII_BYTE_P (byte) || LEADING_CODE_P (byte)) */ 232 (ASCII_BYTE_P (byte) || LEADING_CODE_P (byte)) */
234#define CHAR_HEAD_P(byte) (((byte) & 0xC0) != 0x80) 233#define CHAR_HEAD_P(byte) (((byte) & 0xC0) != 0x80)
235 234
236/* Just kept for backward compatibility. This macro will be removed 235/* Kept for backward compatibility. This macro will be removed in the
237 in the future. */ 236 future. */
238#define BASE_LEADING_CODE_P LEADING_CODE_P 237#define BASE_LEADING_CODE_P LEADING_CODE_P
239 238
240/* How many bytes a character that starts with BYTE occupies in a 239/* How many bytes a character that starts with BYTE occupies in a
@@ -265,7 +264,7 @@ extern char unibyte_has_multibyte_table[256];
265 (bytes) = BYTES_BY_CHAR_HEAD (*(str)) 264 (bytes) = BYTES_BY_CHAR_HEAD (*(str))
266 265
267/* The byte length of multibyte form at unibyte string P ending at 266/* The byte length of multibyte form at unibyte string P ending at
268 PEND. If STR doesn't point a valid multibyte form, return 0. */ 267 PEND. If STR doesn't point to a valid multibyte form, return 0. */
269 268
270#define MULTIBYTE_LENGTH(p, pend) \ 269#define MULTIBYTE_LENGTH(p, pend) \
271 (p >= pend ? 0 \ 270 (p >= pend ? 0 \
@@ -281,7 +280,7 @@ extern char unibyte_has_multibyte_table[256];
281 : 0) 280 : 0)
282 281
283 282
284/* Like MULTIBYTE_LENGTH but don't check the ending address. */ 283/* Like MULTIBYTE_LENGTH, but don't check the ending address. */
285 284
286#define MULTIBYTE_LENGTH_NO_CHECK(p) \ 285#define MULTIBYTE_LENGTH_NO_CHECK(p) \
287 (!((p)[0] & 0x80) ? 1 \ 286 (!((p)[0] & 0x80) ? 1 \
@@ -295,8 +294,8 @@ extern char unibyte_has_multibyte_table[256];
295 : (p)[0] == 0xF8 && ((p)[1] & 0xF0) == 0x80 ? 5 \ 294 : (p)[0] == 0xF8 && ((p)[1] & 0xF0) == 0x80 ? 5 \
296 : 0) 295 : 0)
297 296
298/* If P is before LIMIT, advance P to the next character boundary. It 297/* If P is before LIMIT, advance P to the next character boundary.
299 assumes that P is already at a character boundary of the sane 298 Assumes that P is already at a character boundary of the same
300 mulitbyte form whose end address is LIMIT. */ 299 mulitbyte form whose end address is LIMIT. */
301 300
302#define NEXT_CHAR_BOUNDARY(p, limit) \ 301#define NEXT_CHAR_BOUNDARY(p, limit) \
@@ -307,7 +306,7 @@ extern char unibyte_has_multibyte_table[256];
307 306
308 307
309/* If P is after LIMIT, advance P to the previous character boundary. 308/* If P is after LIMIT, advance P to the previous character boundary.
310 It assumes that P is already at a character boundary of the sane 309 Assumes that P is already at a character boundary of the same
311 mulitbyte form whose beginning address is LIMIT. */ 310 mulitbyte form whose beginning address is LIMIT. */
312 311
313#define PREV_CHAR_BOUNDARY(p, limit) \ 312#define PREV_CHAR_BOUNDARY(p, limit) \
@@ -340,7 +339,7 @@ extern char unibyte_has_multibyte_table[256];
340 : string_char ((p), NULL, NULL)) 339 : string_char ((p), NULL, NULL))
341 340
342 341
343/* Like STRING_CHAR but set ACTUAL_LEN to the length of multibyte 342/* Like STRING_CHAR, but set ACTUAL_LEN to the length of multibyte
344 form. The argument LEN is ignored. It will be removed in the 343 form. The argument LEN is ignored. It will be removed in the
345 future. */ 344 future. */
346 345
@@ -360,7 +359,7 @@ extern char unibyte_has_multibyte_table[256];
360 : string_char ((p), NULL, &actual_len)) 359 : string_char ((p), NULL, &actual_len))
361 360
362 361
363/* Like STRING_CHAR but advance P to the end of multibyte form. */ 362/* Like STRING_CHAR, but advance P to the end of multibyte form. */
364 363
365#define STRING_CHAR_ADVANCE(p) \ 364#define STRING_CHAR_ADVANCE(p) \
366 (!((p)[0] & 0x80) \ 365 (!((p)[0] & 0x80) \
@@ -405,8 +404,8 @@ extern char unibyte_has_multibyte_table[256];
405 } \ 404 } \
406 while (0) 405 while (0)
407 406
408/* Like FETCH_STRING_CHAR_ADVANCE but return a multibyte character eve 407/* Like FETCH_STRING_CHAR_ADVANCE, but return a multibyte character
409 if STRING is unibyte. */ 408 even if STRING is unibyte. */
410 409
411#define FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE(OUTPUT, STRING, CHARIDX, BYTEIDX) \ 410#define FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE(OUTPUT, STRING, CHARIDX, BYTEIDX) \
412 do \ 411 do \
@@ -430,7 +429,7 @@ extern char unibyte_has_multibyte_table[256];
430 while (0) 429 while (0)
431 430
432 431
433/* Like FETCH_STRING_CHAR_ADVANCE but assumes STRING is multibyte. */ 432/* Like FETCH_STRING_CHAR_ADVANCE, but assumes STRING is multibyte. */
434 433
435#define FETCH_STRING_CHAR_ADVANCE_NO_CHECK(OUTPUT, STRING, CHARIDX, BYTEIDX) \ 434#define FETCH_STRING_CHAR_ADVANCE_NO_CHECK(OUTPUT, STRING, CHARIDX, BYTEIDX) \
436 do \ 435 do \
@@ -445,7 +444,7 @@ extern char unibyte_has_multibyte_table[256];
445 while (0) 444 while (0)
446 445
447 446
448/* Like FETCH_STRING_CHAR_ADVANCE but fetch character from the current 447/* Like FETCH_STRING_CHAR_ADVANCE, but fetch character from the current
449 buffer. */ 448 buffer. */
450 449
451#define FETCH_CHAR_ADVANCE(OUTPUT, CHARIDX, BYTEIDX) \ 450#define FETCH_CHAR_ADVANCE(OUTPUT, CHARIDX, BYTEIDX) \
@@ -469,7 +468,7 @@ extern char unibyte_has_multibyte_table[256];
469 while (0) 468 while (0)
470 469
471 470
472/* Like FETCH_CHAR_ADVANCE but assumes the current buffer is multibyte. */ 471/* Like FETCH_CHAR_ADVANCE, but assumes the current buffer is multibyte. */
473 472
474#define FETCH_CHAR_ADVANCE_NO_CHECK(OUTPUT, CHARIDX, BYTEIDX) \ 473#define FETCH_CHAR_ADVANCE_NO_CHECK(OUTPUT, CHARIDX, BYTEIDX) \
475 do \ 474 do \
@@ -484,7 +483,7 @@ extern char unibyte_has_multibyte_table[256];
484 while (0) 483 while (0)
485 484
486 485
487/* Increase the buffer byte position POS_BYTE of the current buffer to 486/* Increment the buffer byte position POS_BYTE of the current buffer to
488 the next character boundary. No range checking of POS. */ 487 the next character boundary. No range checking of POS. */
489 488
490#define INC_POS(pos_byte) \ 489#define INC_POS(pos_byte) \
@@ -494,7 +493,7 @@ extern char unibyte_has_multibyte_table[256];
494 } while (0) 493 } while (0)
495 494
496 495
497/* Decrease the buffer byte position POS_BYTE of the current buffer to 496/* Decrement the buffer byte position POS_BYTE of the current buffer to
498 the previous character boundary. No range checking of POS. */ 497 the previous character boundary. No range checking of POS. */
499 498
500#define DEC_POS(pos_byte) \ 499#define DEC_POS(pos_byte) \
@@ -541,7 +540,7 @@ extern char unibyte_has_multibyte_table[256];
541 while (0) 540 while (0)
542 541
543 542
544/* Increase the buffer byte position POS_BYTE of the current buffer to 543/* Increment the buffer byte position POS_BYTE of the current buffer to
545 the next character boundary. This macro relies on the fact that 544 the next character boundary. This macro relies on the fact that
546 *GPT_ADDR and *Z_ADDR are always accessible and the values are 545 *GPT_ADDR and *Z_ADDR are always accessible and the values are
547 '\0'. No range checking of POS_BYTE. */ 546 '\0'. No range checking of POS_BYTE. */
@@ -553,7 +552,7 @@ extern char unibyte_has_multibyte_table[256];
553 } while (0) 552 } while (0)
554 553
555 554
556/* Decrease the buffer byte position POS_BYTE of the current buffer to 555/* Decrement the buffer byte position POS_BYTE of the current buffer to
557 the previous character boundary. No range checking of POS_BYTE. */ 556 the previous character boundary. No range checking of POS_BYTE. */
558 557
559#define BUF_DEC_POS(buf, pos_byte) \ 558#define BUF_DEC_POS(buf, pos_byte) \
@@ -598,7 +597,7 @@ extern char unibyte_has_multibyte_table[256];
598 597
599 598
600/* Return the width of ASCII character C. The width is measured by 599/* Return the width of ASCII character C. The width is measured by
601 how many columns occupied on the screen when displayed in the 600 how many columns C will occupy on the screen when displayed in the
602 current buffer. */ 601 current buffer. */
603 602
604#define ASCII_CHAR_WIDTH(c) \ 603#define ASCII_CHAR_WIDTH(c) \
@@ -611,7 +610,7 @@ extern char unibyte_has_multibyte_table[256];
611 : ((NILP (current_buffer->ctl_arrow) ? 4 : 2)))) 610 : ((NILP (current_buffer->ctl_arrow) ? 4 : 2))))
612 611
613/* Return the width of character C. The width is measured by how many 612/* Return the width of character C. The width is measured by how many
614 columns occupied on the screen when displayed in the current 613 columns C will occupy on the screen when displayed in the current
615 buffer. */ 614 buffer. */
616 615
617#define CHAR_WIDTH(c) \ 616#define CHAR_WIDTH(c) \