V3/usr/man/man3/putc.3

Find at most related files.
including files from this version of Unix.

.pa 1
.he 'PUTC,PUTW,FCREAT,FLUSH (III)'6/12/72'PUTC,PUTW,FCREAT,FLUSH (III)'
.ti 0
NAME		putc, putw, fcreat, flush  --  buffered output
.sp
.ti 0
SYNOPSIS	mov	$filename,r0
.br
jsr	r5,fcreat; iobuf

(get byte in r0)
.br
jsr	r5,putc; iobuf

(get word in r0)
.br
jsr	r5,putw; iobuf
.sp
jsr	r5,flush; iobuf
.sp
.ti 0
DESCRIPTION	fcreat______ creates
the given file (mode 17) and sets up the buffer iobuf_____ (size 518(10) bytes);
putc____ and putw____ write a byte or word respectively
onto the file;
flush_____ forces the contents of the buffer to be written, but
does not close the file.
The format of the buffer is:
.sp
.nf
iobuf:	.=.+2		/ file descriptor
	.=.+2		/ characters unused in buffer
	.=.+2		/ ptr to next free character
	.=.+512.	/ buffer
.sp
.fi
fcreat______ sets the error bit (c-bit) if the 
file creation failed; none of the other routines
return error information.
.sp
Before terminating, a program should call
flush_____ to force out the last of the output.
.sp
The user must supply iobuf_____, which should begin on a word boundary.

To write a new file using the same buffer, it
suffices to call flush_____, close the file,
and call fcreat______ again.
.sp
.ti 0
FILES		kept in /lib/liba.a
.sp
.ti 0
SEE ALSO	creat(II), write(II), getc(III)
.sp
.ti 0
DIAGNOSTICS	error bit possible on fcreat______ call
.sp
.ti 0
BUGS		--