Changeset ee310eb for fmtext.c


Ignore:
Timestamp:
Feb 3, 2008, 1:08:11 AM (13 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:
99219ed
Parents:
625802a (diff), af1920fd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:
Merged revisions 909-923 via svnmerge from 
file:///afs/sipb.mit.edu/project/barnowl/src/svn/trunk

........
  r910 | nelhage | 2008-01-29 20:47:41 -0500 (Tue, 29 Jan 2008) | 1 line
  
  Fix IRC -- I forgot to add one ->conn in the last patch
........
  r911 | asedeno | 2008-01-30 15:49:35 -0500 (Wed, 30 Jan 2008) | 5 lines
  
  Jabber Buddy Lists:
  * Query the jabber:show_offline_buddies once when invoking onGetBuddyList()
  * Don't bold online roster entries when hiding offline ones
........
  r922 | asedeno | 2008-02-03 00:49:46 -0500 (Sun, 03 Feb 2008) | 1 line
  
  Bounds checking.
........
  r923 | asedeno | 2008-02-03 01:01:07 -0500 (Sun, 03 Feb 2008) | 1 line
  
  Portability - removing C++ style comments.
........
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fmtext.c

    rc55ad84 ree310eb  
    793793void owl_fmtext_init_colorpair_mgr(owl_colorpair_mgr *cpmgr)
    794794{
    795   // This could be a bitarray if we wanted to save memory.
     795  /* This could be a bitarray if we wanted to save memory. */
    796796  short i, j;
    797797  cpmgr->next = 8;
    798798 
    799   // The test is <= because we allocate COLORS+1 entries.
     799  /* The test is <= because we allocate COLORS+1 entries. */
    800800  cpmgr->pairs = owl_malloc((COLORS+1) * sizeof(short*));
    801801  for(i = 0; i <= COLORS; i++) {
     
    823823    cpmgr->next = 8;
    824824   
    825     // The test is <= because we allocated COLORS+1 entries.
     825    /* The test is <= because we allocated COLORS+1 entries. */
    826826    for(i = 0; i <= COLORS; i++) {
    827827      for(j = 0; j <= COLORS; j++) {
     
    844844  short pair, default_bg;
    845845
     846  /* Sanity (Bounds) Check */
     847  if (fg > COLORS || fg < OWL_COLOR_DEFAULT) fg = OWL_COLOR_DEFAULT;
     848  if (bg > COLORS || bg < OWL_COLOR_DEFAULT) bg = OWL_COLOR_DEFAULT;
     849           
    846850#ifdef HAVE_USE_DEFAULT_COLORS
    847851  if (fg == OWL_COLOR_DEFAULT) fg = -1;
     
    853857#endif
    854858
    855   // looking for a pair we already set up for this draw.
     859  /* looking for a pair we already set up for this draw. */
    856860  cpmgr = owl_global_get_colorpair_mgr(&g);
    857861  pair = cpmgr->pairs[fg+1][bg+1];
    858862  if (!(pair != -1 && pair < cpmgr->next)) {
    859 /*    owl_global_set_needrefresh(&g);*/
    860     // If we didn't find a pair, search for a free one to assign.
     863    /* If we didn't find a pair, search for a free one to assign. */
    861864    pair = (cpmgr->next < COLOR_PAIRS) ? cpmgr->next : -1;
    862865    if (pair != -1) {
    863       // We found a free pair, initialize it.
     866      /* We found a free pair, initialize it. */
    864867      init_pair(pair, fg, bg);
    865868      cpmgr->pairs[fg+1][bg+1] = pair;
     
    867870    }
    868871    else if (bg != OWL_COLOR_DEFAULT) {
    869       // We still don't have a pair, drop the background color. Too bad.
     872      /* We still don't have a pair, drop the background color. Too bad. */
    870873      owl_function_debugmsg("colorpairs: color shortage - dropping background color.");
    871874      pair = owl_fmtext_get_colorpair(fg, OWL_COLOR_DEFAULT);
    872875    }
    873876    else {
    874       // We still don't have a pair, defaults all around.
     877      /* We still don't have a pair, defaults all around. */
    875878      owl_function_debugmsg("colorpairs: color shortage - dropping foreground and background color.");
    876879      pair = 0;
Note: See TracChangeset for help on using the changeset viewer.