delorie.com/djgpp/doc/libc/libc_612.html | search |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <unistd.h> long pathconf(const char *filename, int name); |
This function returns various system-dependent configuration values. The name is one of the following:
_PC_LINK_MAX
The maximum number of directory entries that can refer to a single real file. Always 1 in DJGPP.
_PC_MAX_CANON
The maximum number of bytes in an editable input line. In DJGPP, this is 126 (DOS restriction).
_PC_MAX_INPUT
The maximum number of bytes in a non-editable input line. Also 126 in DJGPP.
_PC_NAME_MAX
The maximum length of an individual file name. If the filesystem where
filename resides supports long file names, the result is whatever
_get_volume_info
returns (usually 255); otherwise 12 will be
returned. See section _use_lfn.
_PC_PATH_MAX
The maximum length of a complete path name. If the filesystem where
filename resides supports long file names, the result is whatever
_get_volume_info
returns (usually 260); otherwise 80 will be
returned. See section _use_lfn.
_PC_PIPE_BUF
The size of a pipe's internal buffer. In DJGPP, this returns 512.
_PC_CHOWN_RESTRICTED
If non-zero, only priviledged user can change the ownership of files by
calling chown
, otherwise anyone may give away files. The DJGPP
version always returns zero, since MS-DOS files can be freely given
away.
_PC_NO_TRUNC
If zero is returned, filenames longer than what
pathconf (filename, _PC_NAME_MAX)
returns are truncated,
otherwise an error occurs if you use longer names. In DJGPP, this
returns 0, since DOS always silently truncates long names.
_PC_VDISABLE
A character to use to disable tty special characters. DJGPP currently doesn't support special characters, so this returns -1.
The selected configuration value is returned.
ANSI/ISO C | No |
POSIX | 1003.2-1992; 1003.1-2001 |
char *buf = malloc(pathconf("c:/", _PC_MAX_PATH)+1); |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
webmaster | delorie software privacy |
Copyright © 2004 | Updated Apr 2004 |