Skip to content

Instantly share code, notes, and snippets.

@maz
Created November 22, 2009 21:35
Show Gist options
  • Save maz/240733 to your computer and use it in GitHub Desktop.
Save maz/240733 to your computer and use it in GitHub Desktop.
package curses
/*
#include <stdlib.h>
#define NCURSES_ENABLE_STDBOOL_H 0
#include <curses.h>
*/
import "C"
import "unsafe"
type Window C.WINDOW
var Stdscr=nil
func Init(){
C.initscr();
Stdscr=C.stdscr;
}
func Printw(str string){
p:=C.CString(str);
C.printw("%s",p);
C.free(unsafe.Pointer(p));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment