GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Macros | Functions | Variables
tempname.c File Reference
#include <errno.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include "statdefs.h"
Include dependency graph for tempname.c:

Go to the source code of this file.


#define FILENAME_MAX   1024
#define P_tmpdir   "/usr/tmp/"


char__stdio_gen_tempname (const char *dir, const char *pfx, int dir_search, size_t *lenptr, FILE **streamptr)
static int diraccess (const char *dir)
static int exists (const char *file)


static const char letters [] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"

Macro Definition Documentation

#define FILENAME_MAX   1024

Definition at line 42 of file tempname.c.

Referenced by __stdio_gen_tempname().

#define P_tmpdir   "/usr/tmp/"

Definition at line 47 of file tempname.c.

Referenced by __stdio_gen_tempname(), and get_P_tmpdir().

Function Documentation

char* __stdio_gen_tempname ( const char dir,
const char pfx,
int  dir_search,
size_t lenptr,
FILE **  streamptr 

Definition at line 100 of file tempname.c.

References d, diraccess(), exists(), FILENAME_MAX, letters, and P_tmpdir.

Referenced by tempnam().

static int diraccess ( const char dir)

Definition at line 52 of file tempname.c.

References stat().

Referenced by __stdio_gen_tempname().

static int exists ( const char file)

Variable Documentation

const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"

Definition at line 82 of file tempname.c.

Referenced by __stdio_gen_tempname().