-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmain.r3
More file actions
189 lines (159 loc) · 2.93 KB
/
Copy pathmain.r3
File metadata and controls
189 lines (159 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
| start program
| PHREDA 2025
|---------------
^r3/util/tui.r3
^r3/util/tuiedit.r3
^r3/term/filedirs.r3
|^r3/lib/trace.r3
|--------------------------------
#basepath "r3/"
#fullpath * 1024
#nameaux * 1024
#vfolder 0 0
#scratchpad * 1024
#info * 64
|---------------------
:loadm
'nameaux "mem/menu.mem" load
'nameaux =? ( drop ; )
'nameaux dup c@ 0? ( 2drop ; ) drop
dup 'fullpath strcpy
flOpenFullPath 'vfolder !
'fullpath
".r3" =pos 1? ( drop TuLoadCode ; )
2drop
tuNewCode ;
:savem
'fullpath 1024 "mem/menu.mem" save ;
|---------------------------
:banner
.cls "[01R[023[03f[04o[05r[06t[07h" .awrite .cr .cr .cr .cr .flush ;
:runcheck
banner
here dup "mem/errorm.mem" load
over =? ( 2drop ; )
0 swap c!
.cr .bred .white " * ERROR * " .write .cr
.reset .write .cr
.bblue .white " Any key to continue... " .write .cr
.flush
waitkey ;
:filerun
fuente c@ 0? ( drop ; ) drop
banner
savem
'fullpath
|WIN| "cmd /c r3 ""%s"""
|LIN| "./r3lin ""%s"""
sprint sys | run
.reterm .alsb .flush
runcheck
tuR! ;
:fileedit
fuente c@ 0? ( drop ; ) drop
.masb .flush
savem
||WIN| "r3 r3/editor/code-edit.r3"
||LIN| "./r3lin r3/editor/code-edit.r3"
|WIN| "r3 r3/d4/r3ide.r3"
|LIN| "./r3lin r3/d4/r3ide.r3"
sys
.reterm .alsb .flush
tuR! ;
:filenew
;
:filesearch
;
:command
;
|--------------------------------
|------------
:paneleditor
fuente c@ 0? ( drop ; ) drop
.wbordec
1 1 flpad
| tuEditCode
tuReadCode
;
|------------
:changefiles
vfolder flTreePath
'basepath 'fullpath strcpyl 1- strcpy
'fullpath c@ 0? ( drop tuNewCode ; ) drop |
'fullpath
".r3" =pos 1? ( drop TuLoadCode ; )
2drop
tuNewCode ;
:setcolor | str -- str
"/" =pos 1? ( drop 7 .fc ; ) drop
".r3" =pos 1? ( drop 11 .fc ; ) drop
14 .fc ;
:filecolor
setcolor lwrite ;
:dirpanel
.reset
'filecolor xwrite!
tuwin $1 " Dir " .wtitle
1 1 flpad |$00 xalign
'vfolder uiDirs tuTree
xwrite.reset
tuX? 1? ( changefiles ) drop
;
|------------
:setcmd
0 'scratchpad ! tuRefocus
"command" 'info strcpy
;
:dirpad
.reset | tuwin $1 " Command " .wtitle
.wbordec
1 1 flpad
fx fy .at
| 'scratchpad 1024 tuInputline
| tuX? 1? ( setcmd ) drop
'fullpath .write | flcr
;
|------------
:scrmain
.bblack .home |.cls
|___________
4 flxN
fx fy .at "[01R[023[03f[04o[05r[06t[07h" .awrite
|.tdebug
2dup " %d %d " .print
|___________
1 flxS
fx fy .at " |ESC| Exit |F1| Run |F2| Ide |F3| Search |F4| Clon |F5| New |F10| Help" .write
|___________
38 flxO
dirpanel
|-4 flxS dirfile
|___________
|1 flxE
-4 flxS
paneleditor
|___________
flxRest
dirpad
.flush
uikey
[ENTER] =? ( filerun )
[f1] =? ( filerun )
[f2] =? ( fileedit )
| [f3] =? ( filesearch )
| [f4] =? ( fileclon )
| [f5] =? ( filenew )
| [f10] =? ( help )
drop
;
|-----------------------------------
:main
'basepath flScanFullDir
TuNewCode |"main.r3" TuLoadCode
loadm
33 | <<< debug
'scrmain onTui
drop
|savem
;
: .alsb main .masb .free ;