OSDN Git Service
(root)
/
linuxjm
/
LDP_man-pages.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git]
/
original
/
man3
/
fopencookie.3
diff --git
a/original/man3/fopencookie.3
b/original/man3/fopencookie.3
index
8a81a73
..
78d4abb
100644
(file)
--- a/
original/man3/fopencookie.3
+++ b/
original/man3/fopencookie.3
@@
-23,7
+23,7
@@
.\" the source, must acknowledge the copyright and authors of this work.
.\" %%%LICENSE_END
.\"
.\" the source, must acknowledge the copyright and authors of this work.
.\" %%%LICENSE_END
.\"
-.TH FOPENCOOKIE 3 201
3-03-17
"Linux" "Linux Programmer's Manual"
+.TH FOPENCOOKIE 3 201
5-01-22
"Linux" "Linux Programmer's Manual"
.SH NAME
fopencookie \- opening a custom stream
.SH SYNOPSIS
.SH NAME
fopencookie \- opening a custom stream
.SH SYNOPSIS
@@
-378,7
+378,7
@@
main(int argc, char *argv[])
.seek = memfile_seek,
.close = memfile_close
};
.seek = memfile_seek,
.close = memfile_close
};
- FILE *
fp
;
+ FILE *
stream
;
struct memfile_cookie mycookie;
ssize_t nread;
long p;
struct memfile_cookie mycookie;
ssize_t nread;
long p;
@@
-397,8
+397,8
@@
main(int argc, char *argv[])
mycookie.offset = 0;
mycookie.endpos = 0;
mycookie.offset = 0;
mycookie.endpos = 0;
-
fp
= fopencookie(&mycookie,"w+", memfile_func);
- if (
fp
== NULL) {
+
stream
= fopencookie(&mycookie,"w+", memfile_func);
+ if (
stream
== NULL) {
perror("fopencookie");
exit(EXIT_FAILURE);
}
perror("fopencookie");
exit(EXIT_FAILURE);
}
@@
-406,7
+406,7
@@
main(int argc, char *argv[])
/* Write command\-line arguments to our file */
for (j = 1; j < argc; j++)
/* Write command\-line arguments to our file */
for (j = 1; j < argc; j++)
- if (fputs(argv[j],
fp
) == EOF) {
+ if (fputs(argv[j],
stream
) == EOF) {
perror("fputs");
exit(EXIT_FAILURE);
}
perror("fputs");
exit(EXIT_FAILURE);
}
@@
-414,11
+414,11
@@
main(int argc, char *argv[])
/* Read two bytes out of every five, until EOF */
for (p = 0; ; p += 5) {
/* Read two bytes out of every five, until EOF */
for (p = 0; ; p += 5) {
- if (fseek(
fp
, p, SEEK_SET) == \-1) {
+ if (fseek(
stream
, p, SEEK_SET) == \-1) {
perror("fseek");
exit(EXIT_FAILURE);
}
perror("fseek");
exit(EXIT_FAILURE);
}
- nread = fread(buf, 1, 2,
fp
);
+ nread = fread(buf, 1, 2,
stream
);
if (nread == \-1) {
perror("fread");
exit(EXIT_FAILURE);
if (nread == \-1) {
perror("fread");
exit(EXIT_FAILURE);
@@
-440,7
+440,7
@@
main(int argc, char *argv[])
.BR fopen (3),
.BR fseek (3)
.SH COLOPHON
.BR fopen (3),
.BR fseek (3)
.SH COLOPHON
-This page is part of release 3.7
5
of the Linux
+This page is part of release 3.7
9
of the Linux
.I man-pages
project.
A description of the project,
.I man-pages
project.
A description of the project,