Changeset 661
- Timestamp:
- 01/27/07 05:19:02 (2 years ago)
- Files:
-
- releases/1.8.3/0/hdrs/ansi.h (modified) (1 diff)
- releases/1.8.3/0/src/funstr.c (modified) (1 diff)
- releases/1.8.3/0/src/markup.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
releases/1.8.3/0/hdrs/ansi.h
r654 r661 72 72 #define ANSI_END MARKUP_START "c/" MARKUP_END 73 73 #define ANSI_ENDALL MARKUP_START "c/a" MARKUP_END 74 75 #define ANSI_NORMAL ANSI_ENDALL 74 76 75 77 void init_ansi_codes(void); releases/1.8.3/0/src/funstr.c
r654 r661 593 593 int matches; 594 594 int i; 595 int j;596 595 char *qregs[NUMQ]; 597 596 int nqregs; releases/1.8.3/0/src/markup.c
r659 r661 41 41 #define ANSI_FINISH "m" 42 42 43 #define ANSI_NORMAL "\x1B[0m"43 #define COL_NORMAL "\x1B[0m" 44 44 45 45 /* COL_* and VAL_* defines */ … … 529 529 if (cur->fore == 'n') { 530 530 if (old->bits || (old->fore && old->fore != 'n') || old->back) { 531 return safe_str( ANSI_NORMAL, buff, bp);531 return safe_str(COL_NORMAL, buff, bp); 532 532 } 533 533 } … … 540 540 if ((old->bits & ~(cur->bits)) || 541 541 (old->fore && !cur->fore) || (old->back && !cur->back)) { 542 safe_str( ANSI_NORMAL, buff, bp);542 safe_str(COL_NORMAL, buff, bp); 543 543 old = &ansi_normal; 544 544 } … … 550 550 551 551 if (!(cur->fore || cur->back || cur->bits || cur->offbits)) { 552 return safe_str( ANSI_NORMAL, buff, bp);552 return safe_str(COL_NORMAL, buff, bp); 553 553 } 554 554 … … 891 891 * it overwrites (rather than modifies) */ 892 892 for (tmp = ptr; *tmp && *tmp != 'm'; tmp++) ; 893 if (strcmp(ptr, ANSI_NORMAL) != 0) {893 if (strcmp(ptr, COL_NORMAL) != 0) { 894 894 struct ansi_data cur; 895 895 read_raw_ansi_data(&cur, ptr); … … 950 950 951 951 /* For everything left on the stack: 952 * If it's an ANSI code, close it with ANSI_NORMAL and i.952 * If it's an ANSI code, close it with COL_NORMAL and i. 953 953 * If it's an HTML code, assume it's a standalone, and leave 954 954 * its stop point where it is. */
