1 commit 102e74e7abbc100386b8ec4593e1331849508beb
  2 Author: Маздайщик <a.v.konovalov87@mail.ru>
  3 Date:   Fri Jan 5 15:50:59 2018 +0300
  4 
  5     Вроде работает поддержка srefc
  6 
  7 diff --git a/doc/install.lst b/doc/install.lst
  8 index aeaae56..b7e3df4 100644
  9 --- a/doc/install.lst
 10 +++ b/doc/install.lst
 11 @@ -111,7 +111,7 @@ scp4a scp $1 $2 $3 $4 $5 $6 $7 $8 $9 || exit 1
 12  @set SOURSCP=..\
 13  @set REF5RSL=%SOURSCP%
 14  @set TMPSCP=%SOURSCP%
 15 -@refgo main_scp  %1 %2 %3 %4 %5 %6 %7 %8 %9
 16 +@main_scp.exe  %1 %2 %3 %4 %5 %6 %7 %8 %9
 17  ]
 18 
 19  [ unix scp4a
 20 @@ -119,7 +119,7 @@ setenv SOURSCP ../
 21  setenv REF5RSL ${SOURSCP}
 22  setenv TMPSCP ${SOURSCP}
 23  echo
 24 -refgo main_scp  $1 $2 $3 $4 $5 $6 $7 $8 $9 || exit 1 
 25 +main_scp  $1 $2 $3 $4 $5 $6 $7 $8 $9 || exit 1
 26  echo
 27  ]
 28 
 29 @@ -863,14 +863,14 @@ scpwholp divide.ref div999 || exit 1
 30  * d_regeKK.bat *********************
 31  * Specialization an interpreter of regular expresions.
 32  [ windowsNT demo\d_regeKK.bat
 33 -@refc rege1.ref
 34 +@call srefc -C rege1.ref
 35  @if %ERRORLEVEL% NEQ 0 goto :END
 36  @call scpwholp rege.ref regekk +rege1
 37  :END
 38  ]
 39 
 40  [ unix demo/d_regeKK
 41 -( refc rege1.ref && scpwholp rege.ref regekk +rege1 ) || exit 1
 42 +( srefc -C rege1.ref && scpwholp rege.ref regekk +rege1 ) || exit 1
 43  ]
 44 
 45  [ dos demo\d_regeKK.bat
 46 @@ -888,14 +888,14 @@ scpwholp divide.ref div999 || exit 1
 47  * d_regeAB.bat *********************
 48  * Specialization an interpreter of regular expresions.
 49  [ windowsNT demo\d_regeAB.bat
 50 -@refc rege1.ref
 51 +@call srefc -C rege1.ref
 52  @if %ERRORLEVEL% NEQ 0 goto :END
 53  @call scpwholp rege.ref regeab +rege1
 54  :END
 55  ]
 56 
 57  [ unix demo/d_regeAB
 58 -( refc rege1.ref && scpwholp rege.ref regeab +rege1 ) || exit 1
 59 +( srefc -C rege1.ref && scpwholp rege.ref regeab +rege1 ) || exit 1
 60  ]
 61 
 62  [ dos demo\d_regeAB.bat
 63 @@ -913,14 +913,14 @@ scpwholp divide.ref div999 || exit 1
 64  * d_rege12.bat *********************
 65  * Specialization an interpreter of regular expresions.
 66  [ windowsNT demo\d_rege12.bat
 67 -@refc rege1.ref
 68 +@call srefc -C rege1.ref
 69  @if %ERRORLEVEL% NEQ 0 goto :END
 70  @call scpwholp rege.ref rege12 +rege1
 71  :END
 72  ]
 73 
 74  [ unix demo/d_rege12
 75 -( refc rege1.ref && scpwholp rege.ref rege12 +rege1 ) || exit 1
 76 +( srefc -C rege1.ref && scpwholp rege.ref rege12 +rege1 ) || exit 1
 77  ]
 78 
 79  [ dos demo\d_rege12.bat
 80 @@ -938,14 +938,14 @@ scpwholp divide.ref div999 || exit 1
 81  * d_regABi.bat *********************
 82  * Specialization an interpreter of regular expresions.
 83  [ windowsNT demo\d_regABi.bat
 84 -@refc rege1.ref
 85 +@call srefc -C rege1.ref
 86  @if %ERRORLEVEL% NEQ 0 goto :END
 87  @call scpwholp rege.ref regabi +rege1
 88  :END
 89  ]
 90 
 91  [ unix demo/d_regABi
 92 -( refc rege1.ref && scpwholp rege.ref regabi +rege1 ) || exit 1
 93 +( srefc -C rege1.ref && scpwholp rege.ref regabi +rege1 ) || exit 1
 94  ]
 95 
 96  [ dos demo\d_regABi.bat
 97 @@ -963,14 +963,14 @@ scpwholp divide.ref div999 || exit 1
 98  * d_regAB2.bat *********************
 99  * Specialization an interpreter of regular expresions.
100  [ windowsNT demo\d_regab2.bat
101 -@refc rege1.ref
102 +@call srefc -C rege1.ref
103  @if %ERRORLEVEL% NEQ 0 goto :END
104  @call scpwholp rege.ref regab2 +rege1
105  :END
106  ]
107 
108  [ unix demo/d_regAB2
109 -( refc rege1.ref && scpwholp rege.ref regab2 +rege1 ) || exit 1
110 +( srefc -C rege1.ref && scpwholp rege.ref regab2 +rege1 ) || exit 1
111  ]
112 
113  [ dos demo\d_regAB2.bat
114 @@ -988,7 +988,7 @@ scpwholp divide.ref div999 || exit 1
115  * d_formi.bat *********************
116  * Formula of inversion of a rational complex number.
117  [ windowsNT demo\d_formi.bat
118 -@refc q.ref
119 +@call srefc -C q.ref
120  @if %ERRORLEVEL% NEQ 0 goto :END
121  @call inref4p formula.ref
122  @if %ERRORLEVEL% NEQ 0 goto :END
123 @@ -1003,7 +1003,7 @@ scpwholp divide.ref div999 || exit 1
124  ]
125 
126  [ unix demo/d_formi
127 -( refc q.ref   &&  inref4p formula.ref  &&
128 +( srefc -C q.ref   &&  inref4p formula.ref  &&
129    mst4p formulai.mst && scp4 formulai.mst +q &&
130    redund             && cgr54 r_formi
131  ) || exit 1
132 @@ -1036,7 +1036,7 @@ scpwholp divide.ref div999 || exit 1
133  * d_formc.bat *********************
134  * Arithmetic of the rational complex numbers.
135  [ windowsNT demo\d_formc.bat
136 -@refc q.ref
137 +@call srefc -C q.ref
138  @if %ERRORLEVEL% NEQ 0 goto :END
139  @call inref4p formula.ref
140  @if %ERRORLEVEL% NEQ 0 goto :END
141 @@ -1051,7 +1051,7 @@ scpwholp divide.ref div999 || exit 1
142  ]
143 
144  [ unix demo/d_formc
145 -( refc q.ref   && inref4p formula.ref  &&
146 +( srefc -C q.ref   && inref4p formula.ref  &&
147    mst4p formulac.mst && scp4 formulac.mst +q &&
148    redund             && cgr54 r_formc
149  ) || exit 1
150 @@ -1084,7 +1084,7 @@ scpwholp divide.ref div999 || exit 1
151  * d_form2.bat *********************
152  * Arithmetic of the rational numbers a+b*Sqrt(2).
153  [ windowsNT demo\d_form2.bat
154 -@refc q.ref
155 +@call srefc -C q.ref
156  @if %ERRORLEVEL% NEQ 0 goto :END
157  @call inref4p formula.ref
158  @if %ERRORLEVEL% NEQ 0 goto :END
159 @@ -1099,7 +1099,7 @@ scpwholp divide.ref div999 || exit 1
160  ]
161 
162  [ unix demo/d_form2
163 -( refc q.ref && inref4p formula.ref  &&
164 +( srefc -C q.ref && inref4p formula.ref  &&
165    mst4p formula2.mst && scp4 formula2.mst +q &&
166    redund  && cgr54 r_form2
167  ) || exit 1
168 @@ -1313,44 +1313,25 @@ scpwholp refal || exit 1
169 
170  [ windowsNT refcall.bat
171  : " Scp4-all-translation. "
172 -refc trace.ref
173 -refc scp4.ref
174 -refc drive.ref
175 -refc basic.ref
176 -refc comparet.ref
177 -refc access.ref
178 -refc analyse.ref
179 -refc global.ref
180 -refc final.ref
181 -refc key.ref
182 -refc reflib.ref
183 -refc main_scp.ref
184 +call srefc -o scp-core.exe trace scp4 drive basic comparet access analyse global key final reflib
185 +call srefc main_scp LibraryEx
186  : " Inref4-translation. "
187 -refc inref4.ref
188 -refc difful4.ref
189 -refc diskout4.ref
190 -refc inform.ref
191 -refc warning.ref
192 +call srefc -o inref-core.exe inref4 difful4 diskout4 inform key warning
193  : " Mst4-translation. "
194 -refc mst.ref
195 -refc diskout4.ref
196 +call srefc -o mst-core.exe mst diskout4 key warning
197  : " cgr54-translation. "
198 -refc cgr54.ref
199 +call srefc -o cgr54-core.exe cgr54 key
200  : " Clearance input/output formats. "
201 -refc redund.ref
202 +call srefc -o redund-core.exe redund key reflib
203  ]
204 
205  [ unix refcall.bat
206 -if ( !( (refc trace.ref) && (refc scp4.ref) && 
207 -        (refc drive.ref) && (refc basic.ref) &&
208 -        (refc comparet.ref) && (refc access.ref) &&
209 -        (refc analyse.ref)  && (refc global.ref) &&
210 -        (refc final.ref) && (refc key.ref) &&
211 -        (refc reflib.ref) && (refc main_scp.ref) &&  
212 -        (refc inref4.ref) && (refc difful4.ref) &&  
213 -        (refc diskout4.ref) && (refc inform.ref) &&   
214 -        (refc warning.ref) && (refc mst.ref) &&  
215 -        (refc cgr54.ref) && (refc redund.ref)   
216 +if ( !( (srefc -o scp-core trace scp4 drive basic comparet access analyse global key final reflib) &&
217 +        (srefc main_scp LibraryEx)
218 +        (srefc -o mst-core mst diskout4 key warning) &&
219 +        (srefc -o inref-core inref4 difful4 diskout4 inform key warning) &&
220 +        (srefc -o redund-core redund key reflib) &&
221 +        (srefc -o cgr54-core cgr54 key)
222     ) )  then exit 1;
223  fi
224  ]
225 @@ -1474,7 +1455,8 @@ $ENTRY OpSystem      { = 'mac' }
226 
227  $ENTRY HereDir       { = }              /* working directory symbol*/
228  $ENTRY SubDir        { = '\\' }         /* subdirectory symbol */
229 -       MemLim        { = ' -l16' }      /* memory limit */
230 +       MemLim        { = /* none */ }   /* memory limit, unused by srefc */
231 +       Exe           { = '.exe' }       /* executable file extension */
232 
233  ********************** End of the second part. *************************
234 
235 @@ -1486,7 +1468,8 @@ $ENTRY SubDir        { = '\\' }         /* subdirectory symbol */
236 
237  $ENTRY HereDir       { = }              /* working directory symbol*/
238  $ENTRY SubDir        { = '/' }          /* subdirectory symbol */
239 -       MemLim        { = ' -l32' }      /* memory limit */
240 +       MemLim        { = /* none */ }   /* memory limit, unused by srefc */
241 +       Exe           { = /* none */ }   /* executable file extension */
242 
243  ********************** End of the second part. *************************
244 
245 @@ -1499,6 +1482,7 @@ $ENTRY SubDir        { = '/' }          /* subdirectory symbol */
246  $ENTRY HereDir       { = }              /* working directory symbol*/
247  $ENTRY SubDir        { = '\\' }         /* subdirectory symbol */
248         MemLim        { = ' -l8' }      /* memory limit */
249 +       Exe           { = '.exe' }       /* executable file extension */
250 
251  ********************** End of the second part. *************************
252 
253 @@ -1511,6 +1495,7 @@ $ENTRY SubDir        { = '\\' }         /* subdirectory symbol */
254  $ENTRY HereDir       { = ':' }         /* working directory symbol*/
255  $ENTRY SubDir        { = ':' }         /* subdirectory symbol */
256         MemLim        { = ' -l8' }      /* memory limit */
257 +       Exe           { = /* none? */ } /* executable file extension */
258 
259  ********************** End of the second part. *************************
260 
261 diff --git a/doc/install.lst b/doc/install.lst.old
262 similarity index 100%
263 copy from doc/install.lst
264 copy to doc/install.lst.old
265 diff --git a/install.ref b/install.ref
266 index eb740df..ad0163e 100644
267 --- a/install.ref
268 +++ b/install.ref
269 @@ -182,8 +182,12 @@ Help {
270         <Prout 'name of your operating system'>
271          <Prout ', where the name can be:'>
272          <Prout '         windowsNT'>
273 +***** <A.Konovalov, 2018-01-05>: don't support DOS-based systems
274 +/*
275          <Prout '         windows98'>
276          <Prout '         windows95'>
277 +*/
278 +***** </A.Konovalov>
279          <Prout '         linux'>
280          <Prout '         unix'>
281  /*
282 @@ -249,8 +253,8 @@ OpSystem {
283   'unix' = <Install> <ChangeModes <Dg Batch>>;
284   'windowsNT' = <Install>;
285   'windows' = <OpSystem 'windowsNT'>;
286 - 'windows95' = <Install>;
287 - 'windows98' = <OpSystem 'windows95'>;
288 +* 'windows95' = <Install>;
289 +* 'windows98' = <OpSystem 'windows95'>;
290  * 'mac' = <Install>;
291   'linux' = <OpSystem 'unix'>;
292   e.X =  <Help>;
293 @@ -295,8 +299,14 @@ ScpPath { ,<ARG_system>:e.system = <ScpPath1 e.system> <GetScpPath e.system>; }
294  ScpPath1 {
295   'unix' = <System1 'pwd > xxx' >;
296   'linux' = <ScpPath1 'unix'>;
297 - 'windowsNT' = <System1 'cmd.exe /c dir > xxx'>;   
298 - 'windows95' = <System1 'command.exe /c dir > xxx'>;   
299 +***** <A.Konovalov, 2018-01-05>
300 +***** Command 'cd' without parameters type current directory
301 +
302 +** 'windowsNT' = <System1 'cmd.exe /c dir > xxx'>;
303 +** 'windows95' = <System1 'command.exe /c dir > xxx'>;
304 + 'windowsNT' = <System1 'cmd.exe /c cd > xxx'>;
305 + 'windows95' = <System1 'command.exe /c cd > xxx'>;
306 +***** </A.Konovalov>
307   'windows98' = <ScpPath1 'windows95'>;
308   e.dos-mac = <System1  'dir > xxx'>;
309  }
310 @@ -312,6 +322,10 @@ System1 { e.com , <System e.com>:
311  GetScpPath {
312   ('linux') s.N e.path = e.path;
313   ('unix') s.N e.path = <GetScpPath ('linux') s.N e.path>;
314 +****** <A.Konovalov, 2018-01-05> About 'cd' command see above
315 + ('windows' e.version) s.N e.path = e.path;
316 +****** </A.Konovalov>
317 +
318  * Path on the fourth line.
319   (e.dos-win-mac) 4 e.line = <GetScpPath1 e.line ()>;
320   (e.dos-win-mac) s.N e.trash =
321 diff --git a/install.txt b/install.txt
322 index 954680c..d517360 100644
323 --- a/install.txt
324 +++ b/install.txt
325 @@ -6,8 +6,8 @@ THE INSTALLATION OF THE SCP4 SYSTEM
326  Step by step:
327 
328      0. install Refal-5 system;
329 -    1. OPER_SYSTEM> refc install
330 -    2. OPER_SYSTEM> refgo install system_name
331 +    1. OPER_SYSTEM> srefc install
332 +    2. OPER_SYSTEM> install.exe system_name
333      3. OPER_SYSTEM> refcall.bat
334      4. set _path_ (in your Oper. System) to the Refal-5 executable
335         modules and to the Scp4's bat-files or copy the files inside
336 @@ -20,8 +20,6 @@ Step by step:
337  *  system_name            |  real system name
338  * ________________________|________________________
339  *    windows, windowsNT   |    Windows NT
340 -*    windows95            |    Windows 95
341 -*    windows98            |    Windows 98
342  *    linux, unix          |    Linux
343  ***************************************************
344 
345 diff --git a/install.txt b/install.txt.old
346 similarity index 100%
347 copy from install.txt
348 copy to install.txt.old
349 diff --git a/main_scp.bak b/main_scp.bak
350 index 32f068d..ee29012 100644
351 --- a/main_scp.bak
352 +++ b/main_scp.bak
353 @@ -6,31 +6,33 @@
354  * key.ref
355  *$EXTERN HereDir, SubDir;
356 
357 +*$FROM LibraryEx
358 +$EXTERN LoadBytes, SaveBytes;
359 +
360 +
361  $ENTRY Go { = <InitBox> <Main <GetArgs>>; }
362 
363  * To run.
364  Main {
365 +***** <A.Konovalov, 2018-01-05/>:
366 +***** Change <System1 'refgo ' e.args> to <System1 e.args>
367 +
368   ('scp4') e.args
369               = <Prout 'Please, type _g_ if prompted _TRACE>_.'>
370                 <PrLine ('scp4') e.args>
371 -*               <System1 'reftr ' e.args ' -n'>;
372 -               <System1 'refgo ' e.args>;
373 +               <System1 e.args>;
374   ('mst4p') e.args
375               = <PrLine ('mst4') e.args>
376 -*               <System1 'reftr ' e.args ' -n'>;
377 -               <System1 'refgo ' e.args>;
378 +               <System1 e.args>;
379   ('inref4p') e.args
380               = <PrLine ('inref4') e.args>
381 -*               <System1 'reftr ' e.args ' -n'>;
382 -               <System1 'refgo ' e.args>;
383 +               <System1 e.args>;
384   ('redund') e.args
385               = <PrLine ('redund') e.args>
386 -*               <System1 'reftr ' e.args ' -n'>;
387 -               <System1 'refgo ' e.args>;
388 +               <System1 e.args>;
389   ('cgr54') e.args
390               = <PrLine ('cgr54') e.args>
391 -*               <System1 'reftr ' e.args ' -n'>;
392 -               <System1 'refgo ' e.args>;
393 +               <System1 e.args>;
394   ('scpwhole') (e.com1) e.coms = <Main e.com1> <Main ('scpwhole') e.coms>;
395   ('scpwhole') = ;
396    e.xxx = <Exit '-' 1>;
397 @@ -119,8 +121,21 @@ Order1 {
398  }
399 
400  Scp {
401 - (e.rsl) (e.mst) (e.trace) (e.user-args) e.1 
402 -  = <SourScp Scp> e.rsl ' ' e.mst ' ' e.trace ' ' e.user-args <MemLim>;
403 +***** <A.Konovalov, 2018-01-05>
404 +** (e.rsl) (e.mst) (e.trace) (e.user-args) e.1
405 +**  = <SourScp Scp> e.rsl ' ' e.mst ' ' e.trace ' ' e.user-args <MemLim>;
406 +
407 +  (/* no rasls */) (e.mst) (e.trace) (e.user-args) e.1
408 +    = <SourScp Scp> ' ' e.mst ' ' e.trace ' ' e.user-args <MemLim>;
409 +
410 +  ('+' e.rasl) (e.mst) (e.trace) (e.user-args) e.1
411 +    = <SaveBytes
412 +        ('scp-tmp' <Exe>)
413 +        <LoadBytes <GetEnv 'SOURSCP'> <SubDir> <SourScp Scp>>
414 +        <LoadBytes e.rasl '.rasl'>
415 +      >
416 +      '.' <SubDir> 'scp-tmp' <Exe> ' ' e.mst ' ' e.trace ' ' e.user-args;
417 +***** </A.Konovalov>
418  }
419 
420  Mst {
421 @@ -144,11 +159,11 @@ SourScp { s.module = <PathSours (<GetEnv 'SOURSCP'>) <ScpSource s.module>>; }
422 
423  * Get sources.
424  ScpSource {
425 - Scp = 'trace+scp4+drive+basic+comparet+access+analyse+global+key+final+reflib';
426 - Mst = 'mst+diskout4+key+warning';
427 - Inref  = 'inref4+difful4+diskout4+inform+key+warning';
428 - Redund = 'redund+key+reflib';
429 - Cgr54  = 'cgr54+key';
430 + Scp = 'scp-core' <Exe>;
431 + Mst = 'mst-core' <Exe>;
432 + Inref  = 'inref-core' <Exe>;
433 + Redund = 'redund-core' <Exe>;
434 + Cgr54  = 'cgr54-core' <Exe>;
435  }
436 
437  PathSours { (e.path) e.files = e.files; }