wibble in derive.c
Changing stdout's buffering. fflush in the program does not flush
the dll's private buffer space on Win32.
* included in the distribution.
*
* $RCSfile: derive.c,v $
* 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"
* ------------------------------------------------------------------------*/
#include "prelude.h"
Cell ls = h;
Cell us = h;
Cell is = h;
Cell ls = h;
Cell us = h;
Cell is = h;
Cell pr = NIL;
Cell pats = NIL;
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)));
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] */
}
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)));
cons(prodIndex(line,pats,ls,us,is),
cons(prodInRange(line,pats,ls,us,is),
NIL)));
if (defaultSyntax(name(h).text)==APPLIC) {
rhs = ap(showsBQ,
ap2(nameComp,
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 {
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);
errno = 0;
fputc(c,f);
if (f==stderr) { fflush(f); }
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 )
}
int nh_read ( FILE* f )
return (int)getenv ( (const char *)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
#if MAJOR_RELEASE
#define HUGS_VERSION "October 1999 "
#else
#if MAJOR_RELEASE
#define HUGS_VERSION "October 1999 "
#else
-#define HUGS_VERSION "991015 (STG) "
+#define HUGS_VERSION "STGHugs-991029"