|
Leptonica
1.54
|
and @fname == NULL, or v.v.). (4) If both
Input: dir (directory name; use '.' for local dir;
no trailing '/' and @dir == "/" is invalid)
tail (<optional> tailname, including extension if any;
can be null or empty but can't contain '/')
usetime (1 to include current time in microseconds in
the filename; 0 to omit.
usepid (1 to include pid in filename; 0 to omit.
Return: temp filename, or null on error
Notes: (1) This makes a filename that is as unique as desired, and which can optionally include both the time and pid in the name. (2) Use unix-style pathname separators ('/'). (3) Specifying the root directory () is invalid. (4) Specifying a @tail containing '/' is invalid. (5) The most general form (@usetime = @usepid = 1) is: <dir>/<usec>_<pid>_<tail> When @usetime = 1, @usepid = 0, the output filename is: <dir>/<usec>_<tail> When @usepid = 0, @usepid = 1, the output filename is: <dir>/<pid>_<tail> When @usetime = @usepid = 0, the output filename is: <dir>/<tail> Note: It is not valid to have @tail = null or empty and have both @usetime = @usepid = 0. That is, there must be some non-empty tail name. (6) N.B. The caller is responsible for freeing the returned filename. For windows, to avoid C-runtime boundary crossing problems when using DLLs, you must use lept_free() to free the name. (7) When