Skip to content

Instantly share code, notes, and snippets.

@tuturto
Created April 1, 2015 03:58
Show Gist options
  • Save tuturto/1c011c371f6629073bdf to your computer and use it in GitHub Desktop.
Save tuturto/1c011c371f6629073bdf to your computer and use it in GitHub Desktop.
Getting cl-charms to support colour in Windows and sdl build of pdcurses
(in-package #:cl-charms/low-level)
; #define COLOR_PAIR(n) (((chtype)(n) << PDC_COLOR_SHIFT) & A_COLOR)
; for 32-bit curses
(defun COLOR-PAIR (n)
(logand (ash n 24) #xff000000))
;(defun COLOR-PAIR (n)
; (logand (ash n 24) (ash #x7fffffff 24)))
(export (find-symbol "COLOR-PAIR" ':cl-charms/low-level) ':cl-charms/low-level)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment