We're doing it this way.

This commit is contained in:
Dale Weiler 2013-10-18 05:37:26 -04:00
parent 8d5e719026
commit 0f6c44d671
6 changed files with 2 additions and 34 deletions

4
ansi.c
View file

@ -48,10 +48,6 @@ char *platform_strncat(char *dest, const char *src, size_t num) {
return strncat(dest, src, num);
}
const char *platform_tmpnam(char *str) {
return tmpnam(str);
}
const char *platform_getenv(const char *var) {
return getenv(var);
}

View file

@ -315,7 +315,6 @@ const char *util_ctime (const time_t *timer);
typedef struct fs_file_s fs_file_t;
bool util_isatty(fs_file_t *);
const char *util_tmpnam(char *);
/*
* A flexible vector implementation: all vector pointers contain some

4
msvc.c
View file

@ -76,10 +76,6 @@ char *platform_strncat(char *dest, const char *src, size_t num) {
return strncat_s(dest, num, src, _TRUNCATE);
}
const char *platform_tmpnam(char *str) {
return tmpnam_s(str, L_tmpnam);
}
const char *platform_getenv(const char *var) {
char *buffer = (char *)platform_mem_allocate(GETENV_BUFFER);
size_t size;

View file

@ -185,24 +185,6 @@ const char *platform_ctime(const time_t *timer);
*/
char *platform_strncat(char *dest, const char *src, size_t num);
/*
* Function: platform_tmpnam
* Generates names you can use to create temporary files.
*
* Parameters:
* str - Pointer that will hold the generated name and will be identical
* to the name returned by the function. This is a convenient way
* to save the generated name.
*
* Returns:
* Pointer to the name generate or *NULL* if there is a failure. Failure
* can occur if you attempt more than TMP_MAX calls.
*
* Remarks:
* Returns a name unique in the current workign directory.
*/
const char *platform_tmpnam(char *str);
/*
* Function: platform_getenv
* Get a value from the current enviroment.

4
test.c
View file

@ -163,8 +163,8 @@ static int task_pclose(fs_file_t **handles) {
char *cmd = NULL;
popen_t *open = (popen_t*)mem_a(sizeof(popen_t));
util_tmpnam(open->name_err);
util_tmpnam(open->name_out);
tmpnam(open->name_err);
tmpnam(open->name_out);
(void)mode; /* excluded */

5
util.c
View file

@ -281,11 +281,6 @@ bool util_isatty(fs_file_t *file) {
if (file == (fs_file_t*)stderr) return !!platform_isatty(STDERR_FILENO);
return false;
}
const char *util_tmpnam(char *str) {
return platform_tmpnam(str);
}
/*
* A small noncryptographic PRNG based on:
* http://burtleburtle.net/bob/rand/smallprng.html