Index: src/hatlib/hat-c.c =================================================================== RCS file: /home/cvs/root/hat/src/hatlib/hat-c.c,v retrieving revision 1.41 diff -u -r1.41 hat-c.c --- src/hatlib/hat-c.c 8 Jul 2005 14:43:39 -0000 1.41 +++ src/hatlib/hat-c.c 27 Jun 2006 10:05:22 -0000 @@ -8,7 +8,7 @@ #include #include #include -#include /* for ntohl() macro */ +#include "ntohl.h" #include "hat-c.h" @@ -104,7 +104,7 @@ strcpy(filename,progname); strcat(filename,".hat"); /* the .hat file holds the archive */ - HatFile = fopen(filename,"w"); /* of redex trails */ + HatFile = fopen(filename,"wb"); /* of redex trails */ p = ftell(HatFile); /* should be 0 */ fprintf(HatFile,"Hat%s",FILEVERSION); /* initialise file */ fputc(0,HatFile); @@ -116,14 +116,16 @@ strcpy(filename,progname); /* the .output file is a copy of */ strcat(filename,".hat.output"); /* stdout */ - HatOutput = fopen(filename,"w"); + HatOutput = fopen(filename,"wb"); strcpy(filename,progname); /* the .bridge file links the output */ strcat(filename,".hat.bridge"); /* to the archived trails */ - HatBridge = fopen(filename,"w"); + HatBridge = fopen(filename,"wb"); controlC = False; /* SIGQUIT here before, why? */ +#if defined(SIGQUIT) signal(SIGQUIT, hat_Interrupt); /* install handler for abortion? */ +#endif signal(SIGABRT, hat_Interrupt); /* install handler for abortion? */ signal(SIGFPE, hat_ArithmeticError); signal(SIGINT, hat_Interrupt); /* install handler for Control-C */