add strdup for S5
[unix-history] / usr / src / lib / libc / stdio / tmpnam.3
... / ...
CommitLineData
1.\" Copyright (c) 1988 Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
16.\" @(#)tmpnam.3 5.7 (Berkeley) %G%
17.\"
18.TH COMPATS5 3 ""
19.UC 7
20.SH NAME
21memccpy, memchr, memcmp, memcpy, memset, strchr,
22strcspn, strpbrk, strrchr, strspn, tempnam,
23tmpfile, tmpnam \- System V compatibility routines
24.SH SYNOPSIS
25.nf
26.B char *memccpy(from, to, ch, count)
27.B char *from, *to;
28.B int ch, count;
29.PP
30.B char *memchr(str, ch, count)
31.B char *str;
32.B int ch, count;
33.PP
34.B int memcmp(str1, str2, count)
35.B char *str1, *str2;
36.B int count;
37.PP
38.B char *memcpy(from, to, count)
39.B char *from, to;
40.B int count;
41.PP
42.B char *memset(str, ch, count)
43.B char *str;
44.B int ch, count;
45.PP
46.B char *strchr(str, ch);
47.B char *str;
48.B int ch;
49.PP
50.B int strcspn(str, chars)
51.B char *str, *chars;
52.PP
53.B char *strpbrk(str, chars)
54.B char *str, *chars;
55.PP
56.B char *strrchr(str, ch);
57.B char *str;
58.B int ch;
59.PP
60.B int strspn(str, chars)
61.B char *str, *chars;
62.PP
63.B char *strtol(str, ptr, base)
64.B char *str, **ptr;
65.B int base;
66.PP
67.B char *tempnam(tmpdir, prefix)
68.B char *tmpdir, *prefix;
69.PP
70.B char *tmpfile()
71.PP
72.B char *tmpnam(str)
73.B char *str;
74.PP
75.SH COMMENT
76The \fI#defines\fP \fIP_tmpdir\fP and \fIL_tmpnam\fP, used by the routines
77\fItempnam\fP, \fItmpfile\fP, and \fItmpnam\fP are not available in
78\fI<stdio.h>\fP. If the code requires them, just use:
79.PP
80#include <sys/param.h>
81.br
82#define P_tmpdir "/usr/tmp"
83#define L_tmpnam MAXPATHLEN
84.PP
85Also, note that the caveat in the System V manual page that these functions
86can start recycling previously used names is untrue in this system.
87.SH DESCRIPTION
88The above routines are available and behave as in System V.