README.txt 2.5 KB
Newer Older
Ronny Wichers Schreur's avatar
Ronny Wichers Schreur committed
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
ArgEnv
Version  1.0.1
Ronny Wichers Schreur
ronny@cs.kun.nl

The ArgEnv package provides a Clean interface to the command line
arguments and the environment variables. 

This is the README for the Windows version. The Windows version has
been tested on Windows NT client 4.0 with Clean 1.2 & 1.3, but it
should work with all Windows versions with Clean 1.2 or better. To
use the package with Clean version 1.1 you will have to make a few
changes, which are documented in the source.

FILES

    README
        This file
    ArgEnv.dcl
        Definition of the interface
    ArgEnv.icl
        Implementation of the interface
    ArgEnvC.c
        Implementation of the C side of the interface
        (You do not have to compile this file, it is included
        in the modified cdebug.obj)
    cdebug.obj
        A modified version of cdebug.obj that includes the
        C side of the ArgEnv interface
    kernel_library
        A modified version of kernel_library that defines
        some extra symbols from kernel32.dll
    printenv.icl
        An example program that prints the value of an environment
        variable
    printenv.prj
        Project file for the example program

USAGE

To use the ArgEnv interface you have to link the object module that
is created from the module ArgEnvC.c.
There is no easy way to link additional object files with the older
CleanIDEs (version 1.2 and before). Therefore I have made a new
cdebug.obj that contains the object code from ArgEnvC.c. You should
replace cdebug.obj in the Clean System Files of the StdEnv with the
cdebug.obj that comes with this release.

If you use CleanIDE 1.3 or later you can just add this extra object
file to the Object Modules section in the Options->Link Options dialogue.

If you forget this, you will get the link error:
    Undefined symbols:
    _ArgEnvGetEnvironmentVariableSizeC
    _ArgEnvGetEnvironmentVariableCharsC
    _ArgEnvCopyCStringToCleanStringC
    _ArgEnvGetCommandLineCountC
    _ArgEnvGetCommandLineArgumentC

The ArgEnv interface also uses two additional symbols from kernel32.dll.
You should replace kernel_library in the Clean System Files of the StdEnv
with the kernel_library that comes with this release. If you forget this,
you will get the link error:
    Undefined symbols:
    __imp__GetEnvironmentVariableA@12

BUGS

There is no way to stop the Clean run-time system from interpreting
some of the command-line arguments.

If you start a Clean program from the command-line prompt, you still
have to "press any key" before the program quits.