Fixing the redirection bug in Hi-Tech C ======================================= If you've tried to use the -R flag on the Hi-Tech C compiler to get I/O redirection (progname outfile) or automatic wildcard expansion you'll know it doesn't work - at link time the message 'Unknown symbol:' with no symbol name appears. This can be fixed by modifying your stdio.h and c.com files. In essence what you must do is to force the linking of getargs.obj from the library by making the symbol '__getargs' undefined. First, modify your stdio.h file so that it contains the following code (STDIO.DIF is included for those of you with DIF2 and SSED): #ifdef _REDIR #asm global __getargs #endasm #endif Now extract C.C from the library sources (HITECH3.LZH, in CPM.HUF; use the 'dehuff' program supplied, ie. 'dehuff -x cpm.huf c.c') and make the following changes: (or apply C.DIF with SSED) Line 40ish: before: #define GETARGS "-U__getargs" after: #define CPPGET "-D_REDIR" Line 160ish: before: case 'R': flgs[flg_idx++] = GETARGS; break; after: case 'R': iuds[iud_idx++] = CPPGET; break; Recompile this new C.C (rename it as something else to avoid overwriting your current C.COM immediately) and replace your old C.COM with the new one thus created. Programs where redirection is required must contain the statement '#include '. This method originally appeared in a message in comp.os.cpm in January 1996, courtesy of Arnold Metselaar . Jacob Nevins, 8/4/96 jacob@spuddy.mew.co.uk also Jacob Nevins at 2:255/94 [CCBBS, (+44)-(0)1736-756633]