#Modula 2 Pointers
09-Aug-87 22:03:56
Sb: #79343-#Modula 2 Pointers
Fm: Steve Faiwiszewski 74106,425
To: Jim Vogel 73177,441
This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.
I couldn't find any documentation about the cliStandardInput,
currentinput, cliStandardOutput, and the currentoutput fields in the
CommandLineInterface record. My bet it that they are of type FileHandle.
In experimenting with them (see the program I just uploaded to DL13,
DOSTUF.ARC) I found that both input fields were the same, and both output
fields were the same. They matched the prCIS and prCOS fields in the
Process structure when the program was invoked from CLI. However when I
routed the program's output to a file (using > ) the prCOS field was
different (I assume it was the FileHandle to the output file).
I think you and Larry are confusing the purpose of the prWindowPtr
field in the Process structure. This field is used to tell AmigaDOS where
to display its errors. Usually this is 0, and tells AmigaDOS to open a
requester on the Workbench screen (the CANCEL/RETRY type). If the field is
set to -1, AmigaDOS will not display an error to the user, but will return
an error code to the calling program. If the field is some positive value,
it's taken as an address of a window to display the error requester in. If
you modify this field in you program, make sure you reset it to its
original value before you quit.
What is it exactly you're trying to do? Are you trying to find out
the pointer to the CLI window? If so, then look at DOSTUF.ARC. I've
converted Andy Finkelstein C example of how to extract the WindowPtr to a
CLI window. I've used the new M2 compiler from Oxxi, which declares things
a bit differently, so you'll probably have to spend a few minutes
rearranging things. Using the Oxxi package, it took me 8 seconds to
compile the program, and another 3 to link it. F-A-S-T!! Hope this
helped. – Steve –