Commit 477c02bb authored by andy's avatar andy
Browse files

[project @ 1999-11-01 04:17:37 by andy]

wibble in derive.c

Changing stdout's buffering. fflush in the program does not flush
the dll's private buffer space on Win32.
parent 1161c750
......@@ -9,8 +9,8 @@
* included in the distribution.
*
* $RCSfile: derive.c,v $
* $Revision: 1.7 $
* $Date: 1999/10/15 21:41:04 $
* $Revision: 1.8 $
* $Date: 1999/11/01 04:17:37 $
* ------------------------------------------------------------------------*/
#include "prelude.h"
......@@ -340,19 +340,22 @@ Int n; {
Cell ls = h;
Cell us = h;
Cell is = h;
Cell js = h;
Cell pr = NIL;
Cell pats = NIL;
Int i;
for (i=0; i<n; ++i, vs=tl(vs)) { /* build three patterns for values */
ls = ap(ls,hd(vs)); /* of the datatype concerned */
us = ap(us,hd(vs=tl(vs)));
is = ap(is,hd(vs=tl(vs)));
js = ap(js,hd(vs)); /* ... and one expression */
}
pr = ap2(mkTuple(2),ls,us); /* Build (ls,us) */
pats = cons(pr,cons(is,NIL)); /* Build [(ls,us),is] */
return cons(prodRange(line,singleton(pr),ls,us,is),
return cons(prodRange(line,singleton(pr),ls,us,js),
cons(prodIndex(line,pats,ls,us,is),
cons(prodInRange(line,pats,ls,us,is),
NIL)));
......@@ -544,10 +547,11 @@ Int a; {
if (defaultSyntax(name(h).text)==APPLIC) {
rhs = ap(showsBQ,
ap2(nameComp,
ap(nameApp,mkStr(name(h).text)),
ap(nameApp,mkStr(fixLitText(name(h).text))),
ap(showsBQ,rhs)));
} else {
rhs = ap2(nameComp,ap(nameApp,mkStr(name(h).text)),rhs);
rhs = ap2(nameComp,
ap(nameApp,mkStr(fixLitText(name(h).text))),rhs);
}
rhs = ap2(nameComp,
......
......@@ -54,8 +54,7 @@ void nh_write ( FILE* f, int c )
errno = 0;
fputc(c,f);
if (f==stderr) { fflush(f); }
else if (f==stdin && isspace(c)) { fflush(f); };
if (f==stdout) { fflush(f); }
}
int nh_read ( FILE* f )
......@@ -95,4 +94,23 @@ int nh_getenv ( int p )
return (int)getenv ( (const char *)p );
}
#if 0
int prog_argc;
char** prog_argv;
int nh_init_args ( int argc, char *argv[] )
{
prog_argc = argc;
prog_argv = argv;
}
int nh_argc ( void )
{
return prog_argc;
}
int nh_argvb ( int argno, int offset )
{
return prog_argv[argno][offset];
}
#endif
......@@ -13,6 +13,6 @@
#if MAJOR_RELEASE
#define HUGS_VERSION "October 1999 "
#else
#define HUGS_VERSION "991015 (STG) "
#define HUGS_VERSION "STGHugs-991029"
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment