Mercurial > hg > xemacs-beta
comparison src/font-lock.c @ 647:b39c14581166
[xemacs-hg @ 2001-08-13 04:45:47 by ben]
removal of unsigned, size_t, etc.
author | ben |
---|---|
date | Mon, 13 Aug 2001 04:46:48 +0000 |
parents | 183866b06e0b |
children | fdefd0186b75 |
comparison
equal
deleted
inserted
replaced
646:00c54252fe4f | 647:b39c14581166 |
---|---|
389 goto start_over; | 389 goto start_over; |
390 #endif | 390 #endif |
391 } | 391 } |
392 } | 392 } |
393 | 393 |
394 /* You'd think it wouldn't be necessary to cast something to the type | |
395 it's already defined is, but if you're GCC, you apparently think | |
396 differently */ | |
394 #define SYNTAX_START_STYLE(c1, c2) \ | 397 #define SYNTAX_START_STYLE(c1, c2) \ |
398 ((enum comment_style) \ | |
395 (SYNTAX_CODES_MATCH_START_P (c1, c2, SYNTAX_COMMENT_STYLE_A) ? \ | 399 (SYNTAX_CODES_MATCH_START_P (c1, c2, SYNTAX_COMMENT_STYLE_A) ? \ |
396 comment_style_a : \ | 400 comment_style_a : \ |
397 SYNTAX_CODES_MATCH_START_P (c1, c2, SYNTAX_COMMENT_STYLE_B) ? \ | 401 SYNTAX_CODES_MATCH_START_P (c1, c2, SYNTAX_COMMENT_STYLE_B) ? \ |
398 comment_style_b : \ | 402 comment_style_b : \ |
399 comment_style_none) | 403 comment_style_none)) |
400 | 404 |
401 #define SYNTAX_END_STYLE(c1, c2) \ | 405 #define SYNTAX_END_STYLE(c1, c2) \ |
402 (SYNTAX_CODES_MATCH_END_P (c1, c2, SYNTAX_COMMENT_STYLE_A) ? \ | 406 ((enum comment_style) \ |
407 (SYNTAX_CODES_MATCH_END_P (c1, c2, SYNTAX_COMMENT_STYLE_A) ? \ | |
403 comment_style_a : \ | 408 comment_style_a : \ |
404 SYNTAX_CODES_MATCH_END_P (c1, c2, SYNTAX_COMMENT_STYLE_B) ? \ | 409 SYNTAX_CODES_MATCH_END_P (c1, c2, SYNTAX_COMMENT_STYLE_B) ? \ |
405 comment_style_b : \ | 410 comment_style_b : \ |
406 comment_style_none) | 411 comment_style_none)) |
407 | 412 |
408 #define SINGLE_SYNTAX_STYLE(c) \ | 413 #define SINGLE_SYNTAX_STYLE(c) \ |
409 (SYNTAX_CODE_MATCHES_1CHAR_P (c, SYNTAX_COMMENT_STYLE_A) ? \ | 414 ((enum comment_style) \ |
415 (SYNTAX_CODE_MATCHES_1CHAR_P (c, SYNTAX_COMMENT_STYLE_A) ? \ | |
410 comment_style_a : \ | 416 comment_style_a : \ |
411 SYNTAX_CODE_MATCHES_1CHAR_P (c, SYNTAX_COMMENT_STYLE_B) ? \ | 417 SYNTAX_CODE_MATCHES_1CHAR_P (c, SYNTAX_COMMENT_STYLE_B) ? \ |
412 comment_style_b : \ | 418 comment_style_b : \ |
413 comment_style_none) | 419 comment_style_none)) |
414 | 420 |
415 /* Set up context_cache for position PT in BUF. */ | 421 /* Set up context_cache for position PT in BUF. */ |
416 | 422 |
417 static void | 423 static void |
418 find_context (struct buffer *buf, Bufpos pt) | 424 find_context (struct buffer *buf, Bufpos pt) |
613 context_cache.ccontext = ccontext_start1; | 619 context_cache.ccontext = ccontext_start1; |
614 context_cache.style = comment_style_none; /* should be this already*/ | 620 context_cache.style = comment_style_none; /* should be this already*/ |
615 } | 621 } |
616 else if ((SYNTAX_CODE_COMMENT_BITS (syncode) & | 622 else if ((SYNTAX_CODE_COMMENT_BITS (syncode) & |
617 SYNTAX_SECOND_CHAR_END) && | 623 SYNTAX_SECOND_CHAR_END) && |
618 context_cache.context == context_block_comment && | 624 context_cache.context == |
619 context_cache.ccontext == ccontext_end1 && | 625 (enum syntactic_context) context_block_comment && |
626 context_cache.ccontext == | |
627 (enum block_comment_context) ccontext_end1 && | |
620 SYNTAX_CODES_END_P (prev_syncode, syncode) && | 628 SYNTAX_CODES_END_P (prev_syncode, syncode) && |
621 /* the two chars match */ | 629 /* the two chars match */ |
622 context_cache.style == | 630 context_cache.style == |
623 SYNTAX_END_STYLE (prev_syncode, syncode) | 631 SYNTAX_END_STYLE (prev_syncode, syncode) |
624 ) | 632 ) |