home *** CD-ROM | disk | FTP | other *** search
- /* @(#) turboc.c 1.2 87/06/21 16:08:54 */
-
- int _stklen = 30000; /* stack size in bytes */
- _setenvp() {} /* don't initialize environment pointer etc. */
- #include <fcntl.h>
-
- /* following not needed any more since zoocreate() is fixed in portable.c */
- /* unsigned _fmode = O_BINARY; */
-
- #ifdef LINT_ARGS
- void dosname (char *, char *);
- char *strcpy (char *, char *);
- #else
- void dosname ();
- char *strcpy ();
- #endif
-
- /****************
- function trunc() truncates a file -- ok to be a no-op
- */
-
- int trunc (handle)
- int handle;
- {
- /* avoid compiler warning about unused argument */
- return (handle - handle);
- }
-
- /****************
- Function fixfname() converts the supplied filename to a syntax
- legal for the host system. It is used during extraction.
- */
-
- char *fixfname(fname)
- char *fname;
- {
- char tmpname[PATHSIZE];
- dosname (nameptr(fname), tmpname);
- strcpy(fname,tmpname);
- return(fname);
- }
-
- #include <signal.h>
- #include "intdos.h"
-
- static int set_break (int flag)
- {
- int retval;
- union REGS regs;
- regs.x.ax = 0x3300; /* get ctrl-break flag */
- intdos (®s, ®s);
- retval = regs.h.dl; /* retval is old value of setting */
- regs.x.ax = 0x3301; /* set ctrl-break flag */
- regs.h.dl = flag; /* status to set to */
- intdos (®s, ®s);
- return (retval);
- }
-
- static int break_flag;
-
- int zooexit (int status)
- {
- set_break (break_flag); /* restore control_break setting */
- exit (status);
- }
-
- void gentab (void);
-
- void spec_init(void)
- {
- break_flag = set_break (0);
- signal (SIGINT, zooexit); /* install our own control-C handler */
- }
-