Changeset eeeef20


Ignore:
Timestamp:
Jan 24, 2007, 12:18:11 AM (14 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
0331c8f
Parents:
0c8ab5e
Message:
Fully resetting the colorpair manager with its reset function to fix a
logic error that I introduced earlier by making an invalid assumption.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fmtext.c

    r1bdffcb reeeef20  
    681681void owl_fmtext_reset_colorpairs()
    682682{
    683   memset(owl_global_get_colorpair_mgr(&g)->used, 0, COLOR_PAIRS * sizeof(char)); 
     683  int i, j, colors;
     684  owl_colorpair_mgr *cpmgr = owl_global_get_colorpair_mgr(&g);
     685  memset(cpmgr->used, 0, COLOR_PAIRS * sizeof(char)); 
     686
     687  colors = COLORS + 1; // 1 to account for "default".
     688  for(i = 0; i < colors; i++) {
     689    for(j = 0; j < COLORS; j++) {
     690      cpmgr->pairs[i][j] = -1;
     691    }
     692  }
    684693}
    685694
Note: See TracChangeset for help on using the changeset viewer.