Byron Cook <[EMAIL PROTECTED]>:
> this bit of code in Hugs has been a consistant obstical:
> static Void local fileInput(nm,len)
> String nm;
> Long len; {
> #if USE_PREPROCESSOR && (defined(HAVE_POPEN) || defined(HAVE__POPEN))
> if (preprocessor) {
> char cmd[100];
> strncpy(cmd,preprocessor,100);
> strncat(cmd," ",100);
> strncat(cmd,nm,100);
> cmd[99] = '\0'; /* paranoia */
> inputStream = popen(cmd,"r");
> } else {
> inputStream = fopen(nm,"r");
> }
> #else
>
>
> Could we use "500" instead of "100"? its so easy for the user to
> build up a command larger than 100
Already done (only using malloc to avoid hardwired limits).
Grab the latest snapshot from /pub/haskell/hugs/980430 and give it a shot.
The new preprocessor code hasn't been tested very hard.
[This and other recent bugfixes was mentioned on the hugs bugs web page
- but those all vanished when we lost a hard disk last week so you
probably didn't have a chance to see it :-)
Does two hard disk crashes in a row seem like a lot to you? Does to me.]
Alastair