curs_set may return either the old visibility or ERR

This commit is contained in:
mainzelm 2005-06-01 16:06:13 +00:00
parent c48ea3b152
commit 743ca2bc0a
2 changed files with 8 additions and 10 deletions

View File

@ -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)

View File

@ -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")