I'm communicating with a PolyML program over stdin/stdout, and the "Increasing stack" messages were gettiong in the way. They are currently sent on stdout, but I believe they should be sent to stderr (or there should be the possibility of switching off warning messages altogether).
Thanks to PolyML being open source, it was easy to make a small patch to processes.c in the driver to achieve output on stderr. David Matthews suggested I post it here in case it is of interest to others. I hope the patch may be integrated (or improved upon) in a later release.
- David Aspinall.
[da@montague driver]$ diff -c processes.c~ processes.c *** processes.c~ 2001-11-05 11:16:33.000000000 +0000 --- processes.c 2003-09-01 23:33:44.000000000 +0100 *************** *** 503,511 ****
if (new_len >= (1 << 16)) { ! proper_printf("Warning - Increasing stack from %d to %d bytes\n", old_len * sizeof(word), new_len * sizeof(word)); ! proper_fflush(stdout); }
/* Must make a new frame and copy the data over. */ --- 503,511 ----
if (new_len >= (1 << 16)) { ! proper_fprintf(stderr,"Warning - Increasing stack from %d to %d bytes\n", old_len * sizeof(word), new_len * sizeof(word)); ! proper_fflush(stderr); }
/* Must make a new frame and copy the data over. */