te
来自「Algorithms for Image Processing and Comp」· 代码 · 共 89 行
TXT
89 行
@c ----------------------------------------------------------------------
@node tell, io
@heading @code{tell}
@subheading Syntax
@example
long tell(int file);
@end example
@subheading Description
This function returns the location of the file pointer for @var{file}.
@subheading Return Value
The file pointer, or -1 on error.
@subheading Example
@example
long q = tell(fd);
@end example
@c ----------------------------------------------------------------------
@node telldir, file system
@heading @code{telldir}
@subheading Syntax
@example
#include <dirent.h>
long telldir(DIR *dir);
@end example
@subheading Description
This function returns a value which indicates the position of the
pointer in the given directory. This value is only useful as an
argument to @code{seekdir} (@pxref{seekdir}).
@subheading Return Value
The directory pointer.
@subheading Example
@example
DIR *dir;
long q = telldir(dir);
do_something();
seekdir(dir, q);
@end example
@c ----------------------------------------------------------------------
@node tempnam, stdio
@heading @code{tempnam}
@subheading Syntax
@example
#include <stdio.h>
char *tempnam(const char *dir, const char *prefix);
@end example
@subheading Description
This function returns a temporary file name in a buffer allocated by
@code{malloc}. The locations and filenames searched for temporary space
are as follows:
@example
getenv("TMPDIR")/@var{prefix}??????
@var{dir}/@var{prefix}??????
@code{P_tmpdir}/@var{prefix}??????
/tmp/@var{prefix}??????
@end example
@subheading Return Value
A pointer to the file name, or NULL if error.
@subheading Example
@example
char *fn = tempnam(".", "dj");
free(fn);
@end example
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?