
The Right Thing would be to dynamically allocate the buffers that currently use these constants.
Hugs' internal structure would benefit greatly from writing a little C module for managing strings and cleaning up all the ad hoc cruft that has accumulated over the years. Most of the operations are obvious: create, release (reference counted???), append, substring, index, rindex, notdir, basename, substitute (or expand environment variables), etc. A few more operations would suggest themselves from existing code. So, if you find yourself changing the code to do dynamic allocation, you might make it a nice, clear module by itself and then we can work on gradually using it more often and on adding more operations. (But in the years that I worked on Hugs, I never got the energy to do that - it was never easier than the kludge I was currently applying and it's such a boring part of the system...) -- Alastair