Changeset b1ed3e2
- Timestamp:
- Feb 4, 2011, 5:33:20 PM (14 years ago)
- Branches:
- release-1.7
- Children:
- 22662d7
- Parents:
- 337383e
- git-author:
- David Benjamin <davidben@mit.edu> (01/25/11 16:58:31)
- git-committer:
- David Benjamin <davidben@mit.edu> (02/04/11 17:33:20)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fmtext.c
r7ba2ad4 rb1ed3e2 911 911 { 912 912 /* This could be a bitarray if we wanted to save memory. */ 913 short i, j; 914 cpmgr->next = 8; 915 913 short i; 916 914 /* The test is <= because we allocate COLORS+1 entries. */ 917 915 cpmgr->pairs = owl_malloc((COLORS+1) * sizeof(short*)); 918 916 for(i = 0; i <= COLORS; i++) { 919 917 cpmgr->pairs[i] = owl_malloc((COLORS+1) * sizeof(short)); 918 } 919 owl_fmtext_reset_colorpairs(cpmgr); 920 } 921 922 /* Reset used list */ 923 void owl_fmtext_reset_colorpairs(owl_colorpair_mgr *cpmgr) 924 { 925 short i, j; 926 927 cpmgr->next = 8; 928 /* The test is <= because we allocated COLORS+1 entries. */ 929 for(i = 0; i <= COLORS; i++) { 920 930 for(j = 0; j <= COLORS; j++) { 921 931 cpmgr->pairs[i][j] = -1; … … 923 933 } 924 934 if (owl_global_get_hascolors(&g)) { 925 for(i = 0; i < 8; i++) {926 short fg, bg;927 if (i >= COLORS) continue;928 pair_content(i, &fg, &bg);929 cpmgr->pairs[fg+1][bg+1] = i;930 }931 }932 }933 934 /* Reset used list */935 void owl_fmtext_reset_colorpairs(void)936 {937 if (owl_global_get_hascolors(&g)) {938 short i, j;939 owl_colorpair_mgr *cpmgr = owl_global_get_colorpair_mgr(&g);940 cpmgr->next = 8;941 942 /* The test is <= because we allocated COLORS+1 entries. */943 for(i = 0; i <= COLORS; i++) {944 for(j = 0; j <= COLORS; j++) {945 cpmgr->pairs[i][j] = -1;946 }947 }948 935 for(i = 0; i < 8; i++) { 949 936 short fg, bg; -
mainwin.c
r5cc7e5e rb1ed3e2 53 53 markedmsgid = owl_global_get_markedmsgid(&g); 54 54 v = owl_global_get_current_view(&g); 55 owl_fmtext_reset_colorpairs( );55 owl_fmtext_reset_colorpairs(owl_global_get_colorpair_mgr(&g)); 56 56 57 57 if (v==NULL) {
Note: See TracChangeset
for help on using the changeset viewer.