Debian Codegraph @

regutil/regutil.rexx

raw
1 #!/usr/bin/env regina
2 /* test of the regina utilities */
3 call rxfuncadd 'sysloadfuncs','RexxUtil','sysloadfuncs'
4
5 call sysloadfuncs
6
7 say 'SysWINVer' SysWinVer()
8 say 'SysUtilVersion' SysUtilVersion()
9 call MyPause
10 say 'SysCls' SysCls()
11 say 'SysAddRexxMacro' SysAddRexxMacro(x,x)
12 say 'SysClearRexxMacroSpace' SysClearRexxMacroSpace()
13 say 'SysDropRexxMacro' SysDropRexxMacro(x)
14 --say 'SysLoadRexxMacroSpace' SysLoadRexxMacroSpace()
15 say 'SysQueryRexxMacro' SysQueryRexxMacro(x)
16 say 'SysReorderRexxMacro' SysReorderRexxMacro(x,2)
17 say 'SysSaveRexxMacroSpace' SysSaveRexxMacroSpace('tmp.macro')
18 Call Charout ,'SysCurState'
19 Call SysCurState 'off'
20 call MyPause 'cursor should be off'
21 Call Charout ,'SysCurState'
22 Call SysCurState 'on'
23 call MyPause 'cursor should be on'
24 Say 'Press a key'
25 say 'SysGetKey' SysGetKey('n')
26 say 'SysTextScreenRead' SysTextScreenRead(1,1,10)
27 say 'SysTextScreenSize' SysTextScreenSize()
28
29 /*** Demonstrate SysCurPos ***/
30 call SysCls
31 say; say 'Demonstrating SysCurPos...'
32 call SysCurPos '3', '0'
33 call MyPause 'At 3,0: Press a key'
34 call SysCurPos '10', '50'
35 call MyPause 'At 10,20: Press a key'
36 call SysCurPos '20', '20'
37 call MyPause 'At 20,20: Press a key'
38 call SysCurPos '5', '55'
39 call MyPause 'At 5,65: Press a key'
40 call SysCurPos '23', '0'
41 call MyPause
42
43 /*
44 say 'SysCloseEventSem' SysCloseEventSem()
45 say 'SysCloseMutexSem' SysCloseMutexSem()
46 say 'SysCreateEventSem' SysCreateEventSem()
47 say 'SysCreateMutexSem' SysCreateMutexSem()
48 say 'SysOpenEventSem' SysOpenEventSem()
49 say 'SysOpenMutexSem' SysOpenMutexSem()
50 say 'SysPostEventSem' SysPostEventSem()
51 say 'SysPulseEventSem' SysPulseEventSem()
52 say 'SysReleaseMutexSem' SysReleaseMutexSem()
53 say 'SysRequestMutexSem' SysRequestMutexSem()
54 say 'SysResetEventSem' SysResetEventSem()
55 say 'SysWaitEventSem' SysWaitEventSem() */
56 say 'SysBootDrive' SysBootDrive()
57 say 'SysWINVer' SysWINVer()
58 say 'SysDriveInfo' SysDriveInfo('C:\')
59 say 'SysDriveMap' SysDriveMap()
60 --say 'SysSetPriority' SysSetPriority()
61 say 'SysSleep' SysSleep(1.1)
62 say 'SysSwitchSession' SysSwitchSession('Administrator: C:\Windows\system32\cmd.exe')
63 say 'SysSystemDirectory' SysSystemDirectory()
64 say 'SysHomeDirectory' SysHomeDirectory()
65 say 'SysVolumeLabel' SysVolumeLabel()
66 say 'SysFileSystemType' SysFileSystemType('/')
67 say 'SysGetErrorText' SysGetErrorText(36)
68
69 if sysfilesearch( 'sysfilesearch','regutil/regfilesys.c','NOODLE.' ) = 0 then
70 do i = 1 to noodle.0
71 say noodle.i
72 end
73
74 if sysfilesearch( 'sysfilesearch','regutil/regfilesys.c','NOODLE.', 'c' ) = 0 then
75 do i = 1 to noodle.0
76 say noodle.i
77 end
78
79 if sysfilesearch( 'sysfilesearch','regutil/regfilesys.c','NOODLE.', 'cn' ) = 0 then
80 do i = 1 to noodle.0
81 say noodle.i
82 end
83
84 if sysfilesearch( 'sysfilesearch','regutil/regfilesys.c','NOODLE.', 'n' ) = 0 then
85 do i = 1 to noodle.0
86 say noodle.i
87 end
88
89 say 'SysPi' SysPi()
90 say 'SysCos(30)' SysCos(30,5,'D')
91 say 'SysSin(30)' SysSin(30)
92 say 'SysDropFuncs' SysDropFuncs()
93 Return
94
95 MyPause:
96 parse arg prompt
97 if prompt='' then
98 prompt='Press Enter key when ready . . .'
99 call MySay prompt
100 Pull .
101 say
102 return
103
104 MySay:
105 parse arg string
106 call charout , string
107 return