146104Sbostic /*- 246104Sbostic * Copyright (c) 1990 The Regents of the University of California. 346104Sbostic * All rights reserved. 446104Sbostic * 546104Sbostic * This code is derived from software contributed to Berkeley by 646104Sbostic * Chris Torek. 746104Sbostic * 846104Sbostic * %sccs.include.redist.c% 921410Sdist */ 1021410Sdist 1126661Sdonn #if defined(LIBC_SCCS) && !defined(lint) 12*47550Storek static char sccsid[] = "@(#)setbuffer.c 5.5 (Berkeley) 03/18/91"; 1346104Sbostic #endif /* LIBC_SCCS and not lint */ 1421410Sdist 1546104Sbostic #include <stdio.h> 168327Smckusick 1746104Sbostic void 1846104Sbostic setbuffer(fp, buf, size) 1946104Sbostic register FILE *fp; 208327Smckusick char *buf; 218327Smckusick int size; 228327Smckusick { 23*47550Storek 24*47550Storek (void) setvbuf(fp, buf, buf ? _IOFBF : _IONBF, size); 258327Smckusick } 2611307Smckusick 2711307Smckusick /* 2846104Sbostic * set line buffering 2911307Smckusick */ 3046104Sbostic setlinebuf(fp) 3146104Sbostic FILE *fp; 3211307Smckusick { 33*47550Storek 3446104Sbostic (void) setvbuf(fp, (char *)NULL, _IOLBF, (size_t)0); 3546104Sbostic return (0); /* ??? */ 3611307Smckusick } 37