+ *h = (NCURSES_COLOR_T) (t % 360);
+}
+
+/*
+ * Change all cells which use(d) a given color pair to force a repaint.
+ */
+NCURSES_EXPORT(void)
+_nc_change_pair(SCREEN *sp, int pair)
+{
+ int y, x;
+
+ for (y = 0; y <= CurScreen(sp)->_maxy; y++) {
+ struct ldat *ptr = &(CurScreen(sp)->_line[y]);
+ bool changed = FALSE;
+ for (x = 0; x <= CurScreen(sp)->_maxx; x++) {
+ if (GetPair(ptr->text[x]) == pair) {
+ /* Set the old cell to zero to ensure it will be
+ updated on the next doupdate() */
+ SetChar(ptr->text[x], 0, 0);
+ CHANGED_CELL(ptr, x);
+ changed = TRUE;
+ }
+ }
+ if (changed)
+ NCURSES_SP_NAME(_nc_make_oldhash) (NCURSES_SP_ARGx y);
+ }