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