24 lines
570 B
Rexx
Executable File
24 lines
570 B
Rexx
Executable File
#!/usr/bin/env rexx
|
|
/* test_init.rex - Test library initialization */
|
|
|
|
do
|
|
/* Register a simple function */
|
|
call RxFuncAdd "OrxCurVersion", "orxncurses", "OrxCurVersion"
|
|
|
|
/* Test it */
|
|
version = OrxCurVersion()
|
|
say "Version: " version
|
|
|
|
/* Try initializing ncurses */
|
|
call RxFuncAdd "OrxCurInitscr", "orxncurses", "OrxCurInitscr"
|
|
call RxFuncAdd "OrxCurEndwin", "orxncurses", "OrxCurEndwin"
|
|
call OrxCurInitscr
|
|
say "Initscr worked!"
|
|
call OrxCurEndwin
|
|
end
|
|
|
|
catch error
|
|
say "Error:" error~message
|
|
call OrxCurEndwin
|
|
exit
|