📄 te
字号:
@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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -