diff --git a/c/ncurses.c b/c/ncurses.c index cf7fcf1..00d9527 100755 --- a/c/ncurses.c +++ b/c/ncurses.c @@ -606,12 +606,11 @@ s48_value scsh_savetty(void) s48_value scsh_curs_set(s48_value visibility) { - s48_value res; - S48_DECLARE_GC_PROTECT(2); - S48_GC_PROTECT_2(visibility, res); - res = s48_enter_integer(curs_set(s48_extract_integer(visibility))); - S48_GC_UNPROTECT(); - return res; + int old_vis; + old_vis = curs_set(s48_extract_fixnum(visibility)); + if (old_vis == ERR) + return S48_FALSE; + else return s48_enter_fixnum(old_vis); } s48_value scsh_napms(s48_value ms) diff --git a/scheme/ncurses.scm b/scheme/ncurses.scm index 3536152..f398fc1 100755 --- a/scheme/ncurses.scm +++ b/scheme/ncurses.scm @@ -42,7 +42,6 @@ (values) (signal 'curses-error function-name))) - (define (raise-curses-error function-name) (signal 'curses-error function-name)) @@ -421,8 +420,8 @@ (visibility) "scsh_curs_set") (define (curs-set visibility) - (return-curses-code-int "curs-set" - (curs-set-internal visibility))) + (or (curs-set-internal visibility) + (raise-curses-error "curs_set"))) (import-lambda-definition napms-internal @@ -1607,4 +1606,4 @@ (file-descriptor rows columns x-pixels y-pixels) "scsh_set_term_window_size") - \ No newline at end of file +