📄 tempname.cwp.lib
字号:
TEMPORARY_FILENAME - Creates a file name in a user-specified directory.Function prototype:char *temporary_filename(char *tempfile);Input:tempfile pointer to directory prefix string (eg. /usr/tmp/)Output:tempfile pointer to filename string (eg. /usr/tmp/1206aaa)Notes:temporary_filename creates a file name by appending a sequence ofnumbers and letters (which is created by tmpnam) to the prefix stringpassed as its argument. On return the input argument points to the(now augmented) prefix string.It is duty of the calling program to provide room for the augmentedstring. The resulting string is typically used as a name for atemporary file; in this case it is the calling program's job to makesure that the supplied prefix ends with a slash.This routine was written to supplement the ANSI C function tmpnamwhich also creates a temporary filename, but within a fixed directory,usually the /tmp directory. Unfortunately, some /tmp directories aretoo small to hold typical seismic data sets, so this routine allowsthe user to specify a directory with sufficient capacity. Also notethat on many systems, the tmpfile() call avoids this problem bysimulating a temporary file with a memory buffer. However, this isnot a panacea as the file size might exceed available memory and onsome systems this call does actually create a file (again, usually intmp).Author: Jack K. Cohen, Colorado School of Mines, 12/12/95
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -