diff options
| author | Alejandro Colomar <alx@kernel.org> | 2025-08-19 13:40:01 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2025-09-21 16:26:15 +0200 |
| commit | f17990c243eafc1891ff692f90b6ce42e6449be8 (patch) | |
| tree | 62e0e0242db019d77d263bd60a99c7b47a697d1f /man/man3/fopencookie.3 | |
| parent | dbc3270a88165851aa5e7ab5d1f99dc1acb9624d (diff) | |
| download | man-pages-f17990c243eafc1891ff692f90b6ce42e6449be8.tar.gz | |
man/: Use semantic newlines
And fix related issues while at it.
Silence false positives with \&.
Reported-by: `make lint-man-semnl`
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man/man3/fopencookie.3')
| -rw-r--r-- | man/man3/fopencookie.3 | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/man/man3/fopencookie.3 b/man/man3/fopencookie.3 index 17c3e99f5b..afb02cf64a 100644 --- a/man/man3/fopencookie.3 +++ b/man/man3/fopencookie.3 @@ -24,7 +24,8 @@ The function allows the programmer to create a custom implementation for a standard I/O stream. This implementation can store the stream's data at a location of -its own choosing; for example, +its own choosing; +for example, .BR fopencookie () is used to implement .BR fmemopen (3), @@ -308,7 +309,7 @@ memfile_write(void *c, const char *buf, size_t size) char *new_buff; struct memfile_cookie *cookie = c; \& - /* Buffer too small? Keep doubling size until big enough. */ + /* Buffer too small? Keep doubling size until big enough. */ \& while (size + cookie\->offset > cookie\->allocated) { new_buff = realloc(cookie\->buf, cookie\->allocated * 2); @@ -333,7 +334,7 @@ memfile_read(void *c, char *buf, size_t size) ssize_t xbytes; struct memfile_cookie *cookie = c; \& - /* Fetch minimum of bytes requested and bytes available. */ + /* Fetch minimum of bytes requested and bytes available. */ \& xbytes = size; if (cookie\->offset + size > cookie\->endpos) @@ -396,7 +397,7 @@ main(int argc, char *argv[]) size_t nread; char buf[1000]; \& - /* Set up the cookie before calling fopencookie(). */ + /* Set up the cookie before calling fopencookie(). */ \& mycookie.buf = malloc(INIT_BUF_SIZE); if (mycookie.buf == NULL) { @@ -414,7 +415,7 @@ main(int argc, char *argv[]) exit(EXIT_FAILURE); } \& - /* Write command\-line arguments to our file. */ + /* Write command\-line arguments to our file. */ \& for (size_t j = 1; j < argc; j++) if (fputs(argv[j], stream) == EOF) { @@ -422,7 +423,7 @@ main(int argc, char *argv[]) exit(EXIT_FAILURE); } \& - /* Read two bytes out of every five, until EOF. */ + /* Read two bytes out of every five, until EOF. */ \& for (long p = 0; ; p += 5) { if (fseek(stream, p, SEEK_SET) == \-1) { |
