Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Worst part about coding in Haskell, Lisp...

Name: Anonymous 2007-09-12 16:38 ID:3FGjgr6f

...and other toy languages is interfacing with system calls and libraries written in real EXPERT PROGRAMMING LANGUAGES like C to actually be able to do something useful.

Name: Anonymous 2007-09-12 18:29 ID:bYGHylj4

>>6
Something like this, when using CFFI:
(define-foreign-library libncurses
    (:unix (:or "libncurses.so.5" "libncurses.so"))
  (t (:default "libncurses")))

(use-foreign-library libncurses)

(defctype window-ptr :pointer)
(defctype bool :int)

(defcfun "initscr" window-ptr)
(defcfun ("start_color" start-color) :int)

(defcfun "endwin" :int)

Or, rather, exactly like that.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List