447 |
mateuszvis |
1 |
|
521 |
mateuszvis |
2 |
|
447 |
mateuszvis |
3 |
=== SvarCOM implementation notes ===
|
|
|
4 |
|
|
|
5 |
|
473 |
mateuszvis |
6 |
=== SWAPPING =================================================================
|
|
|
7 |
|
|
|
8 |
While conventional RAM is scarce, a command line interpreter must make effort
|
|
|
9 |
to reduce its memory footprint when launching applications. SvarCOM does that
|
|
|
10 |
by installing a small executable module in memory, called RMOD (for Resident
|
|
|
11 |
MODule). SvarCOM pre-sets RMOD so knows how to execute the external program
|
|
|
12 |
and removes itself from memory, letting RMOD do the job. RMOD executes the
|
|
|
13 |
application, waits for it to finish and then calls back SvarCOM.
|
|
|
14 |
|
|
|
15 |
|
474 |
mateuszvis |
16 |
=== NLS STRINGS ==============================================================
|
467 |
mateuszvis |
17 |
|
|
|
18 |
SvarCOM can output information in many languages. To do so, it relies on a
|
|
|
19 |
precompiled resource file named SVARCOM.LNG. When SvarCOM starts, it looks
|
|
|
20 |
for this file in the %NLSPATH% directory and loads from it the part that
|
|
|
21 |
contains the %LANG% language. All this is done by nls_langreload().
|
|
|
22 |
|
|
|
23 |
The SVARCOM.LNG file is compiled by a separate tool: TLUMACZ. It takes
|
|
|
24 |
CATS-style language files as input and compiles them into a single SVARCOM.LNG
|
|
|
25 |
resource file. It also produces a DEFAULT.LNG with english strings only, this
|
|
|
26 |
one is embedded into the SvarCOM executable to display english text in case
|
|
|
27 |
SVARCOM.LNG is unavailable.
|
|
|
28 |
|
|
|
29 |
|
474 |
mateuszvis |
30 |
=== BATCH FILES SUPPORT ======================================================
|
447 |
mateuszvis |
31 |
|
|
|
32 |
When SvarCOM executes a command, it checks first if it has a *.BAT extension.
|
469 |
mateuszvis |
33 |
If so, it switches into 'batch-processing' mode:
|
447 |
mateuszvis |
34 |
|
469 |
mateuszvis |
35 |
- Writes the batch filename into its persistent (rmod-owned) buffer, along
|
474 |
mateuszvis |
36 |
with a counter that holds the offset of the next line to be executed.
|
469 |
mateuszvis |
37 |
|
481 |
mateuszvis |
38 |
When the batch filename buffer is non-empty, SvarCOM does not ask the user for
|
|
|
39 |
a command. Instead, it opens the batch file, jumps to the "next line to be
|
|
|
40 |
executed" and loads the command from there, incrementing the line counter in
|
|
|
41 |
the process.
|
447 |
mateuszvis |
42 |
|
|
|
43 |
|
573 |
mateuszvis |
44 |
=== GLOBAL EXECUTABLE LINKS ==================================================
|
571 |
mateuszvis |
45 |
|
573 |
mateuszvis |
46 |
SvarCOM features special support for "global executable links". This allows to
|
|
|
47 |
run selected programs from any directory, without the need to copy these
|
571 |
mateuszvis |
48 |
programs to a directory in %PATH%. Executable links are flat files written in
|
573 |
mateuszvis |
49 |
%DOSDIR%\LINKS\. Each file there contains the directory where the matching
|
571 |
mateuszvis |
50 |
program should be looked for.
|
|
|
51 |
|
|
|
52 |
|
521 |
mateuszvis |
53 |
===================================================================== EOF ====
|