pa
来自「Algorithms for Image Processing and Comp」· 代码 · 共 55 行
TXT
55 行
@c ----------------------------------------------------------------------
@node pathconf, posix
@heading @code{pathconf}
@subheading Syntax
@example
#include <unistd.h>
long pathconf(const char *filename, int name);
@end example
@subheading Description
This function returns various system-dependent configuration values.
The @var{name} is one of the following:
@table @code
@item _PC_LINK_MAX
The maximum number of directory entries that can refer to a single real file.
@item _PC_MAX_CANON
The maximum number of bytes in an editable input line.
@item _PC_MAX_INPUT
The maximum number of bytes in a non-editable input line.
@item _PC_NAME_MAX
The maximum length of an individual file name.
@item _PC_PATH_MAX
The maximum length of a complete path name.
@item _PC_PIPE_BUF
The size of a pipe's internal buffer.
@end table
@subheading Return Value
The selected configuration value is returned.
@subheading Example
@example
char *buf = malloc(pathconf("c:/", _PC_MAX_PATH)+1);
@end example
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?