This repository has been archived by the owner on Dec 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sc_base.ch
254 lines (197 loc) · 10.1 KB
/
sc_base.ch
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
#define EXEPATH FilePath(Arg0())
#define SIFPATH trim(cDirSif)+SLASH
#define PRIVPATH trim(cDirPriv)+SLASH
#define KUMPATH trim(cDirRad)+SLASH
#define CURDIR "."+SLASH
#command ESC_EXIT => if lastkey()=K_ESC;
;exit ;
;endif
#command ESC_RETURN <x> => if lastkey()=K_ESC;
;return <x> ;
;endif
#command ESC_RETURN => if lastkey()=K_ESC;
;return ;
;endif
#command HSEEK <xpr> => dbSeek(<xpr> ,.f.)
#command MSEEK <xpr> => dbSeek(<xpr> )
#command SET MRELATION ;
[<add:ADDITIVE>] ;
[TO <key1> INTO <(alias1)> [, [TO] <keyn> INTO <(aliasn)>]] ;
;
=> if ( !<.add.> ) ;
; dbClearRel() ;
; end ;
;
; dbSetRelation( <(alias1)>,{||'1'+<key1>}, "'1'+"+<"key1"> ) ;
[; dbSetRelation( <(aliasn)>,{||'1'+<keyn>}, "'1'+"+<"keyn"> ) ]
#command EJECTA0 => qqout(chr(13)+chr(10)+chr(12)) ;
; setprc(0,0) ;
; A:=0
#command EJECTNA0 => qqout(chr(13)+chr(10)+chr(18)+chr(12)) ;
; setprc(0,0) ;
; A:=0
#command FF => gPFF()
#command P_FF => gPFF()
#xcommand P_INI => gpini()
#xcommand P_NR => gpnr()
#xcommand P_COND => gpCOND()
#xcommand P_COND2 => gpCOND2()
#xcommand P_10CPI => gP10CPI()
#xcommand P_12CPI => gP12CPI()
#xcommand F10CPI => gP10CPI()
#xcommand F12CPI => gP12CPI()
#xcommand P_B_ON => gPB_ON()
#xcommand P_B_OFF => gPB_OFF()
#xcommand P_I_ON => gPI_ON()
#xcommand P_I_OFF => gPI_OFF()
#xcommand P_U_ON => gPU_ON()
#xcommand P_U_OFF => gPU_OFF()
#xcommand P_PO_P => gPO_Port()
#xcommand P_PO_L => gPO_Land()
#xcommand P_RPL_N => gRPL_Normal()
#xcommand P_RPL_G => gRPL_Gusto()
#xcommand P_PIC_H <xpr> => gpPicH(xpr)
#xcommand P_PIC_F => gpPicF()
// stari interfejs
#xcommand INI => gPB_ON()
#xcommand B_ON => gPB_ON()
#xcommand B_OFF => gPB_OFF()
#xcommand I_ON => gPI_ON()
#xcommand I_OFF => gPI_OFF()
#xcommand U_ON => gPU_ON()
#xcommand U_OFF => gPU_OFF()
#xcommand PO_P => gPO_Port()
#xcommand PO_L => gPO_Land()
#xcommand RPL_N => gRPL_Normal()
#xcommand RPL_G => gRPL_Gusto()
#xcommand RESET => gPRESET()
#ifdef CAX
#xcommand CLOSERET => if used(); set filter to; dbunlockall(); end; return
#else
#xcommand CLOSERET => close all; return
#endif
#xcommand CLOSERET2 => close all; return
#xcommand CLOSERET <x> => close all; return <x>
#xcommand ESC_BCR => if lastkey()=K_ESC;
; close all ;
; BoxC() ;
;return ;
;endif
***
* @..SAYB
*
#command @ <row>, <col> SAYB <xpr> ;
[PICTURE <pic>] ;
[COLOR <color>] ;
;
=> DevPos( m_x+<row>, m_y+<col> ) ;
; DevOutPict( <xpr>, <pic> [, <color>] )
***
* @..GETB
*
#command @ <row>, <col> GETB <var> ;
[PICTURE <pic>] ;
[VALID <valid>] ;
[WHEN <when>] ;
[SEND <msg>] ;
;
=> SetPos( m_x+<row>, m_y+<col> ) ;
; AAdd( ;
GetList, ;
_GET_( <var>, <(var)>, <pic>, <{valid}>, <{when}> ) ;
) ;
[; ATail(GetList):<msg>]
***
* @..SAYB..GETB
*
#command @ <row>, <col> SAYB <sayxpr> ;
[<sayClauses,...>] ;
GETB <var> ;
[<getClauses,...>] ;
;
=> @ <row>, <col> SAYB <sayxpr> [<sayClauses>] ;
; @ Row(), Col()+1 GETB <var> [<getClauses>]
#xcommand DO WHILESC <exp> => while <exp> ;
;if inkey()==27 ;
; dbcloseall() ;
; SET(_SET_DEVICE,"SCREEN") ;
; SET(_SET_CONSOLE,"ON") ;
; SET(_SET_PRINTER,"") ;
; SET(_SET_PRINTFILE,"") ;
; MsgC() ;
; return ;
;endif
#command KRESI <x> NA <len> => <x>:=left(<x>,<len>)
#command START PRINT CRET <x> => if !StartPrint() ;
;close all ;
;return <x> ;
;endif
#command START PRINT CRET => if !StartPrint() ;
;close all ;
;return ;
;endif
#command START PRINT CRET DOCNAME <y> => if !StartPrint(nil, nil, <y>) ;
;close all ;
;return ;
;endif
#command START PRINT CRET <x> DOCNAME <y> => if !StartPrint(nil, nil, <y> ) ;
;close all ;
;return <x> ;
;endif
#command START PRINT RET <x> => if !StartPrint() ;
;return <x> ;
;endif
#command START PRINT RET => if !StartPrint() ;
;return ;
;endif
#command START PRINT2 CRET <p>, <x> => IF !SPrint2(<p>) ;
;close all ;
;return <x> ;
;endif
#command START PRINT2 CRET <p> => if !Sprint2(<p>) ;
;close all ;
;return ;
;endif
#command END PRN2 <x> => Eprint2(<x>)
#command END PRN2 => Eprint2()
#command END PRINT => EndPrint()
#command EOF CRET <x> => if EofFndret(.t.,.t.) ;
;return <x> ;
;endif
#command EOF CRET => if EofFndret(.t.,.t.) ;
;return ;
;endif
#command EOF RET <x> => if EofFndret(.t.,.f.) ;
;return <x> ;
;endif
#command EOF RET => if EofFndret(.t.,.f.) ;
;return ;
;endif
#command NFOUND CRET <x> => if EofFndret(.f.,.t.) ;
;return <x> ;
;endif
#command NFOUND CRET => if EofFndret(.f.,.t.) ;
;return ;
;endif
#command NFOUND RET <x> => if EofFndret(.f.,.f.) ;
;return <x> ;
;endif
#command NFOUND RET => if EofFndret(.f.,.f.) ;
;return ;
;endif
#command USEX <(db)> ;
[VIA <rdd>] ;
[ALIAS <a>] ;
[<new: NEW>] ;
[<ro: READONLY>] ;
[INDEX <(index1)> [, <(indexn)>]] ;
;
=> PreUseEvent(<(db)>,.f.,gReadOnly) ;
; dbUseArea( ;
<.new.>, <rdd>, <(db)>, <(a)>, ;
.f., gReadOnly ;
) ;
;
[; dbSetIndex( <(index1)> )] ;
[; dbSetIndex( <(indexn)> )]
#define DE_REF 12 // Force reread/redisplay of all data rows