Or a completely different proposal:
Lets take the standard job as the starting point. Dealing with QLiberated or
Turboed jobs need some special treatment.
When a job is first started it has a code area and a data area. If there are
open channels or a command line the Basic keywords EX (and family) adds the
space this data requires to the dataspace and stacks that data on top of the
data area. It would not be difficult to stack the home directory on top of
that again thus:
Home directory Command string Channel ID Channel ID .... number of channel IDs Data area
At present (a6,a5) point to the top of the data area. This could now be the
pointer to the directory string (alternative registers could be used
instead, if better).
I prefer this type of approach as it would ensure that the home directory (or whatever) would be removed together with the job.
However, I perceive several problems with this approach:
1) Older programs which would expect (a6,a5) to point to the command string at the top of the data area. If we were to adopt this scheme, then a lot of existing programs would immediately not be able to get at any parameters passed to them. We do not have the software authors or sources to enable us to amend existing programs or re-write them. I guess we could overcome this by amending the setup job code to have (A5,A0) (?) point to the location of the home directory
2) The bigger problem and one which is harder to address...
How do you decide what is the home directory of a file called win1_basic_exts_turbo_config_exe
I guess the code which sets up the job would have to look at each of the levels before the underscore to see if they were set up as a directory (ie file type 255).
In other words, it would need to check whether the following were directory files and select the home directory as the first one it found with file type 255
win1_basic_exts_turbo_config_
win1_basic_exts_turbo_
win1_basic_exts_
win1_basic_
win1_
Since the data area is private to each instance of a job, the Home Directory
[HD] could easily be dynamic, ie a Current Directory [CD] instead/as well.
Id propose the following format for the HD/DC area:
(magic word) full file name length word directory length word string bytes bytes padding to 42 bytes bytes
There would have to be some way to flag that the HD/CD was present: eg an additional magic word at the top of the structure, or some other method.
Yes, I can understand the need for this - it all depends on what points to the HD/CD
-- Rich Mellor RWAP Services 26 Oak Road, Shelfield, Walsall, West Midlands WS4 1RQ
http://www.rwapservices.co.uk/
_______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm