Amiga Unix — 68040 · 68060

Manual pages › C library (3C)

mktemp(3C)

make a unique file name

From the original Amiga UNIX 2.1 manual. Some things it mentions may not be in this release.

NAME

mktemp - make a unique file name

SYNOPSIS

#include <stdlib.h>

char *mktemp(char *template);

DESCRIPTION

mktemp replaces the contents of the string pointed to by template with a unique file name, and returns template. The string in template should look like a file name with six trailing Xs; mktemp will replace the Xs with a character string that can be used to create a unique file name.

SEE ALSO

tmpfile(3S), tmpnam(3S).

DIAGNOSTIC

mktemp will assign to template the empty string if it cannot create a unique name.

NOTES

mktemp can create only 26 unique file names per process for each unique template.