diff options
| author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-09-05 23:03:38 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-09-05 23:03:47 +0200 |
| commit | 70ac1c4785fc1e158ab2349a962dba2526bf4fbc (patch) | |
| tree | bff270e2496dd284bccfc1271b43946f5d225224 /man/man3/getw.3 | |
| parent | 5423a6f86b2b920a5f3e8cf8d759b513050f2d33 (diff) | |
| download | man-pages-70ac1c4785fc1e158ab2349a962dba2526bf4fbc.tar.gz | |
src.mk, All pages: Move man* to man/
The root of the repository is becoming a bit overpopulated and
unorganized, due to the recent addition of more mandirs, and more
informative and configuration files too. Let's create a specific
mandir <man/> that contains the mandirs <man[1-8]*>.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Diffstat (limited to 'man/man3/getw.3')
| -rw-r--r-- | man/man3/getw.3 | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/man/man3/getw.3 b/man/man3/getw.3 new file mode 100644 index 0000000000..d0a53cd548 --- /dev/null +++ b/man/man3/getw.3 @@ -0,0 +1,85 @@ +.\" Copyright (c) 1995 by Jim Van Zandt <jrv@vanzandt.mv.com> +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH GETW 3 2021-03-22 "Linux man-pages (unreleased)" +.SH NAME +getw, putw \- input and output of words (ints) +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include <stdio.h> +.PP +.BI "int getw(FILE *" stream ); +.BI "int putw(int " w ", FILE *" stream ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getw (), +.BR putw (): +.nf + Since glibc 2.3.3: + _XOPEN_SOURCE && ! (_POSIX_C_SOURCE >= 200112L) + || /* Glibc since 2.19: */ _DEFAULT_SOURCE + || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE + Before glibc 2.3.3: + _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE +.fi +.SH DESCRIPTION +.BR getw () +reads a word (that is, an \fIint\fP) from \fIstream\fP. +It's provided for compatibility with SVr4. +We recommend you use +.BR fread (3) +instead. +.PP +.BR putw () +writes the word \fIw\fP (that is, +an \fIint\fP) to \fIstream\fP. +It is provided for compatibility with SVr4, but we recommend you use +.BR fwrite (3) +instead. +.SH RETURN VALUE +Normally, +.BR getw () +returns the word read, and +.BR putw () +returns 0. +On error, they return \fBEOF\fP. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getw (), +.BR putw () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +SVr4, SUSv2. +Not present in POSIX.1. +.SH BUGS +The value returned on error is also a legitimate data value. +.BR ferror (3) +can be used to distinguish between the two cases. +.SH SEE ALSO +.BR ferror (3), +.BR fread (3), +.BR fwrite (3), +.BR getc (3), +.BR putc (3) |
