Changeset d98e501


Ignore:
Timestamp:
Jul 24, 2011, 3:42:52 PM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
release-1.8
Children:
efef058
Parents:
a71b4e0
git-author:
David Benjamin <davidben@mit.edu> (07/24/11 15:37:54)
git-committer:
David Benjamin <davidben@mit.edu> (07/24/11 15:42:52)
Message:
Workaround color-pairs and broken build on Solaris locker build

This reverts commit a71b4e049b7d1a44ddd3f918e67c45e2f8bbef2f. Really
should have verified the Solaris build first. Everything is ready for us
to not need this change, but the locker build of ncurses needs to be
updated. In the meantime, hack around the bug by clamping color pairs.

Also revert wbkgrndset because it requires cchar_t. That gets defined on
_XOPEN_SOURCE_EXTENDED or _XOPEN_SOURCE>=500. Unfortunately, the check
for the latter was added after the locker version, and Solaris is a
stickler about flags so _XOPEN_SOURCE>=500 and _XOPEN_SOURCE_EXTENDED
conflict.

Revert this change when we bundle a newer ncurses.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fmtext.c

    ra71b4e0 rd98e501  
    186186static void _owl_fmtext_wcolor_set(WINDOW *w, short pair)
    187187{
    188   cchar_t background;
    189   wchar_t blank[2] = { ' ', 0 };
    190188  if (has_colors()) {
    191       wcolor_set(w, pair, NULL);
    192       /* Set the background with wbkgrndset so that we can handle color-pairs
    193        * past 256 on ncurses ABI 6 and later. */
    194       setcchar(&background, blank, 0, pair, NULL);
    195       wbkgrndset(w, &background);
     189      wcolor_set(w,pair,NULL);
     190      wbkgdset(w, COLOR_PAIR(pair));
    196191  }
    197192}
  • util.c

    r8219374 rd98e501  
    732732  return MIN(COLOR_PAIRS, 256);
    733733#else
    734   return COLOR_PAIRS;
     734  /* In theory ext-color support should allow for 256 color pairs, but there's
     735   * a bug in ncurses. The fix is now upstreamed. The commit which introduced
     736   * this change (and simultaneously reverted the wbkgrndset change to fix the
     737   * build on Solaris) should be reverted when we ship a new locker ncurses. */
     738  return MIN(COLOR_PAIRS, 256);
    735739#endif
    736740}
Note: See TracChangeset for help on using the changeset viewer.