Jo Dillon wrote:
More runtime porting issues - I notice that the macro WRITE_VARIOUS_TYPES in write.c has lots of cases where if FIX_WIDTH_MASK is true an extra argument is popped off the arglist (presumably the width), otherwise it's ignored. When is FIX_WIDTH_MASK set? Is it on by default for stdout?
It's set (by the code generated by the compiler in rts.c: rts_write()) when a width is specified in the Write[ln] statement, i.e. `Write (foo : 42)'. In this case, the width (42) is pushed automatically by the compiler generated code.
It's got nothing to do with stdout vs. other files.
However, a little warning: as I said in my last posting about `Re: Writeln(real)', we plan to change the calling mechanism substantially (though not in the nearest future, but sometime). When that happens, you'll have to make according changes in your runtime. That's why it seems preferable to keep as much as possible of the RTS and to only replace the low-level functions (e.g. write()) as far as needed...
Frank
-- Frank Heckenbach, frank@fjf.gnu.de, http://fjf.gnu.de/ GPC To-Do list, latest features, fixed bugs: http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html