Hello, Has anyone gotten code that uses extend() working on the EMX port of GPC? I was playing around tonight and realized that some relatively simple code which works fine on my Linux box, fails under EMX unless the output file to be extended is non-existant. [The dumb code I'm using is at the bottom of this message.] GPC returns no errors, it just never writes the text line and leaves the output file as it finds it. After putting some hooks in the rts code, fwrite is reporting an EACCESS (permission denied) -- this is the call to CFWRITE() at the end of rts-wrti.c. The problem isn't just in the lastest alpha but goes back to at least 971001 -- so I was wondering if people remember if extend() ever worked with EMX? Any ideas as to where to look for a problem?
Obviously, I haven't tried the other ports (other than Linux) so I don't know if extend() works with the DJGPP port either, or if this is strictly an EMX problem.
program extendtest(output);
var out : bindable text; b : BindingType; begin b := binding(out); b.name := 'a.txt'; bind(out,b); b := binding(out);
extend(out); writeln(position(out)); writeln(out, 'hello'); writeln(position(out)); { EMX returns the same number twice, unless a.txt is empty to start } end.
thanks, -Kevin -- Kevin A. Foss --- kfoss@mint.net