AST(3)
π¦ AST(3) π¦
okay so bestie, this is the Library Functions Manual page for AST(3) β manual name folded in near the top, exactly the vibe. it's all about miscellaneous libast support, and it's giving "tiny utilities, big main character energy" π
β¨
π NAME π
ast β miscellaneous libast support
π¦ SYNOPSIS π¦
#include <ast.h>
char* astconf(const char* name, const char* path, const char* value);
Ast_confdisc_t astconfdisc(Ast_confdisc_t new_notify);
void astconflist(Sfio_t* stream, const char* path, int flags);
off_t astcopy(int rfd, int wfd, off_t n);
int astquery(int fd, const char* format , ...);
β¨ DESCRIPTION β¨
astconf is a string interface to the confstr(2), pathconf(2), and sysconf(2) calls. if value is 0 then the configuration parameter value for name is returned. some name configuration parameters may consult the path argument. in this case if path is 0 then "/" is used. otherwise if path is not 0 then it must exist. the string return value for name remains unchanged until the next astconf call on name. if value is 0 then a valid string is always returned; "" is returned if name has no configuration value. this simplifies the programming interface:
if (!strcmp(astconf("PATH_RESOLVE", NiL, NiL), "logical"))
/* the logical way ... */
if value is not 0 then the configuration parameter value for name is set to value. 0 is returned if the value cannot be set. the paradigm is:
universe = astconf("UNIVERSE", 0, "att");
...
astconf("UNIVERSE", 0, universe);
the settable configuration names are:
FS_3Dβ1if3d(1)viewpathing is enabled,0otherwise. this is an alternative to thefs3d(3)interface.PATH_RESOLVEβlogicalif symbolic links are followed during file tree traversal,physicalif symbolic links are not followed during file tree traversal, andmetaphysicalif symbolic links are followed at the top level during file tree traversal. these correspond to the generic-L,-P, and-Hcommand options.UNIVERSEβucbfor Berkeley style andattotherwise. this configuration parameter controls the universe setting on machines that support it (e.g., Pyramid).UNIVERSEalso controls the behavior of some commands likecat(1)andecho(1).
user defined name values may also be set and queried, but these should probably have some form of vendor prefix to avoid being stomped by future standards. no cap, that's literally what it says π«Ά
astconfdisc registers a discipline function:
int (*notify)(const char* name, const char* path, const char* value);
that is called just before the configuration parameter name is set to value relative to path. if notify returns 0 then the configuration parameter value is not changed.
astconflist lists the current configuration names and values of stream. if path is 0 then "/" is used where appropriate. if flags is 0 or R_OK|W_OK then all configuration parameters are listed. R_OK lists the readonly configuration parameters and W_OK lists the settable configuration parameters. X_OK lists the settable configuration parameters in a form that can be snarfed for input to the getconf(1) command.
astcopy efficiently copies up to n bytes from the file descriptor rfd to the file descriptor wfd. the actual number of bytes copied is returned; -1 is returned on error. if n is 0 then an optimal number of bytes (with respect to both rfd and wfd) is copied.
if possible mmap(2) is used to do the transfer. some implementations may bypass user buffer copies usually required by the read(2)-write(2) paradigm.
astquery outputs an sfprintf(3) prompt specified by format, ... to the controlling terminal and reads a response from the controlling terminal. Offirmative response returns 0, EOF or quit response returns -1, otherwise 1 is returned. if quit is greater than 0 then exit(quit) is called on a quit response. the responses will eventually be locale specific.
astwinsize returns the number of rows in *rows and the number of columns *col for the terminal file descriptor fd. if the number of rows or columns cannot be determined or if fd is not a terminal then *rows and *cols are set to 0. if ioctl (2) methods fail then the environment variable LINES is used to set *rows and the environment variable COLUMNS is used to set *cols.
π SEE ALSO π
getconf(1)confstr(2)mmap(2)pathconf(2)read(2)sysconf(2)write(2)
okay bestie, that's the whole page π the original footer only has AST(3) β no source/version/date line was provided β so that's the cute sign-off: AST(3), and you're all caught up. periodt ππ«Ά
π¦ where this page comes from
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms