2 /* This is a hack. I totally deny writing it. If this code breaks,
3 * you get to keep all the pieces. JRS, 23 feb 99.
19 int nh_stdout ( void )
25 int nh_stderr ( void )
31 int nh_open ( char* fname, int wr )
35 f = fopen ( fname, (wr==0) ? "r": ((wr==1) ? "w" : "a") );
39 void nh_close ( FILE* f )
46 void nh_flush ( FILE* f )
52 void nh_write ( FILE* f, int c )
56 if (f==stderr) { fflush(f); }
57 else if (f==stdin && isspace(c)) { fflush(f); };
61 int nh_read ( FILE* f )
72 int nh_malloc ( int n )
78 void nh_free ( int n )
83 void nh_store ( int p, int ch )
90 return (int)(*(char*)p);
93 int nh_getenv ( int p )
95 return (int)getenv ( (const char *)p );