return strncat(dest, src, num);
}
-const char *platform_tmpnam(char *str) {
- return tmpnam(str);
-}
-
const char *platform_getenv(const char *var) {
return getenv(var);
}
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
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;
*/
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.
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 */
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