summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1999-04-09 18:26:46 +0000
committerimp <imp@FreeBSD.org>1999-04-09 18:26:46 +0000
commit53a0c77900be952ec8712901b2a1f3e2655048c3 (patch)
tree499bd0ee87fd7645ee08bbcc820fc6a132fded74 /lib/libc/stdio
parentf9cbfc392adf0516b667d4c5a97d05789a821565 (diff)
downloadFreeBSD-src-53a0c77900be952ec8712901b2a1f3e2655048c3.zip
FreeBSD-src-53a0c77900be952ec8712901b2a1f3e2655048c3.tar.gz
Various language and style concerns fixed.
Noted by: bde
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/mktemp.329
1 files changed, 18 insertions, 11 deletions
diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3
index b6048ce..f5fa9cf 100644
--- a/lib/libc/stdio/mktemp.3
+++ b/lib/libc/stdio/mktemp.3
@@ -44,7 +44,7 @@
.Ft int
.Fn mkstemp "char *template"
.Ft int
-.Fn mkstemps "char *template, int suffixlen"
+.Fn mkstemps "char *template" "int suffixlen"
.Ft char *
.Fn mkdtemp "char *template"
.Sh DESCRIPTION
@@ -87,11 +87,11 @@ The
.Fn mkstemps
function acts the same as
.Fn mkstemp ,
-except it permits a suffix to exist in the template. The template
-should be of the form
+except it permits a suffix to exist in the template.
+The template should be of the form
.Pa /tmp/tmpXXXXXXsuffix .
.Fn mkstemps
-is told the length of the suffix string, ie. strlen("suffix");
+is told the length of the suffix string.
.Pp
The
.Fn mkdtemp
@@ -108,13 +108,16 @@ functions return a pointer to the template on success and
on failure.
The
.Fn mkstemp
-function
-returns \-1 if no suitable file could be created.
+and
+.Fn mkstemps
+functions
+return \-1 if no suitable file could be created.
If either call fails an error code is placed in the global variable
.Va errno .
.Sh ERRORS
The
-.Fn mkstemp
+.Fn mkstemp ,
+.Fn mkstemps
and
.Fn mkdtemp
functions
@@ -127,7 +130,8 @@ The pathname portion of the template is not an existing directory.
.El
.Pp
The
-.Fn mkstemp
+.Fn mkstemp ,
+.Fn mkstemps
and
.Fn mkdtemp
functions
@@ -139,7 +143,9 @@ function.
.Pp
The
.Fn mkstemp
-function
+and
+.Fn mkstemps
+functions
may also set
.Va errno
to any value specified by the
@@ -158,14 +164,15 @@ function.
A common problem that results in a core dump is that the programmer
passes in a read-only string to
.Fn mktemp ,
-.Fn mkstemp
+.Fn mkstemp ,
+.Fn mkstemps
or
.Fn mkdtemp .
This is common with programs that were developed before
.St -ansiC
compilers were common.
For example, calling
-.Fn mkstemp
+.Fn mkstemp
with an argument of
.Qq /tmp/tempfile.XXXXXX
will result in a core dump due to
OpenPOWER on IntegriCloud