home *** CD-ROM | disk | FTP | other *** search
- #include "stdio.h"
-
- int nomap = 0;
-
- main(ac, av)
- int ac;
- char **av;
- {
-
- lzinit();
- lzcat();
- exit(0);
- }
-
- #include <sgtty.h>
-
- lzinit()
- {
- struct sgttyb nbuf;
- unsigned long lbits;
-
- setbuf(stdout, NULL);
- /* Work around to by-pass bug in terminal driver and force LITOUT */
- lbits = LMDMBUF|LLITOUT;
- ioctl(fileno(stdout), TIOCLSET, &lbits);
- ioctl(fileno(stdout), TIOCGETP, &nbuf);
- nbuf.sg_flags &= ~(ECHO|XTABS|CRMOD); /* While we're at it, set the mode */
- ioctl(fileno(stdout), TIOCSETP, &nbuf);
-
- fputs("\033&k3G", stdout); /* Set device to sane mode */
- }
-
- lzcat()
- {
- register int c;
-
- while((c = getchar()) != EOF)
- {
- putchar(c);
- }
- }
-