summaryrefslogtreecommitdiff
path: root/static/v10/man3/putc.3
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 21:07:28 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 21:07:28 -0400
commit711594636704defae873be1a355a292505585afd (patch)
tree59ee13f863830d8beba6cfd02bbe813dd486c26f /static/v10/man3/putc.3
parent3258a063c1f189d7b019e40e525b46bef9b9a7b1 (diff)
docs: Added UNIX V10 Manuals
Diffstat (limited to 'static/v10/man3/putc.3')
-rw-r--r--static/v10/man3/putc.360
1 files changed, 60 insertions, 0 deletions
diff --git a/static/v10/man3/putc.3 b/static/v10/man3/putc.3
new file mode 100644
index 00000000..9a14bf8b
--- /dev/null
+++ b/static/v10/man3/putc.3
@@ -0,0 +1,60 @@
+.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 --