cvs commit: hugs98/src prelude.h machdep.c

ross 2003/07/24 02:27:36 PDT Modified files: src prelude.h machdep.c Log: Kludges for systems with no limit on path length (e.g. the Hurd), which will not define PATH_MAX or MAXPATHLEN, and will have FILENAME_MAX _very_ large. The Right Thing would be to dynamically allocate the buffers that currently use these constants. Revision Changes Path 1.49 +12 -8 hugs98/src/prelude.h 1.95 +18 -2 hugs98/src/machdep.c

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
participants (2)
-
Alastair Reid
-
ross@glass.cse.ogi.edu