unattended symbol
Posted: Sun Oct 30, 2005 8:06 pm
here the code (modified newdep's example):
when I load it, I have following contents of NCR context:
Note about the last NCR:x symbol. Where is it from?
I think it must not be present... Or I have a mistake somewhere?
Code: Select all
(context 'NCR)
(set 'ncfuncs '(
"initscr" "box" "newwin" "endwin" "delwin" "wgetch" "wrefresh" "mvwprintw"
"wprintw" "refresh" "wmove" "scrollok" "nl" "werase" "LINES" "COLS" "noecho"
"delch" "waddch" "keypad" "wclrtoeol"))
;;; import library functions
(define (import-ncurses)
(let (ctx (context))
(dolist (x ncfuncs) (import "/lib/libncurses.so.5" x))
(context ctx)))
(context 'MAIN)
Code: Select all
newLISP v.8.7.0 on linux, execute 'newlisp -h' for more info.
> (NCR:import-ncurses)
MAIN
> (symbols NCR)
(NCR:COLS NCR:LINES NCR:attach-ncurses NCR:cons-win NCR:ctx NCR:import-ncurses
NCR:init-ncurses NCR:ncfuncs NCR:str NCR:termsize NCR:wappend NCR:werase
NCR:win NCR:wprintw NCR:wrefresh NCR:wset NCR:x)
>
I think it must not be present... Or I have a mistake somewhere?