summaryrefslogtreecommitdiff
path: root/static/unix-v10/man3/getc.3
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
commit97d5c458cfa039d857301e1ca7d5af3beb37131d (patch)
treeb460cd850d0537eb71806ba30358840377b27688 /static/unix-v10/man3/getc.3
parentb89dc2331a50c63f8b33272a5c4c61ab98abdaa3 (diff)
build: Better Build System
Diffstat (limited to 'static/unix-v10/man3/getc.3')
-rw-r--r--static/unix-v10/man3/getc.359
1 files changed, 59 insertions, 0 deletions
diff --git a/static/unix-v10/man3/getc.3 b/static/unix-v10/man3/getc.3
new file mode 100644
index 00000000..7a1557ab
--- /dev/null
+++ b/static/unix-v10/man3/getc.3
@@ -0,0 +1,59 @@
+.pa 1
+.he 'GETC, GETW, FOPEN (III)'3/15/72'GETC, GETW, FOPEN (III)'
+.ti 0
+NAME getw, getc, fopen -- buffered input
+.sp
+.ti 0
+SYNOPSIS mov $filename,r0
+.br
+jsr r5,fopen; iobuf
+
+jsr r5,getc; iobuf
+.br
+(character in r0)
+
+jsr r5,getw; iobuf
+.br
+(word in r0)
+.sp
+.ti 0
+DESCRIPTION These routines are used to provide a buffered input
+facility.
+iobuf_____ is the address of a 518(10) byte buffer area whose
+contents are maintained by these routines. Its format is:
+.sp
+.nf
+ioptr: .=.+2 / file descriptor
+ .=.+2 / characters left in buffer
+ .=.+2 / ptr to next character
+ .=.+512. / the buffer
+.sp
+.fi
+fopen_____ may be called initially to open the file. On return,
+the error bit (c-bit) is set if the open failed.
+If fopen_____ is never called, get___ will read from the standard
+input file.
+.sp
+getc____ returns the next byte from the file in r0. The
+error bit is set on end of file or a read error.
+.sp
+getw____ returns the next word in r0. getc____ and getw____
+may be used alternately; there are no odd/even
+problems.
+.sp
+iobuf_____ must be provided by the user; it must be on a word boundary.
+
+To reuse the same buffer for another file, it is sufficient
+to close the original file and call fopen_____ again.
+.sp
+.ti 0
+FILES kept in /lib/liba.a
+.sp
+.ti 0
+SEE ALSO open(II), read(II), putc(III)
+.sp
+.ti 0
+DIAGNOSTICS c-bit set on EOF or error
+.sp
+.ti 0
+BUGS --