BRL-CAD
#include "common.h"
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "bio.h"
#include "bu/file.h"
#include "bu/log.h"
#include "bu/list.h"
#include "bu/malloc.h"
#include "bu/vls.h"
Include dependency graph for temp.c:

Go to the source code of this file.

Data Structures

struct  temp_file_list
 

Macros

#define _TF_FAIL   "WARNING: Unable to create a temporary file\n"
 

Functions

FILE * fdopen (int, const char *)
 
HIDDEN void temp_close_files (void)
 
HIDDEN void temp_add_to_list (const char *fn, int fd)
 
HIDDEN int mkstemp (char *file_template)
 
FILE * bu_temp_file (char *filepath, size_t len)
 

Detailed Description

Routine to open a temporary file.

Definition in file temp.c.

Macro Definition Documentation

#define _TF_FAIL   "WARNING: Unable to create a temporary file\n"

Definition at line 40 of file temp.c.

Referenced by bu_temp_file().

Function Documentation

FILE* fdopen ( int  ,
const char *   
)
HIDDEN void temp_close_files ( void  )

Definition at line 62 of file temp.c.

References bu_file_delete(), BU_LIST_DEQUEUE, BU_LIST_WHILE, BU_PUT, bu_vls_addr(), bu_vls_free(), BU_VLS_IS_INITIALIZED, temp_file_list::fd, temp_file_list::fn, and temp_file_list::l.

Referenced by temp_add_to_list().

Here is the call graph for this function:

HIDDEN void temp_add_to_list ( const char *  fn,
int  fd 
)

Definition at line 105 of file temp.c.

References BU_GET, BU_LIST_INIT, BU_LIST_PUSH, bu_vls_init(), bu_vls_strcpy(), temp_file_list::fd, temp_file_list::fn, temp_file_list::l, and temp_close_files().

Referenced by bu_temp_file().

Here is the call graph for this function:

HIDDEN int mkstemp ( char *  file_template)

Definition at line 140 of file temp.c.

References temp_file_list::fd, and time().

Referenced by bu_temp_file().

Here is the call graph for this function: