CompuServe Thread

Forum unknown · Amiga at Work

#Modula Keyb.

5 messages in this thread
#67115From: Jim MasonMay 10, 1987 5:25 PM
Some of what I would like to do may fall into the "can't get there from here" category. I would be nice to be able to open the input as RAW while leaving the output as it was – without getting two windows that won't be active at the same time. Oh well … In a related vein – how does one discover the name of the windows that the application starts up with ? Input() will return a filehandle but there is nothing to fetch the actual NAME of the file with. With the name, one can access the FileInfoBlock and peruse the good stuff there. Is it some variant of StdIn/StdOut ? What TDI supplies is great as long as you are only interested in files you create, but there is no way I see to reverse the process and find out things about files created by the OS. There may be somthing out there in module land – but I havn't found it yet. A SUBJECT index would be a great addition to the manual. As it is, one must read the doc for each procedure to really be sure what it is supposed to do – and there are a lot of them ! — Jim Mason
#67124From: John DraperMay 10, 1987 6:32 PM
Check out the various library structures as well as the Task Control Block structure. There are a number of variables in them just sitting there waiting for you to access them. There is a system call, FindTask(), which when called with a value of 0, will return (I think… can't locate it in my RKM) a pointer to your own Task Control Block.
#67124From: John DraperMay 10, 1987 6:32 PM
Check out the various library structures as well as the Task Control Block structure. There are a number of variables in them just sitting there waiting for you to access them. There is a system call, FindTask(), which when called with a value of 0, will return (I think… can't locate it in my RKM) a pointer to your own Task Control Block.
#67144From: Steve FaiwiszewskiMay 10, 1987 8:30 PM
This does sound challenging, Jim! Your grievance about TDI not supplying this information is misplaced. This is not the function of the compiler, but the function of the OS. You would have the same problem in C. Offhand I can't think of a solution. If you could get the window pointer, then you could probably examine the NAME field to extract the window's name. But whether using this name to obtain the FileInfoBlock will work, I'm not sure. Why would you want to examine the FIB of a window anyway? – Steve –
#67144From: Steve FaiwiszewskiMay 10, 1987 8:30 PM
This does sound challenging, Jim! Your grievance about TDI not supplying this information is misplaced. This is not the function of the compiler, but the function of the OS. You would have the same problem in C. Offhand I can't think of a solution. If you could get the window pointer, then you could probably examine the NAME field to extract the window's name. But whether using this name to obtain the FileInfoBlock will work, I'm not sure. Why would you want to examine the FIB of a window anyway? – Steve –