home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * Initialize a zerod file pointer
- *
- * if interactive set line buffering
- *
- * (c)Copyright 1990, Matthew Dillon, All Rights Reserved
- */
-
- #include <stdio.h>
-
- void
- _finitdesc(fi, fd, flags)
- FILE *fi;
- int fd;
- short flags;
- {
- fi->sd_UC = -1;
- fi->sd_Fd = fd;
- fi->sd_Flags = flags | __SIF_OPEN;
- fi->sd_BufSiz = BUFSIZ;
- fi->sd_WLeft = -1;
- fi->sd_RLeft = -1;
-
- if (isatty(fi->sd_Fd))
- fi->sd_Flags |= __SIF_IOLBF;
- }
-
-