HP-UX Reference Section 3: Library Functions (A-M) HP-UX 11i Version 1, September 2005 Update Volume 6 of 10 Manufacturing Part Number : B2355-90907 Printed In USA E0905 Printed in USA © Copyright 1983-2005 Hewlett-Packard Development Company LP.
Legal Notices The information in this document is subject to change without notice. Warranty The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. U.S. Government License Confidential computer software.
Copyright 1996 Morning Star Technologies, Inc. Copyright 1996 Progressive Systems, Inc. Trademark Notices Intel and Itanium are registered trademarks of Intel Corporation in the US and other countries and are used under license. Java is a US trademark of Sun Microsystems, Inc. Microsoft and MS-DOS are U.S. registered trademarks of Microsoft Corporation. OSF/Motif is a trademark of The Open Group in the US and other countries. UNIX is a registered trademark of The Open Group.
Revision History This document’s printing date and part number indicate its edition. The printing date changes when a new edition is printed. (Minor corrections and updates which are incorporated at reprint do not cause the date to change.) New editions of this manual incorporate all material updated since the previous edition. Part Number Release; Date; Format; Distribution B2355-60127 HP-UX 11i Version 1; September 2005 Update; one volume HTML; http://docs.hp.com and Instant Information.
Typographical Conventions audit (5) An HP-UX manpage. audit is the name and 5 is the section in the HP-UX Reference. On the web and on the Instant Information CD, it may be a hot link to the manpage itself. From the HP-UX command line, you can enter “man audit” or “man 5 audit” to view the manpage. See man (1). Book Title The title of a book. On the web and on the Instant Information CD, it may be a hot link to the book itself. KeyCap The name of a keyboard key.
vi
Preface HP-UX is the Hewlett-Packard Company’s implementation of a UNIX operating system that is compatible with various industry standards. It is based on the System V Release 4 operating system and includes important features from the Fourth Berkeley Software Distribution. The ten volumes of this manual contain the system reference documentation, made up of individual entries called manpages, named for the man command (see man (1)) that displays them on the system.
viii
Volume Six Table of Contents Section 3
Volume Six Table of Contents Section 3
Table of Contents Volumes Six and Seven Section 3: Library Functions Entry Name(Section): name Description intro(3C): intro ................................................................................ introduction to subroutines and libraries __data_start: last locations in program ...................................................................................... see end(3C) __nis_map_group(): NIS+ group manipulation functions ...............................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description assert(3X): assert() ................................................................................................ verify program assertion atan(3M): atan(), atanf() ............................................................................................. arctangent functions atan2(3M): atan2(), atan2f() .................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description bsearch(3C): bsearch() ...................................................................................... binary search a sorted table btowc(3C): wctob(3C) ........................................................... convert between single-byte and wide-character btowc(): convert single-byte to wide-character ......................................................................... see btowc(3C) bufsplit(3G): bufsplit() .......
Table of Contents Volumes Six and Seven Entry Name(Section): name Description clrtobot(3X): clrtobot(), wclrtobot() ................................................. clear from cursor to end of window clrtoeol(3X): clrtoeol(), wclrtoeol() ........................................................ clear from cursor to end of line color_content(): color manipulation functions ..................................................... see can_change_color(3X) color_set(): window attribute control functions ..........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description dbm(3C): dbmclose(), dbminit(), delete(), fetch(), firstkey(), nextkey(), store() ........................................................ database subroutines, single-database version dbm_clearerr(): reset error condition on named database, multiple-database version ............. see ndbm(3X) dbm_close(): close an open database, multiple-database version ..............................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description ecvt(3C): ecvt(), fcvt(), gcvt() ..................................................... convert floating-point number to string edata: last locations in program .................................................................................................... see end(3C) elf(3E): elf ..................................................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description ........................................................................................... class-dependent data translation of ELF files end(3C): end, edata, etext, __data_start, __text_start .......................................................................................................................... last locations in program enddvagent: free memory and closes file ....................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description fesettrapenable(3M): fesettrapenable() ...................................................... set exception trap enable bits fetch(): access data under a key, single-database version ........................................................... see dbm(3C) fetestexcept(3M): fetestexcept() ................................................................... test floating-point exceptions feupdateenv(3M): feupdateenv() ................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description fstatvfsdev64(): non-POSIX standard API interfaces to support large files ..................... see fgetpos64(3S) ftell(): get offset from beginning-of-file of current byte in stream file ....................................... see fseek(3S) ftell_unlocked(): get offset from beginning-of-file of current byte in stream file, no locking of stream for multithread applications ..........................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description getgrgid(), getgrnam(): get group file entry .................................................................... see getgrent(3C) gethostbyaddr(): get network host entry ....................................................................... see gethostent(3N) gethostbyname(): get network host entry .......................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description getresuid(3): getresuid(), getresgid() ............................ get real, effective, and saved user or group ID’s getrpcbyname(): get RPC entry ........................................................................................ see getrpcent(3C) getrpcbynumber(): get RPC entry ....................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description gss_add_oid_set_member(3): gss_add_oid_set_member() .... add an Object Identifier (OID) to an OID set gss_canonicalize_name(3): gss_canonicalize_name() convert an internal name to an internal mechanism name (MN) representation of an opaque internal name gss_compare_name(3): gss_compare_name() ...............
Table of Contents Volumes Six and Seven Entry Name(Section): name Description herror(): resolver routines .................................................................................................. see resolver(3N) hline(3X): hline(), mvhline(), mvvline(), mvwhline(), mvwvline(), vline(), whline(), wvline() ..............................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description innstr(3X): innstr(), instr(), mvinnstr(), mvinstr(), mvwinnstr(), mvwinstr(), winnstr(), winstr() ................................................................... input a multi-byte character string from a window innwstr(3X): innwstr(), inwstr(), mvinnwstr(), mvinwstr(), mvwinnwstr(), mvwinwstr(), winnwstr(), winwstr() ..............................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description j0(3M): j0(), j1(), jn() ............................................................................... Bessel functions of the first kind j1(): Bessel function ........................................................................................................................ see j0(3M) jn(): Bessel function ......................................................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description mallopt(): control memory space allocation ............................................................................ see malloc(3C) mblen(): multibyte characters and strings conversions ....................................................... see multibyte(3C) mbrlen(3C): mbrlen() ............................................................................... get number of bytes in a character mbrtowc(3C): mbrtowc() ............
Table of Contents Volumes Six and Seven Entry Name(Section): name Description mvinch(): input a single-byte character and rendition from a window ............................................ see inch(3X) mvinchnstr(): input an array of single-byte characters and renditions from a window ........... see inchnstr(3X) mvinchstr(): input an array of single-byte characters and renditions from a window ............. see inchnstr(3X) mvinnstr(): input a multi-byte character string from a window ...................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description mvwvline_set(): draw lines from complex characters and renditions .................................... see hline_set(3X) nan(3M): nan() ........................................................................................... string-to-NaN conversion function napms(3X): napms() ..............................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description nis_local_directory(): NIS+ local names .......................................................... see nis_local_names(3N) nis_local_group(): NIS+ local names .................................................................. see nis_local_names(3N) nis_local_host(): NIS+ local names ....................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description pam(3): pam .................................................................................................. Pluggable Authentication Module pam_acct_mgmt(3): pam_acct_mgmt() ...................................... perform PAM account validation procedures pam_authenticate(3): pam_authenticate() ................. perform authentication within the PAM framework pam_chauthtok(3): pam_chauthtok() ........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description pthread_attr_getprocessor_np(): get processor and binding_type attributes ........................................................ see pthread_attr_getdetachstate(3T) pthread_attr_getschedparam(): get schedparam attribute ........... see pthread_attr_getdetachstate(3T) pthread_attr_getschedpolicy(): get schedpolicy attribute .......... see pthread_attr_getdetachstate(3T) pthread_attr_getscope(): get contentionscope attribute .....
Table of Contents Volumes Six and Seven Entry Name(Section): name Description pthread_mutex_destroy(): destroy a mutex .................................................. see pthread_mutex_init(3T) pthread_mutex_getprioceiling(3T): pthread_mutex_getprioceiling(), pthread_mutex_setprioceiling() ........................................... get and set the prioceiling of a mutex pthread_mutex_getyieldfreq_np(): get the yield frequency attribute ....................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description pthread_rwlock_wrlock(3T): pthread_rwlock_wrlock(), pthread_rwlock_trywrlock() ................................................................................. lock or attempt to lock a read-write lock for writing pthread_rwlockattr_destroy(): destroy a read-write lock attribute object ..........................................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description refresh(): refresh windows and lines .................................................................................... see doupdate(3x) regcmp(3X): regcmp(), regex() ....................................................... compile and execute regular expression regcomp(3C): regcomp(), regerror(), regexec(), regfree() ........ regular expression matching routines regerror(): regular expression matching routines ..................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_authunix() ..............................................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description setfsent(): get file system descriptor file entry ................................................................... see getfsent(3X) setgrent(): get group file entry .......................................................................................... see getgrent(3C) sethostent(): get, set, or end network host entry ...........................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description sleep(3C): sleep() ........................................................................................... suspend execution for interval slk_attr_off(): soft label functions ................................................................................... see slk_attroff(3X) slk_attr_on(): soft label functions .....................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description ...................................................................................................................................... see strtoacl(3C) strtoaclpatt(): convert string form to access control list (ACL) structure (HFS File System only) ......................................................................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description ................................................................................... synchronise a window with its parents or children sys_errlist(): system error messages .................................................................................. see perror(3C) sys_nerr(): system error messages ........................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description tgetflag(): emulate /usr/share/lib/termcap access routines ....................................... see termcap(3X) tgetflag(): termcap database emulation ................................................................................ see tgetent(3X) tgetnum(): emulate /usr/share/lib/termcap access routines ......................................... see termcap(3X) tgetnum(): termcap database emulation .............................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description vidputs(): output attributes to the terminal ............................................................................. see vidattr(3x) vline(): draw lines from single-byte characters and renditions .................................................... see hline(3X) vline_set(): draw lines from complex characters and renditions ..........................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description wcsstr(): wide character string operations .......................................................................... see wcstring(3C) wcstod(3C): wcstod() ............................................ convert wide character string to double-precision number wcstok(): wide character string operations ..........................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description wnoutrefresh(): refresh windows and lines ......................................................................... see doupdate(3x) wordexp(3C): wordexp(), wordfree() ................................................................... perform word expansions wordfree(): free memory associated with word expansions ................................................. see wordexp(3C) wprintf(): print formatted wide-character output ...
Table of Contents Volumes Six and Seven Entry Name(Section): name Description xdr_hyper(), xdr_int(), xdr_long(), xdr_longlong_t(), xdr_quadruple(), xdr_short(), xdr_u_char(), xdr_u_hyper(), xdr_u_int(), xdr_u_long(), xdr_u_longlong_t(), xdr_u_short(), xdr_void() ...................................... library routines for external data representation xdr_sizeof(): library routines for external data representation .....................................
Section 3 Part 1 Library Functions A-M
Section 3 Part 1 Library Functions A-M
intro(3C) intro(3C) NAME intro, abc - introduction to subroutines and libraries DESCRIPTION This section describes functions found in various libraries, other than those functions that directly invoke HP-UX system primitives, which are described in Section (2) of this volume.
intro(3C) intro(3C) Web access to HP-UX documentation at http://docs.hp.
a64l(3C) a64l(3C) NAME a64l( ), l64a( ) - convert between long integer and base-64 ASCII string SYNOPSIS #include long int a64l(const char *s); char *l64a(long int l); a Obsolescent Interface int l64a_r(long int l, char *buffer, int buflen); DESCRIPTION These functions are used to maintain numbers stored in base-64 ASCII characters. This is a notation by which long integers can be represented by up to six characters; each character represents a "digit" in a radix-64 notation.
abort(3C) abort(3C) NAME abort( ) - generate a software abort fault SYNOPSIS a #include void abort(void); DESCRIPTION abort() first closes all open files, streams, directory streams, and message catalogue descriptors, if possible, then causes the signal SIGABRT to be sent to the calling process. This may cause a core dump to be generated (see signal(2)). If the signal SIGABRT is caught, the handling function is executed.
abs(3C) abs(3C) NAME abs( ), labs( ) - return integer absolute value SYNOPSIS #include int abs(int i); long int labs(long int i); a DESCRIPTION abs() returns the absolute value of its integer operand. labs() is similar to abs() , except that the argument and the returned value each have type long int . The largest negative integer returns itself. WARNINGS In two’s-complement representation, the absolute value of the negative integer with largest magnitude is undefined.
aclsort(3C) aclsort(3C) NAME aclsort() - sort an Access Control List (JFS File Systems only) SYNOPSIS a #include #include int aclsort(int nentries, int calclass, struct acl *aclbufp); DESCRIPTION The aclsort() routine sorts JFS Access Control List (ACL) entries into the correct order to be accepted by the acl() system call. See acl(2).
aclsort(3C) aclsort(3C) AUTHOR aclsort() was developed by AT&T. SEE ALSO acl(2), aclv(5).
acltostr(3C) acltostr(3C) NAME acltostr( ) - convert access control list (ACL) structure to string form (HFS File Systems only) SYNOPSIS a #include char *acltostr(int nentries, const struct acl_entry acl[], int form); Obsolescent Interface int acltostr_r( int nentries, const struct acl_entry acl[], int form, char *strbuf, int length); Remarks: To ensure continued conformance with emerging industry standards, features described in this manual entry are likely to change in a future release.
acltostr(3C) acltostr(3C) fputs (acltostr (nentries, acl, FORM_SHORT), stdout); WARNINGS The value returned by acltostr() is a pointer into a buffer, the contents of which are overwritten by subsequent calls to acltostr() by the same thread. acltostr_r() is an obsolescent interface supported only for compatibility with existing DCE applications. New multithreaded applications should use acltostr() . DEPENDENCIES acltostr() is only supported on HFS file system on standard HP-UX operating system.
acos(3M) acos(3M) NAME acos( ), acosf( ) - arccosine functions SYNOPSIS a #include double acos(double x); float acosf(float x); DESCRIPTION acos() returns the arccosine of x in the range 0 to π. acosf() is a float version of acos() ; it takes a float argument and returns a float result. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options.
acosd(3M) acosd(3M) NAME acosd( ), acosdf( ) - degree-valued arccosine functions SYNOPSIS #include double acosd(double x); float acosdf(float x); a DESCRIPTION acosd() is a degree-valued version of the acos() function. It returns the arccosine of x in the range 0 to 180. acosdf() is a float version of acosd() ; it takes a float argument and returns a float result.
acosh(3M) acosh(3M) NAME acosh( ) - inverse hyperbolic cosine function SYNOPSIS a #include double acosh(double x); DESCRIPTION The acosh() function computes the inverse hyperbolic cosine of its argument. The ISO/ANSI C committee has approved the acosh() function for inclusion in the C9X draft standard. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. Make sure your program includes .
add_wch(3X) add_wch(3X) (ENHANCED CURSES) NAME add_wch, mvadd_wch, mvwadd_wch, wadd_wch — add a complex character and rendition to a window SYNOPSIS #include
add_wchnstr(3X) add_wchnstr(3X) (ENHANCED CURSES) NAME add_wchnstr, add_wchstr, mvadd_wchnstr, mvadd_wchstr, mvwadd_wchnstr, mvwadd_wchstr, wadd_wchnstr, wadd_wchstr — add an array of complex characters and renditions to a window a SYNOPSIS #include
addch(3X) addch(3X) (CURSES) NAME addch, mvaddch, mvwaddch, waddch — add a single-byte character and rendition to a window and advance the cursor SYNOPSIS a #include
addchnstr(3X) addchnstr(3X) (ENHANCED CURSES) NAME addchnstr, mvaddchnstr, mvwaddchnstr, waddchnstr — add length limited string of single-byte characters and renditions to a window a SYNOPSIS #include
addchstr(3X) addchstr(3X) (CURSES) NAME addchstr, mvaddchstr, mvwaddchstr, waddchstr — add string of single-byte characters and renditions to a window SYNOPSIS a #include
addnstr(3X) addnstr(3X) (ENHANCED CURSES) NAME addnstr, addstr, mvaddnstr, mvaddstr, mvwaddnstr, mvwaddstr waddnstr, waddstr — add a string of multi-byte characters without rendition to a window and advance cursor a SYNOPSIS #include
addnwstr(3X) addnwstr(3X) (ENHANCED CURSES) NAME addnwstr, addwstr, mvaddnwstr, mvaddwstr, mvwaddnwstr, mvwaddwstr, waddnwstr, waddwstr — add a wide-character string to a window and advance the cursor SYNOPSIS #include
addsev(3C) addsev(3C) NAME addsev() - define additional severities for formatting routines SYNOPSIS a #include int addsev(int sev, const char *sev_string); DESCRIPTION The addsev() routine allows the user to define additional severities to be used by formatting routines (see pfmt(3C)) in the standard message format. sev is the severity level. It must be between 5 and 255 inclusively. sev_string is a character string to be associated for this severity level.
asin(3M) asin(3M) NAME asin( ), asinf( ) - arcsine functions SYNOPSIS #include double asin(double x); float asinf(float x); a DESCRIPTION asin() returns the arcsine of x in the range −π/2 to π/2. asinf() is a float version of asin() ; it takes a float argument and returns a float result. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options.
asind(3M) asind(3M) NAME asind( ), asindf( ) - degree-valued arcsine functions SYNOPSIS a #include double asind(double x); float asindf(float x); DESCRIPTION asind() is a degree-valued version of the asin() function. It returns the arcsine of x in the range −90 to 90. asindf() is a float version of asind() ; it takes a float argument and returns a float result.
asinh(3M) asinh(3M) NAME asinh( ) - inverse hyperbolic sine function SYNOPSIS #include double asinh(double x); a DESCRIPTION The asinh() function computes the inverse hyperbolic sine of its argument. The ISO/ANSI C committee has approved the asinh() function for inclusion in the C9X draft standard. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. Make sure your program includes .
assert(3X) assert(3X) NAME assert( ) - verify program assertion SYNOPSIS a #include void assert(int expression); DESCRIPTION This macro is useful for putting diagnostics into programs. When it is executed, if expression is false (zero), assert() prints: Assertion failed: expression , file xyz , line nnn on the standard error output and aborts. In the error message, xyz is the name of the source file and nnn the source line number of the assert() statement.
atan(3M) atan(3M) NAME atan( ), atanf( ) - arctangent functions SYNOPSIS #include double atan(double x); float atanf(float x); a DESCRIPTION atan() returns the arctangent of x in the range −π/2 to π/2. atanf() is a float version of atan() ; it takes a float argument and returns a float result. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options.
atan2(3M) atan2(3M) NAME atan2( ), atan2f( ) - arctangent-and-quadrant functions SYNOPSIS a #include double atan2(double y, double x); float atan2f(float y, float x); DESCRIPTION atan2() returns the arctangent of y/x, in the range −π to π, using the signs of both arguments to determine the quadrant of the return value. atan2f() is a float version of atan2() ; it takes float arguments and returns a float result.
atan2(3M) atan2(3M) STANDARDS CONFORMANCE atan2() : SVID3, XPG4.
atan2d(3M) atan2d(3M) NAME atan2d( ), atan2df( ) - degree-valued arctangent-and-quadrant functions SYNOPSIS a #include double atan2d(double y, double x); float atan2df(float y, float x); DESCRIPTION atan2d() is a degree-valued version of the atan2() function. It returns the arctangent of y/x, in the range −180 to 180, using the signs of both arguments to determine the quadrant of the return value. atan2df() is a float version of atan2d() ; it takes float arguments and returns a float result.
atand(3M) atand(3M) NAME atand( ), atandf( ) - degree-valued arctangent functions SYNOPSIS #include double atand(double x); float atandf(float x); a DESCRIPTION atand() is a degree-valued version of the atan() function. It returns the arctangent of x in the range −90 to 90. atandf() is a float version of atand() ; it takes a float argument and returns a float result.
atanh(3M) atanh(3M) NAME atanh( ) - inverse hyperbolic tangent function SYNOPSIS a #include double atanh(double x); DESCRIPTION The atanh() function computes the inverse hyperbolic tangent of its argument. The ISO/ANSI C committee has approved the atanh() function for inclusion in the C9X draft standard. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. Make sure your program includes .
atexit(3) atexit(3) NAME atexit - register a function to be called at program termination SYNOPSIS #include int atexit(void (*func)(void)); a DESCRIPTION atexit() registers the function func to be called, without arguments, at normal program termination. Functions registered by atexit() are called in reverse order of registration. An atexit() call during exit processing is always unsuccessful. The number of registered functions should not exceed ATEXIT_MAX as specified in .
attr_get(3X) attr_get(3X) (ENHANCED CURSES) NAME attr_get, attr_off, attr_on, attr_set, color_set, wattr_get, wattr_off, wattr_on, wattr_set, wcolor_set — window attribute control functions a SYNOPSIS #include
attroff(3X) attroff(3X) (CURSES) NAME attroff, attron, attrset, wattroff, wattron, wattrset — restricted window attribute control functions SYNOPSIS #include int attroff(int attrs); int attron(int attrs); int attrset(int attrs); int wattroff(WINDOW *win, int attrs); int wattron(WINDOW *win, int attrs); int wattrset(WINDOW *win, int attrs); a DESCRIPTION These functions manipulate the window attributes of the current or specified window.
basename(3C) basename(3C) NAME basename( ), dirname( ) - extract components of a path name SYNOPSIS b #include char *basename(char *path); char *dirname(char *path); DESCRIPTION basename() takes the path name pointed to by path and returns a pointer to the final component of the path name, deleting any trailing ’/’ characters. If the string consists entirely of ’/’ characters, basename() returns a pointer to the string "/".
basename(3C) basename(3C) SEE ALSO basename(1), thread_safety(5). STANDARDS CONFORMANCE basename() : XPG4.2 dirname() : XPG4.
baudrate(3X) baudrate(3X) (CURSES) NAME baudrate - get terminal baud rate SYNOPSIS #include int baudrate(void); b DESCRIPTION The baudrate() function extracts the output speed of the terminal in bits per second. RETURN VALUE The baudrate() function returns the output speed of the terminal. ERRORS No errors are defined. SEE ALSO tcgetattr(3C) (in the X/Open System Interfaces and Headers, Issue 4, Version 2 specification), . CHANGE HISTORY First released in X/Open Curses, Issue 2.
beep(3X) beep(3X) (CURSES) NAME beep — audible signal SYNOPSIS #include int beep(void); DESCRIPTION The beep() function alerts the user. It sounds the audible alarm on the terminal, or if that is not possible, it flashes the screen (visible bell). If neither signal is possible, nothing happens. RETURN VALUE The beep() function always returns OK. ERRORS No errors are defined. APPLICATION USAGE Nearly all terminals have an audible alarm, but only some can flash the screen.
bgets(3G) bgets(3G) NAME bgets() - read stream up to next delimiter SYNOPSIS b #include char *bgets (char *buffer , size_t *count , FILE *stream , const char *breakstring ); DESCRIPTION bgets reads characters from stream into buffer until either count is exhausted or one of the characters in breakstring is encountered in the stream. The read data is terminated with a null byte (’ \0 ’) and a pointer to the trailing null is returned.
bigcrypt(3C) bigcrypt(3C) NAME bigcrypt - generate hashing encryption on large strings SYNOPSIS #include #include char *bigcrypt(char *key, char *salt); b DESCRIPTION bigcrypt() acts like crypt(3C), but handles much larger strings. bigcrypt() takes the segments of cleartext and encrypts them individually, at first using the salt passed in, and then using the first two characters of the previous encrypted segment as the salt for the next segment.
bindresvport(3N) bindresvport(3N) NAME bindresvport() - bind socket to privileged IP port SYNOPSIS b #include #include int bindresvport(int sd, struct sockaddr_in *sin); DESCRIPTION The bindresvport() function binds a socket descriptor to a privileged IP port; that is, a port number in the range 0 to 1023. sd is a socket descriptor that was previously defined by a successful call to socket() (see socket(2)).
bkgd(3X) bkgd(3X) (ENHANCED CURSES) NAME bkgd, bkgdset, getbkgd, wbkgd, wbkgdset — set or get background character and rendition using a singlebyte character SYNOPSIS #include int bkgd(chtype ch); void bkgdset(chtype ch); chtype getbkgd(WINDOW *win); int wbkgd(WINDOW *win, chtype ch); void wbkgdset(WINDOW *win, chtype ch); b DESCRIPTION The bkgdset() and wbkgdset() functions set the background property of the current or specified window based on the information in ch.
bkgrnd(3X) bkgrnd(3X) (ENHANCED CURSES) NAME bkgrnd, bkgrndset, getbkgrnd, wbkgrnd, wbkgrndset, wgetbkgrnd — set or get background character and rendition using a complex character SYNOPSIS b #include
blmode(3C) blmode(3C) (TO BE OBSOLETED) NAME blopen( ), blclose( ), blread( ), blget( ), blset( ) - terminal block-mode library interface SYNOPSIS #include int blopen(int fildes); int blclose(int bfdes); int blread(int bfdes, char *buf, size_t nbyte); int blget(int bfdes, struct blmodeio *arg); int blset(int bfdes, const struct blmodeio *arg); b DESCRIPTION This terminal library interface allows support of block-mode transfers with HP terminals.
blmode(3C) blmode(3C) (TO BE OBSOLETED) transmission error occurs, all subsequent data is discarded until the transmission is complete. The read waits until a terminator character is seen, or until a time interval specified by the system has passed that is longer than necessary for the number of characters specified. b The data-block-terminator character is included in the data returned to the user, and is included in the byte count.
blmode(3C) blmode(3C) (TO BE OBSOLETED) unsigned char unsigned char unsigned char char cb_alertc; cb_termc; cb_replen; cb_reply[NBREPLY]; /* /* /* /* Alert character */ Terminating char */ cb_reply length */ optional reply */ }; The cb_flags field controls the basic block-mode protocol: CB_BMTRANS 0000001 Enable mandatory block-mode transmission. CB_OWNTERM 0000002 Enable user control of handshake. If CB_BMTRANS is set, all transmissions are processed as block-mode transmissions.
blmode(3C) blmode(3C) (TO BE OBSOLETED) blread() [EDEADLK] [EFAULT] A resource deadlock would occur as a result of this operation (see lockf(2)). buf points outside the allocated address space. The reliable detection of this error is implementation dependent. b [EINTR] A signal was caught during the read system call. [EIO] An I/O error occurred during block-mode data transmissions. [ENOTTY] No previous blopen has been issued for the specified file descriptor.
border(3X) border(3X) (ENHANCED CURSES) NAME border, wborder — draw borders from single-byte characters and renditions SYNOPSIS #include int border(chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br); int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br); DESCRIPTION The border() and wborder() functions draw a border around the edges of the current or specified window.
border_set(3X) border_set(3X) (ENHANCED CURSES) NAME border_set, wborder_set — draw borders from complex characters and renditions SYNOPSIS b #include
box(3X) box(3X) (CURSES) NAME box — draw borders from single-byte characters and renditions SYNOPSIS #include int box(WINDOW *win, chtype verch, chtype horch); DESCRIPTION The box() function draws a border around the edges of the specified window. This function does not advance the cursor position. This function does not perform special character processing. This function does not perform wrapping.
box_set(3X) box_set(3X) (ENHANCED CURSES) NAME box_set — draw borders from complex characters and renditions SYNOPSIS #include int box_set(WINDOW *win, const cchar_t *verch, const cchar_t *horch); b DESCRIPTION The box_set() function draws a border around the edges of the specified window. This function does not advance the cursor position. This function does not perform special character processing. This function does not perform wrapping.
bsd_signal(3C) bsd_signal(3C) (TO BE OBSOLETED) NAME bsd_signal - simplified signal facilities SYNOPSIS #include void (*bsd_signal(int sig, void (*func)(int)))(int); DESCRIPTION The bsd_signal() function provides a partially compatible interface for programs written to historical system interfaces (see APPLICATION USAGE below). The function call bsd_signal(sig,func) has an effect as if implemented as: void (*bsd_signal(int sig, void (*func)(int)))(int) { struct sigaction act, oact; act.
bsdproc(3C) bsdproc(3C) NAME bsdproc: killpg(), getpgrp(), setpgrp(), signal(), sigvec() - 4.2 BSD-compatible process control facilities SYNOPSIS b #include
bsearch(3C) bsearch(3C) NAME bsearch( ) - binary search a sorted table SYNOPSIS #include void *bsearch( const void *key, const void *base, size_t nel, size_t size, int (*compar)(const void *, const void *) ); b DESCRIPTION bsearch() is a binary search routine generalized from Knuth (6.2.1) Algorithm B. It returns a pointer into a table indicating where a datum may be found. The table must be previously sorted in increasing order according to a provided comparison function.
bsearch(3C) bsearch(3C) node.string = str_space; while (scanf("%s", node.string) != EOF) { node_ptr = (struct node *)bsearch((void *)(&node), (void *)table, TABSIZE, sizeof(struct node), node_compare); if (node_ptr != NULL) { (void)printf("string = %20s, length = %d\n", node_ptr->string, node_ptr->length); } else { (void)printf("not found: %s\n", node.string); } } b } /* This routine compares two nodes based on an alphabetical ordering of the string field.
btowc(3C) btowc(3C) NAME btowc( ), wctob( ) - conversion between single-byte and wide-character SYNOPSIS #include #include wint_t btowc(int c); int wctob(wint_t c); b DESCRIPTION btowc() The btowc() function determines whether c constitutes a valid (one-byte) character in the initial shift state. wctob() The wctob() function determines whether c corresponds to a member of the extended character set whose character representation is a single byte when in the initial shift state.
bufsplit(3G) bufsplit(3G) NAME bufsplit() - split buffer into fields SYNOPSIS #include size_t bufsplit(char *buf, size_t n , char **a ); b DESCRIPTION bufsplit examines the buffer, buf, and assigns values to the pointer array, a, so that the pointers point to the first n fields in buf that are delimited by tabs or new-lines. To change the characters used to separate fields, call bufsplit with buf pointing to the string of characters, and n and a set to zero. For example, to use ’:’, ’.
byteorder(3N) byteorder(3N) NAME htonl( ), htons( ), ntohl( ), ntohs( ) - convert values between host and network byte order SYNOPSIS #include _XOPEN_SOURCE_EXTENDED only #include unsigned long htonl(unsigned long hostlong); unsigned short htons(unsigned short hostshort); unsigned long ntohl(unsigned long netlong); unsigned short ntohs(unsigned short netshort); b DESCRIPTION These routines convert 16- and 32-bit quantities between network byte order and host byte order.
can_change_color(3X) can_change_color(3X) (ENHANCED CURSES) NAME can_change_color(), color_content(), has_colors(), init_color(), init_pair(), start_color(), pair_content() - color manipulation functions SYNOPSIS c #include
can_change_color(3X) can_change_color(3X) (ENHANCED CURSES) User-Defined Colour Pairs Calling init_pair() defines or redefines colour-pair number pair to have foreground colour f and background colour b. Calling init_pair() changes any characters that were displayed in the colour pair’s old definition to the new definition and refreshes the screen. After defining the colour pair, the macro COLOR_PAIR (n) returns the value of colour pair n.
catgets(3C) catgets(3C) NAME catgets( ) - get a program message SYNOPSIS c #include char *catgets( nl_catd catd, int set_num, int msg_num, const char *def_str ); DESCRIPTION The catgets() function reads message msg_num in set set_num from the message catalog identified by catd , a catalog descriptor returned from a previous call to catopen() (see catopen(3C)). If the call fails, def_str points to a default message string returned by catgets() .
catopen(3C) catopen(3C) NAME catopen( ), catclose( ) - open and close a message catalog for reading SYNOPSIS #include nl_catd catopen(const char *name, int oflag); int catclose(nl_catd catd); DESCRIPTION The catopen() function opens a message catalog and returns a catalog descriptor. The name specifies the name of the message catalog being opened. A name containing a slash (/) specifies a path name for the message catalog. Otherwise, the environment variable NLSPATH is used (see environ(5)).
catopen(3C) c catopen(3C) [ENFILE] The system file table is full. [ENOENT] The named catalog does not exist or the path is null. [ENOTDIR] A component of the path prefix is not a directory. catgets() can be used to provide default messages when called following a failed catopen() (see catgets(3C)). catgets() returns its def_str parameter if it is passed an invalid catalog descriptor. catclose() fails if the following is true: [EBADF] catd is not a valid open message catalog descriptor.
cbreak(3X) cbreak(3X) (CURSES) NAME cbreak, nocbreak, noraw, raw — input mode control functions SYNOPSIS #include int cbreak(void); int nocbreak(void); int noraw(void); int raw(void); c DESCRIPTION The cbreak() function sets the input mode for the current terminal to cbreak mode and overrides a call to raw() . The nocbreak() function sets the input mode for the current terminal to Cooked Mode without changing the state of ISIG and IXON.
cbrt(3M) cbrt(3M) NAME cbrt( ), cbrtf( ) - cube root functions SYNOPSIS #include double cbrt(double x); float cbrtf(float x); c DESCRIPTION cbrt() returns the cube root of x. The ISO/ANSI C committee has approved the cbrt() function for inclusion in the C9X draft standard. cbrtf() is a float version of cbrt() ; it takes a float argument and returns a float result.
ceil(3M) ceil(3M) NAME ceil( ) - ceiling function SYNOPSIS #include double ceil(double x); DESCRIPTION ceil() returns the smallest integer (represented as a double-precision number) not less than x. To use this function, make sure your program includes , and link in the math library by specifying -lm on the compiler or linker command line. RETURN VALUE If x is ±INFINITY or ±zero, ceil() returns x. If x is NaN, ceil() returns NaN.
cfspeed(3C) cfspeed(3C) NAME cfgetospeed( ), cfsetospeed( ), cfgetispeed( ), cfsetispeed( ) - tty baud rate functions SYNOPSIS c #include speed_t cfgetospeed(const struct termios *termios_p); int cfsetospeed(struct termios *termios_p, speed_t speed); speed_t cfgetispeed(const struct termios *termios_p); int cfsetispeed(struct termios *termios_p, speed_t speed); DESCRIPTION These functions set and get the input and output speed codes in the termios structure referenced by termios_p .
chgat(3X) chgat(3X) (ENHANCED CURSES) NAME chgat, mvchgat, mvwchgat, wchgat — change renditions of characters in a window SYNOPSIS #include
chownacl(3C) chownacl(3C) NAME chownacl( ) - change owner and/or group represented in a file’s access control list (ACL) (HFS File Systems only) SYNOPSIS c #include void chownacl( int nentries, const struct acl_entry *acl, uid_t olduid, gid_t oldgid, uid_t newuid, gid_t newgid ); Remarks: To ensure continued conformance with emerging industry standards, features described in this manual entry are likely to change in a future release.
chownacl(3C) chownacl(3C) int nentries; struct acl_entry acl [NACLENTRIES]; struct stat statbuf; if (stat ("oldfile", & statbuf) < 0) error (...); if ((nentries = getacl ("oldfile", NACLENTRIES, acl)) < 0) error (...); c chownacl (nentries, acl, statbuf.st_uid, statbuf.st_gid, geteuid(), getegid()); if (setacl ("newfile", nentries, acl)) error (...); DEPENDENCIES chownacl() is only supported on HFS file system on standard HP-UX operating system. AUTHOR chownacl() was developed by HP.
clear(3X) clear(3X) (CURSES) NAME clear, erase, wclear, werase — clear a window SYNOPSIS c #include int clear(void); int erase(void); int wclear(WINDOW *win); int werase(WINDOW *win); DESCRIPTION The clear() , erase() , wclear() and werase() functions clear every position in the current or specified window.
clearenv(3C) clearenv(3C) NAME clearenv - clear the process environment SYNOPSIS #include int clearenv(void); DESCRIPTION clearenv() clears the process environment. No environment variables are defined immediately after a call to clearenv() . clearenv() modifies the value of the pointer environ. This means that copies of that pointer are invalid after a call to clearenv() .
clearok(3X) clearok(3X) (CURSES) NAME clearok, idlok, leaveok, scrollok, setscrreg, wsetscrreg — terminal output control functions SYNOPSIS c #include int clearok(WINDOW *win, bool bf); int idlok(WINDOW *win, bool bf); int leaveok(WINDOW *win, bool bf); int scrollok(WINDOW *win, bool bf); int setscrreg(int top, int bot); int wsetscrreg(WINDOW *win, int top, int bot); DESCRIPTION These functions set options that deal with output within Curses.
clearok(3X) clearok(3X) (CURSES) CHANGE HISTORY First released in X/Open Curses, Issue 2. X/Open Curses, Issue 4 The idlok() , leaveok() , scrollok() , setscrreq() and wsetscrreq() functions are merged with this entry. In previous issues, they appeared in entries of their own. The entry is rewritten for clarity. The DESCRIPTION of clearok() is updated to indicate that clearing of a screen applies if the flag is TRUE in either curscr or the specified window.
clock(3C) clock(3C) NAME clock( ) - report CPU time used SYNOPSIS #include clock_t clock(void); c DESCRIPTION clock() returns the amount of CPU time (in microseconds) used since the first call to clock() . The time reported is the sum of the user and system times of the calling process and its terminated child processes for which it has executed wait() , system() or pclose() (see wait(2) , system (3S), and popen(3S)).
clrtobot(3X) clrtobot(3X) (CURSES) NAME clrtobot, wclrtobot — clear from cursor to end of window SYNOPSIS #include int clrtobot(void); int wclrtobot(WINDOW *win); DESCRIPTION The clrtobot() and wclrtobot() functions erase all lines following the cursor in the current or specified window, and erase the current line from the cursor to the end of the line, inclusive. RETURN VALUE Upon successful completion, these functions return OK. Otherwise, they return ERR. ERRORS No errors are defined.
clrtoeol(3X) clrtoeol(3X) (CURSES) NAME clrtoeol, wclrtoeol — clear from cursor to end of line SYNOPSIS #include int clrtoeol(void); int wclrtoeol(WINDOW *win); c DESCRIPTION The clrtoeol() and wclrtoeol() functions erase the current line from the cursor to the end of the line, inclusive, in the current or specified window. RETURN VALUE Upon successful completion, these functions return OK. Otherwise, they return ERR. ERRORS No errors are defined. SEE ALSO doupdate(3X), .
COLS(3X) COLS(3X) (ENHANCED CURSES) NAME COLS — number of columns on terminal screen SYNOPSIS #include extern int COLS; DESCRIPTION The external variable COLS indicates the number of columns on the terminal screen. c SEE ALSO initscr(3X), . CHANGE HISTORY First released in X/Open Curses, Issue 4.
confstr(3C) confstr(3C) NAME confstr( ) - get string-valued configuration values SYNOPSIS #include size_t confstr(int name, char *buf, size_t len); DESCRIPTION c confstr() provides a method for applications to get configuration-defined string values. Its use and purpose are similar to sysconf() (see sysconf(2)), except that it is used where string values rather than numeric values are returned. The name parameter can take on the following name values, which are defined in .
confstr(3C) confstr(3C) _CS_XBS5_ILP32_OFFBIG_CFLAGS The set of initial options to be given to the cc(1) and c89(1) utilities to build an application using a programming model with 32-bit int, long, and pointer types, and an off_t type using at least 64-bits. _CS_XBS5_ILP32_OFFBIG_LDFLAGS The set of final options to be given to the cc(1) and c89(1) utilities to build an application using a programming model with 32-bit int, long, and pointer types, and an off_t type using at least 64-bits.
confstr(3C) confstr(3C) RETURN VALUE If name is invalid, confstr() returns zero and sets errno to [EINVAL]. If name does not have a configuration-defined value, confstr() returns 0 (zero) and leaves errno unchanged. If name has a configuration-defined value, confstr() returns the size of buffer that would be needed to hold the entire configuration-defined value. If this return value is less than len, the string returned in buf has been truncated.
conv(3C) conv(3C) NAME toupper( ), tolower( ), _toupper( ), _tolower( ), toascii( ) - translate characters SYNOPSIS #include int toupper(int c); int tolower(int c); int _toupper(int c); int _tolower(int c); int toascii(int c); c DESCRIPTION toupper() and tolower() have as domain the range of getc(3S): the integers from −1 through 255. If the argument of toupper() represents a lower-case letter, the result is the corresponding upper-case letter.
conv(3C) conv(3C) ... } EXTERNAL INFLUENCES Locale The LC_CTYPE category determines the translations to be done. International Code Set Support Single-byte character code sets are supported. c AUTHOR conv() was developed by IBM, OSF, and HP. SEE ALSO ctype(3C), getc(3S), setlocale(3C), lang(5), thread_safety(5).
copylist(3G) copylist(3G) NAME copylist() - copy a file into memory SYNOPSIS #include char *copylist(const char *filenm , off_t *szptr ); DESCRIPTION copylist copies a list of items from a file into freshly allocated memory, replacing new-lines with null characters. It expects two arguments: a pointer filenm to the name of the file to be copied, and a pointer szptr to a variable where the size of the file will be stored. Upon success, copylist returns a pointer to the memory allocated.
copysign(3M) copysign(3M) NAME copysign( ), copysignf( ) - copysign functions SYNOPSIS #include double copysign(double x, double y); float copysignf(float x, float y); c DESCRIPTION The copysign() function returns x with its sign changed to the sign of y. The copysign() function is recommended by the IEEE-754 standard for floating-point arithmetic. The ISO/ANSI C committee has approved the copysign() function for inclusion in the C9X draft standard.
copywin(3X) copywin(3X) (CURSES) NAME copywin — copy a region of a window SYNOPSIS #include int copywin(const WINDOW *srcwin, WINDOW *dstwin, int sminrow, int smincol, int dminrow, int dmincol, int dmaxrow, int dmaxcol, int overlay); DESCRIPTION The copywin() function provides a finer granularity of control over the overlay() and overwrite() functions.
cos(3M) cos(3M) NAME cos( ), cosf( ) - cosine functions SYNOPSIS #include double cos(double x); float cosf(float x); c DESCRIPTION cos() returns the cosine of x (x specified in radians). cos() may lose accuracy when x is far from zero. cosf() is a float version of cos() ; it takes a float argument and returns a float result. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options.
cosd(3M) cosd(3M) NAME cosd( ), cosdf( ) - degree-valued cosine functions SYNOPSIS #include double cosd(double x); float cosdf(float x); DESCRIPTION The cosd() function is a degree-valued version of cos() . It returns the cosine of x (x specified in degrees). The cosd() function may lose accuracy when x is far from zero. The cosdf() function is a float version of cosd() ; it takes a float argument and returns a float result.
cosh(3M) cosh(3M) NAME cosh( ), coshf( ) - hyperbolic cosine functions SYNOPSIS #include double cosh(double x); float coshf(float x); c DESCRIPTION The cosh() function returns the hyperbolic cosine of its argument. The coshf() function is a float version of cosh() ; it takes a float argument and returns a float result. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options.
cpacl(3C) cpacl(3C) NAME cpacl( ), fcpacl( ) - copy the access control list (ACL) and mode bits from one file to another (HFS and JFS File Systems only) SYNOPSIS #include
cpacl(3C) cpacl(3C) −1 Unable to perform acl() or getacl() (fgetacl() ) on a local fromfile (fromfd). −2 Unable to perform chmod() (fchmod() ) on tofile (tofd) to set its file miscellaneous mode bits. cpacl() (fcpacl() ) attempts this regardless of whether a file is local or remote, as long as fromfile (fromfd) is local. c −3 Unable to perform acl() or setacl() (fsetacl() ) on a local tofile (tofd).
cr_close(3) cr_close(3) NAME cr_close - close a crash dump descriptor SYNOPSIS #include int cr_close(CRASH *crash_cb); DESCRIPTION The cr_close() function closes the crash dump descriptor structure pointed to by crash_cb. The crash_cb structure is a crash dump descriptor filled in by a cr_open(3) call. All associated resources (memory and files) are released. RETURN VALUE Returns zero for success. Other possible return values are described in libcrash(5).
cr_info(3) cr_info(3) NAME cr_info - retrieve crash dump information SYNOPSIS #include cr_info_t *cr_info(CRASH *crash_cb); c DESCRIPTION The cr_info() function returns a pointer to a cr_info_t structure with information about an open crash dump. cr_info_t The cr_info_t structure contains the following fields. Note that there is no necessary correlation between the placement in this list and the order in the structure, and the structure may contain other, reserved fields.
cr_info(3) cr_info(3) #include CRASH *crshdes; cr_info_t *cri; cri = cr_info(crshdes); AUTHOR cr_info() was developed by HP. c SEE ALSO cr_open(3), libcrash(5).
cr_isaddr(3) cr_isaddr(3) NAME cr_isaddr - validate whether physical page number was dumped SYNOPSIS #include int cr_isaddr(CRASH *crash_cb, uint64_t pagenum, int *avail); c DESCRIPTION The cr_isaddr() checks to see if the specified page number, pagenum, is present in the open crash dump represented by crash_cb. It sets the Boolean to which avail points to indicate the presence (1) or absence (0) of the page. RETURN VALUE Returns zero for success.
cr_open(3) cr_open(3) NAME cr_open() - open crash dump for reading SYNOPSIS #include int cr_open(const char *path, CRASH **crash_cb, int flags); DESCRIPTION The cr_open() library call opens a crash dump and passes back a crash dump descriptor. The path argument points to a path name naming a crash dump directory or file, and must not exceed PATH_MAX bytes in length.
cr_perror(3) cr_perror(3) NAME cr_perror - print a libcrash error or warning message SYNOPSIS #include void cr_perror(CRASH *crash_cb, int error); DESCRIPTION c cr_perror() prints to standard error an error or warning message corresponding to error, which should be the return value from an immediately previous call to one of the libcrash calls. The message describes the problem that occurred, explains its implications when appropriate, and gives corrective action where appropriate.
cr_read(3) cr_read(3) NAME cr_read - read from crash dump SYNOPSIS #include int cr_read(CRASH *crash_cb, void *buf, uint64_t mem_page, int *num_pages); DESCRIPTION The cr_read() function attempts to read the memory area defined by mem_page and num_pages into the buffer pointed to by buf from the crash dump opened using crash_cb. The cr_read() starts at the position in the crash dump associated with the physical memory offset given by mem_page.
cr_set_node(3) cr_set_node(3) NAME cr_set_node - set node number SYNOPSIS #include int cr_set_node(CRASH *crash_cb, int node_num, int *old_node_num); c DESCRIPTION The cr_set_node() function expects the physical node number passed in node_num . The node number will be used by cr_read() and cr_isaddr() to access the node private memory contained on a particular node. This function is only valid for ccnumadir (version 4) dumps.
cr_uncompress(3) cr_uncompress(3) NAME cr_uncompress() - uncompress a file in a crash dump SYNOPSIS #include int cr_uncompress(CRASH *crash_cb, const char *pathname, uint64_t size, uint64_t checksum); DESCRIPTION cr_uncompress() ensures that a file, part of a crash dump described by crash_cb, is uncompressed and matches its expected size and checksum (as computed by cksum(1)).
cr_verify(3) cr_verify(3) NAME cr_verify - verify integrity of crash dump SYNOPSIS #include int cr_verify(CRASH *crash_cb, int flags); DESCRIPTION c cr_verify() uncompresses and verifies the sizes and checksums of every file in the crash dump identified by crash_cb. flags is a bitmask of zero or more of the following flag values: CR_NOCHECKSUM cr_verify() will not attempt to verify checksums of files in the crash dump if this flag is set. Only sizes will be verified.
crt0.o(3) crt0.o(3) NAME crt0.o, gcrt0.o, mcrt0.o - execution startup routines; PA-RISC 64-bit ELF uses crt0.o only DESCRIPTION PA-RISC 32-bit SOM The C, Pascal, and FORTRAN compilers link in the object files crt0.o , gcrt0.o , or mcrt0.o to provide startup capabilities and environments for program execution. All are identical except that gcrt0.o and mcrt0.o provide additional functionality for gprof(1) and prof(1) profiling support respectively.
crt0.o(3) crt0.o(3) _ _argc A variable of type long containing the number of arguments. _ _argv An array of character pointers to the arguments themselves. _environ, __envp An array of character pointers to the environment in which the program will run. This array is terminated by a null pointer. _CPU_KEYBITS_1 A variable of type int containing CPU specific information. This variable is initialized with data from the kernel.
crypt(3C) crypt(3C) NAME crypt - generate hashing encryption SYNOPSIS #include #include char *crypt(const char *key, const char *salt); Obsolescent Interfaces char void void void void c *crypt_r(const char *key, const char *salt, CRYPTD *cd); setkey_r(const char *key, CRYPTD *cd); encrypt_r(char block[64], int edflag, CRYPTD *cd); setkey(const char *key); encrypt(char block[64], int edflag); DESCRIPTION crypt( ): crypt() is the password encryption function.
ctermid(3S) ctermid(3S) NAME ctermid( ) - generate file name for terminal SYNOPSIS #include char *ctermid(char *s); DESCRIPTION c ctermid() generates a string that, when used as a pathname, refers to the the controlling terminal for the current process. If s is a NULL pointer, the string is stored in an internal static area, the contents of which are overwritten at the next call to ctermid() , and the address of which is returned.
ctime(3C) ctime(3C) NAME ctime( ), ctime_r( ), localtime( ), localtime_r( ), gmtime( ), gmtime_r( ), mktime( ), difftime( ), asctime( ), asctime_r( ), timezone( ), daylight( ), tzname( ), tzset( ) - convert date and time to string SYNOPSIS #include
ctime(3C) ctime(3C) The minimum date supported by gmtime() in both 32-bit and 64-bit HP-UX is Friday December 13 20:45:52 UTC 1901. The maximum dates supported by gmtime() are Tuesday January 19 03:14:07 UTC 2038 and Friday December 31 23:59:59 UTC 9999 in 32-bit HP-UX and 64-bit HP-UX, respectively. In 64-bit HP-UX, gmtime() returns NULL and sets errno to [ERANGE] if timer is less than the number of seconds that corresponds to the minimum date supported (i.e., INT_MIN , as defined in limits.
ctime(3C) ctime(3C) The file /etc/default/tz contains the timezone value used by tzset() when the environment variable TZ is not set. The format for the file is same as TZ format without the prefix TZ= . Please check environ(5) for TZ format. The order of TZ setting is as follows. 1) if the environment variable TZ is present, it takes precedence. 2) if TZ is not present, then the value contained in /etc/default/tz is used for the default.
ctime(3C) ctime(3C) WARNINGS Users of asctime_r() , ctime_r() , gmtime_r() , and localtime_r() should also note that these functions now conform to POSIX.1c. The old prototypes of these functions are supported for compatibility with existing DCE applications only. c The range of tm_sec([0,61]) extends to 61 to allow for the occasional one or two leap seconds. However, the ‘‘seconds since the Epoch’’ value returned by time(2) and passed as the timer argument does not include accumulated leap seconds.
ctype(3C) ctype(3C) NAME isalpha( ), isupper( ), islower( ), isdigit( ), isxdigit( ), isalnum( ), isspace( ), ispunct( ), isprint( ), isgraph( ), iscntrl( ), isascii( ) - classify characters SYNOPSIS #include
ctype(3C) ctype(3C) WARNINGS These functions are supplied both as library functions and as macros defined in the header. Normally, the macro versions are used. To obtain the library function, either use a #undef to remove the macro definition or, if compiling in ANSI-C mode, enclose the function name in parenthesis or take its address. The following example uses the library functions for isalpha() , isdigit() , and isspace() : #include #undef isalpha ...
cur_term(3X) cur_term(3X) (ENHANCED CURSES) NAME cur_term — current terminal information SYNOPSIS #include extern TERMINAL *cur_term; DESCRIPTION The external variable cur_term identifies the record in the terminfo database associated with the terminal currently in use. SEE ALSO del_curterm(3X), tigetflag(3X), . CHANGE HISTORY First released in X/Open Curses, Issue 4.
curs_set(3X) curs_set(3X) (ENHANCED CURSES) NAME curs_set — set the cursor mode SYNOPSIS #include int curs_set(int visibility ); c DESCRIPTION The curs_set() function sets the appearance of the cursor based on the value of visibility: Value of visibility 0 1 2 Appearance of Cursor Invisible Terminal-specific normal mode Terminal-specific high visibility mode The terminal does not necessarily support all the above values.
curscr(3X) curscr(3X) (ENHANCED CURSES) NAME curscr — current window SYNOPSIS #include extern WINDOW *curscr; DESCRIPTION The external variable curscr points to an internal data structure. It can be specified as an argument to certain functions, such as clearok() , where permitted in this specification. SEE ALSO clearok(3X), . CHANGE HISTORY First released in X/Open Curses, Issue 4.
curses_intro(3X) curses_intro(3X) (X/Open CURSES) NAME curses( ) - Terminal and printer handling and optimization package c DESCRIPTION Use and Implementation of Interfaces These routines provide a method for updating screens with reasonable optimization in a terminal independent manner. Each of the following statements applies unless explicitly stated otherwise in the detailed descriptions that follow.
curses_intro(3X) curses_intro(3X) (X/Open CURSES) visible all library functions referenced in this specification and labelled ENHANCED CURSES. An application that uses any API specified as ENHANCED CURSES must define _XOPEN_SOURCE_EXTENDED = 1 in each source file or as part of its compilation environment. When _XOPEN_SOURCE_EXTENDED = 1 is defined in a source file, it must appear before any header is included.
curses_intro(3X) curses_intro(3X) (X/Open CURSES) No other identifiers are reserved. Applications must not declare or define identifiers with the same name as an identifier reserved in the same context. Since macro names are replaced whenever found, independent of scope and name space, macro names matching any of the reserved identifier names must not be defined if any associated header is included.
curses_intro(3X) curses_intro(3X) (X/Open CURSES) WINDOW An opaque window representation. Interface Overview Components A Curses initialisation function, usually initscr() , determines the terminal model in use, by reference to either an argument or an environment variable. If that model is defined in terminfo, then the same terminfo entry tells Curses exactly how to operate the terminal. In this case, a comprehensive API lets the application perform terminal operations.
curses_intro(3X) curses_intro(3X) (X/Open CURSES) Ancestors The term ancestor refers to a window’s parent, or its parent, or so on. Derived Windows Derived windows are subwindows whose position is defined by reference to the parent window rather than in absolute screen coordinates. Derived windows are otherwise no different from subwindows. c Pads A pad is a specialised case of subwindow that is not necessarily associated with a viewable part of a screen.
curses_intro(3X) curses_intro(3X) (X/Open CURSES) screen. If a given terminal does not support a rendition that an application program is trying to use, Curses may substitute a different rendition for it. Colours are always used in pairs (referred to as colour-pairs). A colour-pair consists of a foreground colour (for characters) and a background colour (for the field on which the characters are displayed).
curses_intro(3X) curses_intro(3X) (X/Open CURSES) Window Background Each window has a background property. The background property specifies: c • A spacing complex character (the background character) that will be used in a variety of situations where visible information is deleted from the screen. • A rendition to use in displaying the background character in those situations, and in other situations specified in Rendition of Characters Placed into a Window in curses_intro.
curses_intro(3X) curses_intro(3X) (X/Open CURSES) Insertion Insertion functions (such as insch() ) insert characters immediately before the character at the specified or implied cursor position. The insertion shifts all characters that were formerly at or beyond the cursor position on the cursor line toward the end of that line.
curses_intro(3X) curses_intro(3X) (X/Open CURSES) In functions that do not move the cursor based on the information placed in the window, these special characters would only be used within a string in order to affect the placement of subsequent characters; the cursor movement specified below does not persist in the visible cursor beyond the end of the operation.
curses_intro(3X) curses_intro(3X) (X/Open CURSES) The complete set of key codes for keypad keys that Curses can process is specified by the constants defined in whose names begin with ‘‘KEY_’’. Each terminal type described in the terminfo database may support some or all of these key codes. The terminfo database specifies the sequence of input characters from the terminal type that correspond to each key code (see Keypad in terminfo(4)).
curses_intro(3X) curses_intro(3X) (X/Open CURSES) Input Mode Cooked Mode c Effect This achieves normal line-at-a-time processing with all special characters handled outside the application. This achieves the same effect as canonicalmode input processing as specified in the X/Open System Interface Definitions, Issue 4, Version 2 specification . The state of the ISIG and IXON flags are not changed upon entering this mode by calling cbreak (), and are set upon entering this mode by calling noraw ().
curses_intro(3X) curses_intro(3X) (X/Open CURSES) The effect of No Delay Mode on function key processing is unspecified. Echo Processing Echo mode determines whether Curses echoes typed characters to the screen. The effect of Echo mode is analogous to the effect of the ECHO flag in the local mode field of the termios structure associated with the terminal device connected to the window.
curses_intro(3X) curses_intro(3X) (X/Open CURSES) Function Families Provided Function Names c Description Add (Overwrite) [mv][w]addch(3X) add a character [mv][w]addch[n]str(3X) add a character string [mv][w]add[n]str(3X) add a string [mv][w]add[n]wstr(3X) add a wide character string [mv][w]add_wch(3X) add a wide character and rendition [mv][w]add_wch[n]str(3X) add an array of wide characters and renditions Change Renditions [mv][w]chgat(3X) change renditions of characters in a window Delete [mv][w]delc
curses_intro(3X) curses_intro(3X) (X/Open CURSES) Initialised Curses Environment Before executing an application that uses Curses, the terminal must be prepared as follows: • If the terminal has hardware tab stops, they should be set. • Any initialisation strings defined for the terminal must be output to the terminal. The resulting state of the terminal must be compatible with the model of the terminal that Curses has, as reflected in the terminal’s entry in the terminfo database (see terminfo(4)).
cuserid(3S) cuserid(3S) (TO BE OBSOLETED) NAME cuserid( ) - get character login name of the user SYNOPSIS #include char *cuserid(char *s); c Remarks: Because this function behaved differently in previous releases of HP-UX, and behaves differently on other systems, its use is not recommended. It is provided only for conformance to current industry standards, and is subject to withdrawal in future releases of HP-UX.
datalock(3C) datalock(3C) NAME datalock( ) - lock process into memory after allocating data and stack space SYNOPSIS #include int datalock(size_t datsiz, size_t stsiz); DESCRIPTION datalock() allocates at least datsiz bytes of data space and stsiz bytes of stack space, then locks the program in memory. The data space is allocated by malloc() (see malloc(3C)). After the program is locked, this space is released by free() (see malloc(3C)), making it available for use.
dbm(3C) dbm(3C) NAME dbm: dbmclose(), dbminit(), delete(), fetch(), firstkey(), nextkey(), store() - database subroutines, singledatabase version SYNOPSIS d #include int dbminit(const char *file); datum fetch(datum key); int store(datum key, datum content); int delete(datum key); datum firstkey(void); datum nextkey(datum key); void dbmclose(void); DESCRIPTION These functions maintain key/content pairs in a database.
dbm(3C) dbm(3C) delete() does not physically reclaim file space, although it does make it available for reuse. The order of keys presented by firstkey() and nextkey() depends on a hashing function, not on anything interesting. A store() or delete() during a pass through the keys by firstkey() and nextkey() may yield unexpected results. AUTHOR dbm() was developed by the University of California, Berkeley. SEE ALSO ndbm(3X).
def_prog_mode(3X) def_prog_mode(3X) (CURSES) NAME def_prog_mode, def_shell_mode, reset_prog_mode, reset_shell_mode — save or restore program or shell terminal modes SYNOPSIS d #include int def_prog_mode(void); int def_shell_mode(void); int reset_prog_mode(void); int reset_shell_mode(void); DESCRIPTION The def_prog_mode() function saves the current terminal modes as the ‘‘program’’ (in Curses) state for use by reset_prog_mode().
del_curterm(3X) del_curterm(3X) (ENHANCED CURSES) NAME del_curterm(), restartterm(), set_curterm(), setupterm() - interfaces to the terminfo database SYNOPSIS #include int del_curterm(TERMINAL *oterm); int restartterm(char *term, int fildes, int *errret); TERMINAL *set_curterm(TERMINAL *nterm); int setupterm(char *term, int fildes, int *errret); extern TERMINAL *cur_term; d DESCRIPTION These functions retrieve information from the terminfo database.
del_curterm(3X) del_curterm(3X) (ENHANCED CURSES) SEE ALSO baudrate(3X), erasechar(3X), has_ic(3X), longname(3X), tgetent(3X), tigetflag(3X), use_env(3X), terminfo(4) putc(3S), termattrs(3X), termname(3X), See section Selecting a Terminal, . CHANGE HISTORY First released in X/Open Curses, Issue 4.
delay_output(3X) delay_output(3X) (CURSES) NAME delay_output — delay output SYNOPSIS #include int delay_output(int ms); DESCRIPTION On terminals that support pad characters, delay_output() pauses the output for at least ms milliseconds. Otherwise, the length of the delay is unspecified. d RETURN VALUE Upon successful completion, delay_output() returns OK. Otherwise, it returns ERR. ERRORS No errors are defined.
delch(3X) delch(3X) (CURSES) NAME delch, mvdelch, mvwdelch, wdelch — delete a character from a window. SYNOPSIS d #include int delch(void); int mvdelch(int y, int x); int mvwdelch(WINDOW *win, int y, int x); int wdelch(WINDOW *win); DESCRIPTION These functions delete the character at the current or specified position in the current or specified window. This function does not change the cursor position. RETURN VALUE Upon successful completion, these functions return OK.
deleteln(3X) deleteln(3X) (CURSES) NAME deleteln, wdeleteln — delete lines in a window SYNOPSIS #include int deleteln(void); int wdeleteln(WINDOW *win); DESCRIPTION The deleteln() and wdeleteln() functions delete the line containing the cursor in the current or specified window and move all lines following the current line one line toward the cursor. The last line of the window is cleared. The cursor position does not change. RETURN VALUE Upon successful completion, these functions return OK.
delscreen(3X) delscreen(3X) (CURSES) NAME delscreen — free storage associated with a screen SYNOPSIS #include void delscreen(SCREEN *sp); DESCRIPTION The delscreen() function frees storage associated with the SCREEN pointed to by sp. d RETURN VALUE The delscreen() function does not return a value. ERRORS No errors are defined. SEE ALSO endwin(3X), initscr(3X), . CHANGE HISTORY First released in X/Open Curses, Issue 4.
delwin(3X) delwin(3X) (CURSES) NAME delwin — delete a window SYNOPSIS #include int delwin(WINDOW *win); DESCRIPTION The delwin() function deletes win, freeing all memory associated with it. The application must delete subwindows before deleting the main window. d RETURN VALUE Upon successful completion, delwin() returns OK. Otherwise, it returns ERR. ERRORS No errors are defined. SEE ALSO derwin(3X), dupwin(3X), . CHANGE HISTORY First released in X/Open Curses, Issue 2.
derwin(3X) derwin(3X) (CURSES) NAME derwin() - relative window creation function SYNOPSIS #include WINDOW *derwin(WINDOW int begin_x); d *orig, int nlines, int ncols, int begin_y, DESCRIPTION The derwin() function creates a new window with nlines lines and ncols columns, positioned so that the origin is at (begin_y, begin_x) relative to the origin of the window orig. If any part of the new window is outside orig, the function fails and the window is not created.
devnm(3) devnm(3) NAME devnm - map device ID to file path SYNOPSIS #include int devnm ( mode_t devtype, dev_t devid, char *path, size_t pathlen, int cache ); d DESCRIPTION Given a device type, a device ID, and a string in which to return the result, devnm() maps the type and ID to a block or character special file (device file) name by searching /dev . It returns in path the full path name of the first special file encountered with a matching device type and ID.
devnm(3) devnm(3) SEE ALSO devnm(1M), stat(2), ftw(3C), malloc(3C), ttyname(3C), stat(5), thread_safety(5).
dial(3C) dial(3C) NAME dial(), undial() - establish an outgoing terminal line connection SYNOPSIS #include int dial(CALL call); void undial(int fd); DESCRIPTION The dial() function returns a file descriptor for a terminal line open for read/write. The argument to dial() is a CALL structure (defined in the header file). When finished with the terminal line, the calling program must invoke undial() to release the semaphore that has been set during the allocation of the terminal device.
dial(3C) dial(3C) f d flash off hook for 1 second modem Specifies modem control for direct lines. Set to non-zero if modem control is required. attr Pointer to a termio structure, as defined in the header file. A NULL value for this pointer element can be passed to the dial() function, but if such a structure is included, the elements specified in it are set for the outgoing terminal line before the connection is established.
directory(3C) directory(3C) NAME directory: closedir(), opendir(), readdir(), readdir_r(), rewinddir(), seekdir(), telldir() - directory operations SYNOPSIS #include
directory(3C) directory(3C) stream, result has the value NULL . An error number is returned upon error. telldir() upon successful completion, returns a long value indicating the current position in the directory. Otherwise it returns -1 and sets errno to indicate the error. seekdir() does not return any value, but if an error is encountered, errno is set to indicate the error. closedir() upon successful completion, returns a value of 0.
directory(3C) directory(3C) (void) closedir(dirp); return FOUND; } } (void) closedir(dirp); return NOT_FOUND; WARNINGS readdir() and getdirentries() (see getdirentries(2)) are the only ways to access remote NFS directories. Attempting to read a remote directory via NFS by using read() returns -1 and sets errno to [EISDIR] (see read(2)).
div(3C) div(3C) NAME div( ), ldiv( ) - integer division and remainder SYNOPSIS #include div_t div(int numer, int denom); ldiv_t ldiv(long int numer, long int denom); DESCRIPTION d div() Computes the quotient and remainder of the division of the numerator numer by the denominator denom.
dladdr(3C) dladdr(3C) NAME dladdr() - get the symbolic information for an address SYNOPSIS cc [flag]... cfile ... -ldl [library]... #include int dladdr(void *address, Dl_info *dlip); Multithread Usage This routine is thread-safe. d DESCRIPTION dladdr() is one of a family of routines that give the user direct access to the dynamic linking facilities (using the -ldl option on the compiler or ld command line).
dladdr(3C) dladdr(3C) RETURN VALUE If the specified address does not fall within one of the load modules, 0 is returned; the contents of the Dl_info structure are not modified. Otherwise, a non-zero value is returned and the fields of the Dl_info structure are set.
dlclose(3C) dlclose(3C) NAME dlclose() - close a shared library SYNOPSIS cc [flag ... ] file ... -ldl [library]... #include int dlclose(void *handle); Multithread Usage This routine is thread-safe. NOTE: The dynamic loader serializes the loading and unloading of shared libraries in multithreaded applications using a recursive pthread mutex lock. See the HP-UX Linker and Libraries Online User Guide for more information.
dlclose(3C) dlclose(3C) SEE ALSO dlerrno(3C), dlerror(3C), dlopen(3C), dlsym(3C).
dlerrno(3C) dlerrno(3C) (ELF Applications Only) NAME dlerrno() - get error code for dynamic linking calls SYNOPSIS cc [flag... ] file... -ldl [library]... #include int *dlerrno(void); DESCRIPTION dlerrno() is one of a family of routines that give the user direct access to the dynamic linking facilities (using the -ldl option on the compiler or ld command line). dlerrno() returns a numeric error code that corresponds to the last error that occurred during dynamic linking processing.
dlerrno(3C) dlerrno(3C) (ELF Applications Only) [RTLD_ERR_CODE_UNSAT] Unsatisfied code symbol in load module. [RTLD_ERR_DATA_UNSAT] Unsatisfied data symbol in load module. [RTLD_ERR_BAD_SYMNAME] Invalid symbol name for shl_findsym(). [RTLD_ERR_BAD_SYMTYPE] Invalid symbol type. [RTLD_ERR_SHL_LOAD_BAD_FLAGS] Invalid flags for shl_load() . [RTLD_ERR_BAD_TYPE_DEFINESYM] Invalid symbol type for shl_definesym(). d [RTLD_ERR_UNKNOWN_HANDLE] Unknown handle.
dlerrno(3C) dlerrno(3C) (ELF Applications Only) [RTLD_ERR_DLDD_COMM_FAILURE] Unable to get shared fixed address from dldd . [RTLD_ERR_BAD_DLL_SEGMENT_COUNT] Cannot use fixed address due to multiple data segments. [RTLD_ERR_SHL_LOAD_NULL_FILE_NAME] Invalid NULL library name. [RTLD_ERR_BAD_SHL_GETSYMBOLS_FLAG] Bad flags or type for shl_getsymbols(). [RTLD_ERR_INV_DLMODADD_ARGUMENT] Invalid argument for dlmodadd() .
dlerrno(3C) dlerrno(3C) (ELF Applications Only) [RTLD_ERR_ARCH_EXT_NOT_SUPPORTED] Cannot load library because required extensions not present in the hardware. MULTITHREAD USAGE This routine is thread-safe. SEE ALSO dlclose(3C), dlerror(3C), dlopen(3C), dlsym(3C).
dlerror(3C) dlerror(3C) NAME dlerror - get diagnostic information SYNOPSIS cc [flag]... file... -ldl [library]... #include char *dlerror(void); Multithread Usage This routine is thread-safe. DESCRIPTION dlopen is one of a family of routines that give the user direct access to the dynamic linking facilities (using the -ldl option on the compiler or ld command line).
dlget(3C) dlget(3C) (ELF Applications Only) NAME dlget() - retrieve information about a loaded module (program or shared library) SYNOPSIS cc [flag]... file... -ldl [library]... #include void *dlget(int index, struct load_module_desc *desc, size_t desc_size); d Multithread Usage This routine is thread-safe. DESCRIPTION dlget() is one of a family of routines that give the user direct access to the dynamic linking facilities. dlget() returns information about a loaded module for a process.
dlget(3C) dlget(3C) (ELF Applications Only) [RTLD_ERR_SETCANCELSTATE_FAILED] __thread_setcancelstate failed on entry to or exit from dlget() . AUTHOR dlget() was developed by HP. SEE ALSO System Tools exec(2) ld(1) Miscellaneous a.out(4) dlclose(3C) dlerror(3C) dlerrno(3C) dlgetname(3C) dlmodinfo(3C) dlopen(3C) dlsym(3C) System loader. Invokes the link editor. d Assembler, compiler, and linker output. Unloads a shared library previously loaded by dlopen() .
dlgetfileinfo(3C) dlgetfileinfo(3C) NAME dlgetfileinfo() - return file information for a library prior to loading it SYNOPSIS cc [flag... ] file... #include -ldl [library]... uint64_t dlgetfileinfo(const char *file, size_t info_size, struct dlfileinfo *info); d Multithread Usage This routine is thread-safe. DESCRIPTION dlgetfileinfo() is one of a family of routines that give the user direct access to the dynamic linking facilities (using the -ldl option on the compiler or ld command line).
dlgetfileinfo(3C) dlgetfileinfo(3C) if (status == 0) { /* Make a copy of the library pathname returned by * dlgetfileinfo(). */ pathname = strdup(info.filename); /* Allocate data segment */ opts.data_addr = allocate_data(info.data_size); /* Not preallocating text segment */ opts.text_addr = 0; d /* Set dlopene() flags to indicate the data segment * has been preallocated. */ opts.
dlgetfileinfo(3C) [RTLD_ERR_BAD_ABI2] dlgetfileinfo(3C) ABI mismatch because a 32-bit program found a 64-bit shared library. [RTLD_ERR_BAD_DLL_MAGIC_NUM] The library is invalid due to a bad magic number. [RTLD_ERR_BAD_DLL_BAD_MACHINE] The library is invalid due to a bad machine type. [RTLD_ERR_BAD_DLL_BAD_OBJFILE] The library is invalid due to a bad object file type. [RTLD_ERR_SETCANCELSTATE_FAILED] __thread_setcancelstate failed on entry to or exit from dlgetfileinfo().
dlgetmodinfo(3C) dlgetmodinfo(3C) NAME dlgetmodinfo() - retrieve information about a loaded module (program or shared library) SYNOPSIS cc [flag... ] file ... -ldl [library] ... #include uint64_t dlgetmodinfo(int index, struct load_module_desc *desc, size_t desc_size, void *(*read_tgt_mem)(void* buffer, uint64_t ptr, size_t bufsiz, int ident), int ident_parm, uint64_t load_map_parm); d Multithread Usage Thread safe in libdl.sl but not in libxpdl.sl .
dlgetmodinfo(3C) dlgetmodinfo(3C) AUTHOR dlgetmodinfo() was developed by HP. SEE ALSO System Tools exec(2) ld(1) d System loader. Invokes the link editor. Miscellaneous a.out(4) dlclose(3C) dlerror(3C) dlerrno(3C) dlget(3C) dlgetname(3C) dlopen(3C) dlsym(3C) dlmodinfo(3C) Assembler, compiler, and linker output. Unloads a shared library previously loaded by dlopen() . Returns the last error message recorded by dld . Returns an error code for the last error recorded by dld .
dlgetname(3C) dlgetname(3C) (ELF Application Only) NAME dlgetname() - retrieve the name of a load module given a load module descriptor SYNOPSIS cc [flag]... file... -ldl [library]... #include char *dlgetname(struct load_module_desc *desc, size_t desc_size, void *(*read_tgt_mem)(void* buffer, unsigned long long ptr, size_t bufsiz, int ident), int ident_parm, unsigned long long load_map_parm); d Multithread Usage This routine is thread-safe.
dlgetname(3C) dlgetname(3C) (ELF Application Only) dlget(3C) dlmodinfo(3C) dlopen(3C) dlsym(3C) Returns information on a loaded module. Returns information about a loaded module. Loads a shared library. Gets the address of a symbol in a shared library.
dlmodadd(3C) dlmodadd(3C) NAME dlmodadd() - register information about dynamically generated functions SYNOPSIS cc [flag]... file... -ldl [library]... #include void* dlmodadd(void* associate_handle, void *func_start, size_t func_size, void *linkage_ptr, void *unwind_info); d Multithread Usage This routine is thread-safe. DESCRIPTION dlmodadd() registers information about a dynamically generated function, which can be retrived through dlmodinfo() .
dlmodadd(3C) dlmodadd(3C) [RTLD_ERR_SIGINHIBIT_FAILED] siginhibit failed on entry to dlmodadd() . [RTLD_ERR_SIGENABLE_FAILED] sigenable failed on exit from dlmodadd() . [RTLD_ERR_INV_DLMODADD_ARGUMENT] Invalid dlmodadd() argument . [RTLD_ERR_SETCANCELSTATE_FAILED] __thread_setcancelstate failed on entry to or exit from dlmodadd() . d AUTHOR dlmodadd() was developed by HP. SEE ALSO ld(1), dlclose(3C), dlerrno(3C), dlerror(3C), dlget(3C), dlmodremove(3C), dlopen(3C), dlsym(3C), a.out(4).
dlmodinfo(3C) dlmodinfo(3C) (ELF Applications Only) NAME dlmodinfo() - retrieve information about a loaded module (program or shared library) SYNOPSIS cc [flag]... file... -ldl [library]... #include uint64_t dlmodinfo(uint64_t ip_value, struct load_module_desc *desc, size_t desc_size, void *(*read_tgt_mem)(void* buffer, uint64_t ptr, size_t bufsiz, int ident), int ident_parm, uint64_t load_map_parm); d Multithread Usage Thread safe in libdl.sl but not in libxpdl.sl .
dlmodinfo(3C) dlmodinfo(3C) (ELF Applications Only) RETURN VALUE If successful, dlmodinfo() returns a handle for the shared library as defined by the return value from dlopen() . NULL is returned otherwise. The return values are type-converted to uint64_t . ERRORS If dlmodinfo() fails, a subsequent call to dlerrno() returns one of the following values: [RTLD_ERR_NO_MEMORY] Out of memory. [RTLD_ERR_CANT_APPLY_RELOC] Cannot apply relocation in library.
dlmodremove(3C) dlmodremove(3C) NAME dlmodremove - remove information registered using dlmodadd SYNOPSIS cc [flag]... file... -ldl [library]... #include int dlmodremove(void* handle); Multithread Usage This routine is thread-safe. d DESCRIPTION dlmodremove() removes the registered information of individual dynamically generated functions. handle must be a handle returned by dlmodadd() .
dlopen(3C) dlopen(3C) NAME dlopen(), dlopene() - open a shared library, open a shared library with explicit load address (64-bit only) SYNOPSIS cc [flag]... cfile... -ldl [library]... #include void *dlopen(const char *file, int mode); void *dlopene(const char *file, int mode, struct dlopen_opts *opts); d Multithread Usage These routines are thread-safe. NOTE: The dynamic loader dld.
dlopen(3C) dlopen(3C) shl_t shl; void (*fptr)(void); char *strpath[267]; sprintf(strpath, %s%s", SHLIB_PATH= ,argv[1]); putenv(strpath); dld_getenv(); shl = shl_load( a.sl", BIND_IMMEDIATE | DYNAMIC_PATH, 0); if(!shl) { printf("shl_load failed\n"); exit(-1); } } If the value of file is 0, dlopen() provides a handle on a "global symbol object". This object provides access to the symbols from an ordered set of objects consisting of the original a.
dlopen(3C) dlopen(3C) RTLD_GROUP Under this mode, the specified object, and its dependencies, behave as if they were built with -B group (see ld(1)). Only symbols from objects loaded in the same dlopen() invocation are made available for relocation. This ensures that all relocations are satisfied using symbol definitions from the same dlopen() invocation. RTLD_WORLD Under this mode, only symbols from global objects and from the object itself are available for relocation processing.
dlopen(3C) dlopen(3C) flags contains the load option, defined by logical OR of the following values: RTLD_EXT_TEXT_ADDR Indicates that an explicit base address for the shared library text segment is provided. RTLD_EXT_DATA_ADDR Indicates that an explicit base address for the shared library private data segment is provided. RTLD_EXT_DATA_NO_ZERO_FILL If this flag is set, dlopene() does not zero fill the bss part of the data segment. This may improve load time for libraries with large bss sections.
dlopen(3C) dlopen(3C) [RTLD_ERR_SIGINHIBIT_FAILED] siginhibit failed on entry to dld API. [RTLD_ERR_SIGENABLE_FAILED] sigenable failed on exit from dld API. [RTLD_ERR_BAD_ABI1] 64-bit program found a 32-bit shared library. [RTLD_ERR_BAD_ABI2] 32-bit program found a 64-bit shared library. [RTLD_ERR_BAD_DLL_MAGIC_NUM] Invalid library: bad magic number. d [RTLD_ERR_BAD_DLL_ALIGNMENT] Invalid library: bad alignment. [RTLD_ERR_BAD_DLL_NO_SYMTAB] Invalid library: symbol table missing.
dlopen(3C) dlopen(3C) void *handle; struct dlopen_opts opts; int status; memset(&info, 0, sizeof(info)); memset(&opts, 0, sizeof(opts)); /* Get file info */ status = dlgetfileinfo("libfoo.so", sizeof(info), &info); opts.flags = RTLD_EXT_DATA_ADDR; /* allocate memory for the data segment */ opts.data_addr = (char*) mmap(0, info.data_size, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0); d /* call dlopene */ handle = dlopene("libfoo.
dlsetlibpath(3C) dlsetlibpath(3C) NAME dlsetlibpath() - set the dynamic search path used to locate shared libraries SYNOPSIS cc [flag]... file... -ldl [library]... #include int dlsetlibpath(const char *libpath, int flags) d Multithread Usage This routine is thread-safe. Calls to dlsetlibpath() affect all subsequent calls to dlopen() , dlopene() , and dlgetfileinfo(), on any thread.
dlsetlibpath(3C) dlsetlibpath(3C) EXAMPLES The following example illustrates the use of dlsetlibpath() to set the dynamic search path and disable other search paths. For simplicity, error checking has been omitted. #include int main() { void *handle; int status; int flags; /* Set dynamic search path and disable the embedded * path and the standard library directory.
dlsym(3C) dlsym(3C) NAME dlsym() - get the address of a symbol in shared library SYNOPSIS cc [flag]... file... -ldl [library]... #include void *dlsym(void *handle, const char *name); Multithread Usage This routine is thread-safe. d DESCRIPTION dlsym() is one of a family of routines that give the user direct access to the dynamic linking facilities (using the -ldl option on the compiler or ld command line).
dlsym(3C) dlsym(3C) [RTLD_ERR_SETCANCELSTATE_FAILED] __thread_setcancelstate failed on entry to or exit from dlsym() . APPLICATION USAGE RTLD_NEXT can be used to navigate an intentionally created hierarchy of multiply defined symbols created through interposition.
doupdate(3X) doupdate(3X) (CURSES) NAME doupdate, refresh, wnoutrefresh, wrefresh — refresh windows and lines SYNOPSIS d #include int doupdate(void); int refresh(void); int wnoutrefresh(WINDOW *win); int wrefresh(WINDOW *win); DESCRIPTION The refresh() and wrefresh() functions refresh the current or specified window.
drand48(3C) drand48(3C) NAME drand48( ), erand48( ), lrand48( ), nrand48( ), mrand48( ), jrand48( ), srand48( ), seed48( ), lcong48( ) - generate uniformly distributed pseudo-random numbers SYNOPSIS #include
drand48(3C) drand48(3C) and jrand48() do not require an initialization entry point to be called first. All the routines work by generating a sequence of 48-bit integer values, X[i], according to the linear congruential formula X[n+1] = (a*X[n] + c) modulo m n>=0 The parameter m = 2ˆ48; hence 48-bit integer arithmetic is performed.
drand48(3C) drand48(3C) lrand48() : AES, SVID2, SVID3, XPG2, XPG3, XPG4 mrand48() : AES, SVID2, SVID3, XPG2, XPG3, XPG4 nrand48() : AES, SVID2, SVID3, XPG2, XPG3, XPG4 seed48() : AES, SVID2, SVID3, XPG2, XPG3, XPG4 srand48() : AES, SVID2, SVID3, XPG2, XPG3, XPG4 d HP-UX 11i Version 1: September 2005 −3− Hewlett-Packard Company Section 3−−185
dupwin(3X) dupwin(3X) (ENHANCED CURSES) NAME dupwin — duplicate a window SYNOPSIS #include WINDOW *dupwin(WINDOW *win); DESCRIPTION The dupwin() function creates a duplicate of the window win. d RETURN VALUE Upon successful completion, dupwin() returns a pointer to the new window. Otherwise, it returns a null pointer. ERRORS No errors are defined. SEE ALSO derwin(3X), doupdate(3X), . CHANGE HISTORY First released in X/Open Curses, Issue 4.
echo(3X) echo(3X) (CURSES) NAME echo, noecho — enable/disable terminal echo SYNOPSIS #include int echo(void); int noecho(void); DESCRIPTION The echo() function enables Echo mode for the current screen. The noecho() function disables Echo mode for the current screen. Initially, curses software echo mode is enabled and hardware echo mode of the tty driver is disabled. RETURN VALUE Upon successful completion, these functions return OK. Otherwise, they return ERR. ERRORS No errors are defined.
echo_wchar(3X) echo_wchar(3X) (ENHANCED CURSES) NAME echo_wchar, wecho_wchar — write a complex character and immediately refresh the window SYNOPSIS #include int echo_wchar(const cchar_t *wch); int wecho_wchar(WINDOW *win, const cchar_t *wch); DESCRIPTION The echo_wchar() function is equivalent to calling add_wch() and then calling refresh() . The wecho_wchar() function is equivalent to calling wadd_wch() and then calling wrefresh() .
echochar(3X) echochar(3X) (ENHANCED CURSES) NAME echochar, wechochar — echo single-byte character and rendition to a window and refresh SYNOPSIS #include int echochar(const chtype ch); int wechochar(WINDOW *win, const chtype ch); DESCRIPTION The echochar() function is equivalent to a call to addch() followed by a call to refresh() . The wechochar() function is equivalent to a call to waddch() followed by a call to wrefresh() .
ecvt(3C) ecvt(3C) NAME ecvt( ), fcvt( ), gcvt( ) - convert floating-point number to string SYNOPSIS #include
ecvt(3C) ecvt(3C) ecvt_r() and fcvt_r() are obsolescent interfaces supported only for compatibility with existing DCE applications. New multi-threaded applications should use ecvt() and fcvt() . AUTHOR ecvt() and fcvt() were developed by AT&T. gcvt() was developed by AT&T and HP. SEE ALSO setlocale(3C), printf(3S), lang(5), thread_safety(5).
elf(3E) elf(3E) NAME elf - object file access library SYNOPSIS cc [flag... ] file... -lelf [library] ... #include DESCRIPTION Functions in the ELF access library let a program manipulate ELF (Executable and Linking Format) object files, archive files, and archive members. The header file provides type and function declarations for all library services. e Programs communicate with many of the higher-level routines using an ELF descriptor.
elf(3E) elf(3E) Programs may translate data explicitly, taking full control over the object file layout and semantics. If the program prefers not to have and exercise complete control, the library provides a higher-level interface that hides many object file details. elf_begin and related functions let a program deal with the native memory types, converting between memory objects and their file equivalents automatically when reading or writing an object file.
elf(3E) elf(3E) ELF32_FSZ_TYPE These constants give the file sizes in bytes of the basic ELF types for the 32-bit class of files. See elf_fsize for more information. ELF64_FSZ_TYPE These constants give the file sizes in bytes of the basic ELF types for the 64-bit class of files. See elf_fsize for more information. ELF_K_KIND The function elf_kind identifies the KIND of file associated with an ELF descriptor.
elf_begin(3E) elf_begin(3E) NAME elf_begin - make a file descriptor SYNOPSIS cc [flag]... file... -lelf [library]... #include Elf *elf_begin(int fildes, Elf_Cmd cmd, Elf *ref); DESCRIPTION elf_begin , elf_next , elf_rand , and elf_end work together to process ELF object files, either individually or as members of archives. After obtaining an ELF descriptor from elf_begin , the program may read an existing file, update an existing file, or create a new file.
elf_begin(3E) elf_begin(3E) All data associated with an ELF descriptor remain allocated until elf_end terminates the descriptor’s last activation. After the descriptors have been terminated, the storage is released; attempting to reference such data gives undefined behavior. Consequently, a program that deals with multiple input (or output) files must keep the ELF descriptors active until it finishes with them.
elf_begin(3E) elf_begin(3E) if ((elf = elf_begin(fildes, ELF_C_WRITE, (Elf *)0)) == 0) return; ehdr = elf32_newehdr(elf); phdr = elf32_newphdr(elf, count); scn = elf_newscn(elf); shdr = elf32_getshdr(scn); data = elf_newdata(scn); elf_update(elf, ELF_C_WRITE); elf_end(elf); Finally, the following outline shows how one might update an existing ELF file. Again, this example is simplified to show the overall flow.
elf_cntl(3E) elf_cntl(3E) NAME elf_cntl - control a file descriptor SYNOPSIS cc [flag... ] file... -lelf [library] ... #include int elf_cntl(Elf *elf, Elf_Cmd cmd); DESCRIPTION elf_cntl instructs the library to modify its behavior with respect to an ELF descriptor, elf. As e elf_begin(3E) describes, an ELF descriptor can have multiple activations, and multiple ELF descriptors may share a single file descriptor. Generally, elf_cntl commands apply to all activations of elf.
elf_end(3E) elf_end(3E) NAME elf_end - finish using an object file SYNOPSIS cc [flag... ] file... -lelf [library] ... #include int elf_end(Elf *elf); DESCRIPTION A program uses elf_end to terminate an ELF descriptor, elf, and to deallocate data associated with the descriptor. Until the program terminates a descriptor, the data remain allocated. elf should be a value previously returned by elf_begin ; a null pointer is allowed as an argument, to simplify error handling.
elf_error(3E) elf_error(3E) NAME elf_errmsg, elf_errno - error handling SYNOPSIS cc [flag... ] file... -lelf [library] ... #include const char *elf_errmsg(int err); int elf_errno(void); DESCRIPTION If an ELF library function fails, a program may call elf_errno to retrieve the library’s internal error number. As a side effect, this function resets the internal error number to zero, which indicates no error.
elf_fill(3E) elf_fill(3E) NAME elf_fill - set fill byte SYNOPSIS cc [flag... ] file... -lelf [library] ... #include void elf_fill(int fill); DESCRIPTION Alignment constraints for ELF files sometimes require the presence of ‘‘holes.’’ For example, if the data for one section are required to begin on an eight-byte boundary, but the preceding section is too ‘‘short,’’ the library must fill the intervening bytes. These bytes are set to the fill character.
elf_flag(3E) elf_flag(3E) NAME elf_flagdata, elf_flagehdr, elf_flagelf, elf_flagphdr, elf_flagscn, elf_flagshdr - manipulate flags SYNOPSIS cc [flag... ] file... e #include unsigned unsigned unsigned unsigned unsigned unsigned -lelf [library] ...
elf_fsize(3E) elf_fsize(3E) NAME elf32_fsize, elf64_fsize - return the size of an object file type for elf32 files, return the size of an object file type for elf64 files, respectively. SYNOPSIS cc [flag... ] file... -lelf [library] ... #include size_t elf32_fsize(Elf_Type type, size_t count, unsigned ver); size_t elf64_fsize(Elf_Type type, size_t count, unsigned ver); DESCRIPTION elf32_fsize gives the size in bytes of the 32-bit file representation of count data objects with the given type.
elf_getarhdr(3E) elf_getarhdr(3E) NAME elf_getarhdr - retrieve archive member header SYNOPSIS cc [flag... ] file... -lelf [library] ... #include Elf_Arhdr *elf_getarhdr(Elf *elf); DESCRIPTION elf_getarhdr returns a pointer to an archive member header, if one is available for the ELF descriptor elf. Otherwise, no archive member header exists, an error occurred, or elf was null; elf_getarhdr then e returns a null value. The header includes the following members.
elf_getarsym(3E) elf_getarsym(3E) NAME elf_getarsym - retrieve archive symbol table SYNOPSIS cc [flag... ] file... -lelf [library] ... #include Elf_Arsym *elf_getarsym(Elf *elf, size_t *ptr); DESCRIPTION elf_getarsym returns a pointer to the archive symbol table, if one is available for the ELF descriptor elf . Otherwise, the archive doesn’t have a symbol table, an error occurred, or elf was null; elf_getarsym then returns a null value.
elf_getbase(3E) elf_getbase(3E) NAME elf_getbase - get the base offset for an object file SYNOPSIS cc [flag... ] file... -lelf [library] ... #include off_t elf_getbase(Elf *elf); DESCRIPTION elf_getbase returns the file offset of the first byte of the file or archive member associated with elf, if it e is known or obtainable, and -1 otherwise. A null elf is allowed, to simplify error handling; the return value in this case is -1.
elf_getdata(3E) elf_getdata(3E) NAME elf_getdata, elf_newdata, elf_rawdata - get section data SYNOPSIS cc [flag... ] file... #include Elf_Data Elf_Data Elf_Data -lelf [library] ... *elf_getdata(Elf_Scn *scn, Elf_Data *data); *elf_newdata(Elf_Scn *scn); *elf_rawdata(Elf_Scn *scn, Elf_Data *data); DESCRIPTION These functions access and manipulate the data associated with a section descriptor, scn. When reading an existing file, a section will have a single data buffer associated with it.
elf_getdata(3E) elf_getdata(3E) entire section will be aligned to the maximum of its constituents, thus ensuring appropriate alignment for a buffer within the section and within the file. d_version This member holds the version number of the objects in the buffer. When the library originally read the data from the object file, it used the working version to control the translation to memory objects. Data Alignment As mentioned above, data buffers within a section have explicit alignment constraints.
elf_getdata(3E) elf_getdata(3E) /* not a string table */ } data = 0; if ((data = elf_getdata(scn, data)) == 0 || data->d_size == 0) { /* error or no data */ } The e_shstrndx member in an ELF header holds the section table index of the string table. The program gets a section descriptor for that section, verifies it is a string table, and then retrieves the data. When this fragment finishes, data->d_buf points at the first byte of the string table, and data->d_size holds the string table’s size in bytes.
elf_getehdr(3E) elf_getehdr(3E) NAME elf32_getehdr, elf32_newehdr, elf64_getehdr, elf64_newehdr - retrieve class-dependent object file header for elf32 and elf64 files, respectively SYNOPSIS cc [flag... ] file... -lelf [library] ... #include
elf_getehdr(3E) elf_getehdr(3E) SEE ALSO elf(3E), elf_begin(3E), elf_flag(3E), elf_getident(3E).
elf_getident(3E) elf_getident(3E) NAME elf_getident - retrieve file identification data SYNOPSIS cc [flag... ] file... -lelf [library] ... #include char *elf_getident(Elf *elf, size_t *ptr); e DESCRIPTION As elf(3E) explains, ELF provides a framework for various classes of files, where basic objects may have 32 bits, 64 bits, and so forth.
elf_getphdr(3E) elf_getphdr(3E) NAME elf32_getphdr, elf32_newphdr, elf64_getphdr, elf64_newphdr - retrieve class-dependent program header table for elf32 and elf64 files, respectively SYNOPSIS cc [flag... ] file... -lelf [library] ... #include
elf_getphdr(3E) elf_getphdr(3E) SEE ALSO elf(3E), elf_begin(3E), elf_flag(3E), elf_getehdr(3E).
elf_getscn(3E) elf_getscn(3E) NAME elf_getscn, elf_ndxscn, elf_newscn, elf_nextscn - get section information SYNOPSIS cc [flag... ] file... -lelf [library] ... #include Elf_Scn *elf_getscn(Elf *elf, size_t index); size_t elf_ndxscn(Elf_Scn *scn); Elf_Scn *elf_newscn(Elf *elf); Elf_Scn *elf_nextscn(Elf *elf, Elf_Scn *scn); DESCRIPTION These functions provide indexed and sequential access to the sections associated with the ELF descriptor elf.
elf_getshdr(3E) elf_getshdr(3E) NAME elf32_getshdr, elf64_getshdr - retrieve class-dependent section header for elf32 and elf64 files, respectively SYNOPSIS cc [flag... ] file... -lelf [library] ... #include Elf32_Shdr *elf32_getshdr(Elf_Scn *scn); Elf64_Shdr *elf64_getshdr(Elf_Scn *scn); e DESCRIPTION For a 32-bit class file, elf32_getshdr returns a pointer to a section header for the section descriptor scn.
elf_hash(3E) elf_hash(3E) NAME elf_hash - compute hash value SYNOPSIS cc [flag... ] file... -lelf [library] ... #include unsigned long elf_hash(const char *name); DESCRIPTION elf_hash computes a hash value, given a null terminated string, name. The returned hash value, h, can be used as a bucket index, typically after computing h mod x to ensure appropriate bounds.
elf_kind(3E) elf_kind(3E) NAME elf_kind - determine file type SYNOPSIS cc [flag... ] file... -lelf [library] ... #include Elf_Kind elf_kind(Elf *elf); DESCRIPTION This function returns a value identifying the kind of file associated with an ELF descriptor elf. Currently defined values appear below. e ELF_K_AR The file is an archive (see ar(4)). An ELF descriptor may also be associated with an archive member, not the archive itself, and then elf_kind identifies the member’s type.
elf_next(3E) elf_next(3E) NAME elf_next - sequential archive member access SYNOPSIS cc [flag... ] file... -lelf [library] ... #include Elf_Cmd elf_next(Elf *elf); DESCRIPTION elf_next , elf_rand , and elf_begin manipulate simple object files and archives. elf is an ELF descriptor previously returned from elf_begin . elf_next provides sequential access to the next archive member.
elf_rand(3E) elf_rand(3E) NAME elf_rand - random archive member access SYNOPSIS cc [flag... ] file... -lelf [library] ... #include size_t elf_rand(Elf *elf, size_t offset); DESCRIPTION elf_rand , elf_next , and elf_begin manipulate simple object files and archives. elf is an ELF descriptor previously returned from elf_begin . e elf_rand provides random archive processing, preparing elf to access an arbitrary archive member.
elf_rawfile(3E) elf_rawfile(3E) NAME elf_rawfile - retrieve uninterpreted file contents SYNOPSIS cc [flag... ] file... -lelf [library] ... #include char *elf_rawfile(Elf *elf, size_t *ptr); DESCRIPTION elf_rawfile returns a pointer to an uninterpreted byte image of the file. This function should be used only to retrieve a file being read. For example, a program might use elf_rawfile to retrieve the bytes for an archive member.
elf_strptr(3E) elf_strptr(3E) NAME elf_strptr - make a string pointer SYNOPSIS cc [flag... ] file... -lelf [library] ... #include char *elf_strptr(Elf *elf, size_t section, size_t offset); e DESCRIPTION This function converts a string section offset to a string pointer. elf identifies the file in which the string section resides, and section gives the section table index for the strings.
elf_update(3E) elf_update(3E) NAME elf_update - update an ELF descriptor SYNOPSIS cc [flag... ] file... -lelf [library] ... #include off_t elf_update(Elf *elf, Elf_Cmd cmd); DESCRIPTION elf_update causes the library to examine the information associated with an ELF descriptor, elf, and to recalculate the structural data needed to generate the file’s image. cmd may have the following values.
elf_update(3E) elf_update(3E) p_memsz p_flags p_align Member sh_name sh_type sh_flags sh_addr sh_offset Section Header e sh_size sh_link sh_info sh_addralign Notes Only when ELF_F_LAYOUT asserted Only when ELF_F_LAYOUT asserted Only when ELF_F_LAYOUT asserted sh_entsize Member Data Descriptor d_buf d_type d_size d_off Notes Only when ELF_F_LAYOUT asserted d_align d_version Note the program is responsible for two particularly important members (among others) in the ELF header.
elf_version(3E) elf_version(3E) NAME elf_version - coordinate ELF library and application versions SYNOPSIS cc [flag... ] file... -lelf [library]... #include unsigned elf_version(unsigned ver); DESCRIPTION As elf(3E) explains, the program, the library, and an object file have independent notions of the ‘‘latest’’ ELF version. elf_version lets a program determine the ELF library’s internal version.
elf_xlate(3E) elf_xlate(3E) NAME elf32_xlatetof, elf32_xlatetom, elf64_xlatetof, elf64_xlatetom - class-dependent data translation for elf32 and elf64 files, respectively SYNOPSIS cc [flag... ] file... e -lelf [library] ... #include
elf_xlate(3E) elf_xlate(3E) For elf32 files: Elf_Type 32-Bit Memory Type ELF_T_ADDR ELF_T_BYTE ELF_T_DYN ELF_T_EHDR ELF_T_HALF ELT_T_OFF ELF_T_PHDR ELF_T_REL ELF_T_RELA ELF_T_SHDR ELF_T_SWORD ELF_T_SYM ELF_T_WORD Elf32_Addr unsigned char Elf32_Dyn Elf32_Ehdr Elf32_Half Elf32_Off Elf32_Phdr Elf32_Rel Elf32_Rela Elf32_Shdr Elf32_Sword Elf32_Sym Elf32_Word e For elf64 files: Elf_Type 64-Bit Memory Type ELF_T_ADDR Elf64_Addr ELF_T_BYTE unsigned char ELF_T_DYN Elf64_Dyn ELF_T_EHDR Elf64_Ehdr ELF_T_HALF
end(3C) end(3C) NAME end, edata, etext, __data_start, __text_start - last locations in program SYNOPSIS extern void *_end, *end, *_etext, *etext, *_edata, *edata, *__data_start, *__text_start; DESCRIPTION These names refer neither to routines nor to locations with interesting contents.
endwin(3X) endwin(3X) (CURSES) NAME endwin — suspend Curses session SYNOPSIS #include int endwin(void); DESCRIPTION The endwin() function restores the terminal after Curses activity by at least restoring the saved shell terminal mode, flushing any output to the terminal and moving the cursor to the first column of the last line of the screen. Refreshing a window resumes program mode. The application must call endwin() for each terminal being used before exiting.
erasechar(3X) erasechar(3X) (CURSES) NAME erasechar, killchar — single-byte terminal environment query functions SYNOPSIS #include char erasechar(void); char killchar(void); e DESCRIPTION The erasechar() function returns the current erase character. The erasewchar() function stores the current erase character in the object pointed to by ch. If no erase character has been defined, the function will fail and the object pointed to by ch will not be changed.
erasewchar(3X) erasewchar(3X) (ENHANCED CURSES) NAME erasewchar, killwchar — terminal environment query functions SYNOPSIS #include int erasewchar(wchar_t *ch); int killwchar(wchar_t *ch); DESCRIPTION The erasewchar() function stores the current erase character in the object pointed to by ch. If no erase character has been defined, the function will fail and the object pointed to by ch will not be changed.
erf(3M) erf(3M) NAME erf( ), erfc( ) - error function and complementary error function SYNOPSIS #include double erf(double x); double erfc(double x); DESCRIPTION erf() returns the error function of x, defined as: e (2/sqrt (pi )) * (integral with respect to t from 0 to x of (exp (pow (-t,2)))) erfc() returns the complementary value, 1.0 − erf( x ). It prevents the extreme loss of relative accuracy if erf( x ) is called for a large x and the result is subtracted from 1.
exp(3M) exp(3M) NAME exp( ), expf( ) - exponential functions SYNOPSIS #include double exp(double x); float expf(float x); DESCRIPTION exp() returns ex. expf() is a float version of exp() ; it takes a float argument and returns a float result. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options.
exp2(3M) exp2(3M) NAME exp2( ) - base-2 exponential function SYNOPSIS #include double exp2(double x); DESCRIPTION exp2() returns 2x. The ISO/ANSI C committee has approved the exp2() function for inclusion in the C9X draft standard. e To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. Make sure your program includes . Link in the math library by specifying -lm on the compiler or linker command line.
expm1(3M) expm1(3M) NAME expm1( ) - computes exponential functions SYNOPSIS #include double expm1(double x); DESCRIPTION The expm1() function is equivalent to exp( x ) - 1, but may be more accurate for very small values of x. The expm1() and log1p() functions are useful to guarantee that financial calculations of (((1+x)**n)-1)/x, namely: expm1 (n * log1p (x))/x e are accurate when x is very small (for example, when calculating small daily interest rates).
fabs(3M) fabs(3M) NAME fabs( ), fabsf( ) - absolute value functions SYNOPSIS #include double fabs(double x); float fabsf(float x); DESCRIPTION The fabs() function returns the absolute value of x, |x|. The fabsf() function is a float version of fabs() ; it takes a float argument and returns a float result. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options.
fattach(3C) fattach(3C) NAME fattach( ) - attach a STREAMS file descriptor to an object in the file system name space SYNOPSIS #include int fattach(int fd, const char *path); DESCRIPTION The fattach() function attaches the fd file descriptor to an object in the file system name space designated by path. fd specifies an open file descriptor to a STREAMS device or STREAMS-based pipe. path specifies the pathname of an existing object in the file system.
fclose(3S) fclose(3S) NAME fclose( ), fflush( ) - close or flush a stream SYNOPSIS #include int fclose(FILE *stream); int fflush(FILE *stream); Obsolescent Interfaces int fclose_unlocked(FILE *stream); int fflush_unlocked(FILE *stream); DESCRIPTION f fclose() causes any buffered data for the named stream to be written out, and the stream to be closed. Buffers allocated by the standard input/output system may be freed.
fclose(3S) fclose(3S) STANDARDS CONFORMANCE fclose() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C fflush() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.
fdetach(3C) fdetach(3C) NAME fdetach( ) - detach a name from a STREAMS file descriptor SYNOPSIS #include int fdetach(const char *path); DESCRIPTION The fdetach() function detaches a file descriptor from a name in the file system designated by path. path specifies the pathname of an existing object in the file system name space that was previously attached (see the fattach() reference page).
fdim(3M) fdim(3M) NAME fdim( ) - positive difference function SYNOPSIS #include double fdim(double x, double y); DESCRIPTION The fdim() function determines the positive difference between its arguments. The ISO/ANSI C committee has approved the fdim() function for inclusion in the C9X draft standard. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. Make sure your program includes .
feclearexcept(3M) feclearexcept(3M) NAME feclearexcept( ) - clear floating-point exception flags SYNOPSIS #include void feclearexcept(int excepts); DESCRIPTION The feclearexcept() function clears the exception flags represented by its argument. The argument can be constructed as a bitwise OR of the exception macros: FE_INEXACT , FE_DIVBYZERO , FE_UNDERFLOW , FE_OVERFLOW , and FE_INVALID . FE_ALL_EXCEPT represents all the exceptions.
fegetenv(3M) fegetenv(3M) NAME fegetenv( ) - get floating-point environment SYNOPSIS #include void fegetenv(fenv_t *envp); DESCRIPTION The fegetenv() function stores the current floating-point environment in the object pointed to by the argument envp. The ISO/ANSI C committee has approved the fegetenv() function for inclusion in the C9X draft standard. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options.
fegetexceptflag(3M) fegetexceptflag(3M) NAME fegetexceptflag( ) - get floating-point exception flags SYNOPSIS #include void fegetexceptflag(fexcept_t *flagp, int excepts); DESCRIPTION The fegetexceptflag() function stores the exception flags indicated by the argument excepts in the object pointed to by the argument flagp. The excepts argument can be constructed as a bitwise OR of the exception macros: FE_INEXACT , FE_DIVBYZERO , FE_UNDERFLOW , FE_OVERFLOW , and FE_INVALID .
fegetflushtozero(3M) fegetflushtozero(3M) NAME fegetflushtozero( ) - get floating-point underflow mode SYNOPSIS #include int fegetflushtozero(void); DESCRIPTION The fegetflushtozero() function retrieves the value representing the current underflow mode, which is either IEEE-754-compliant (gradual) underflow mode or flush-to-zero mode. The default underflow mode is IEEE-754-compliant. Flush-to-zero mode, also known as fast underflow mode, is supported on most PA1.1 systems and on all PA2.
fegetround(3M) fegetround(3M) NAME fegetround( ) - get floating-point rounding direction mode SYNOPSIS #include int fegetround(void); DESCRIPTION The fegetround() function gets the current rounding direction. The default rounding direction mode is round to nearest (FE_TONEAREST ). The ISO/ANSI C committee has approved the fegetround() function for inclusion in the C9X draft standard. f To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options.
fegettrapenable(3M) fegettrapenable(3M) NAME fegettrapenable( ) - get exception trap enable bits SYNOPSIS #include int fegettrapenable(void); DESCRIPTION The fegettrapenable() function determines which exception trap enable bits are currently set. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. Make sure your program includes . Link in the math library by specifying -lm on the compiler or linker command line.
feholdexcept(3M) feholdexcept(3M) NAME feholdexcept( ) - save floating-point environment SYNOPSIS #include int feholdexcept(fenv_t *envp); DESCRIPTION The feholdexcept() function saves the current floating-point environment in the object pointed to by the argument envp, clears the exception flags, and disables all traps. Use feholdexcept() with feupdateenv() to hide spurious exceptions. Use it with fesetenv() to hide all exceptions.
feraiseexcept(3M) feraiseexcept(3M) NAME feraiseexcept( ) - raise floating-point exceptions SYNOPSIS #include void feraiseexcept(int excepts); DESCRIPTION The feraiseexcept() function raises the exceptions represented by its argument. The argument can be constructed as a bitwise OR of the exception macros: FE_INEXACT , FE_DIVBYZERO , FE_UNDERFLOW , FE_OVERFLOW , and FE_INVALID . FE_ALL_EXCEPT represents all the exceptions. Any traps enabled for the specified exceptions will be taken.
ferror(3S) ferror(3S) NAME ferror( ), feof( ), clearerr( ) - stream status inquiries SYNOPSIS #include int ferror(FILE *stream); int feof(FILE *stream); void clearerr(FILE *stream); Obsolescent Interfaces f int ferror_unlocked(FILE *stream); int feof_unlocked(FILE *stream); void clearerr_unlocked(FILE *stream); DESCRIPTION ferror() Returns non-zero when an I/O error has previously occurred reading from or writing to the named stream, otherwise zero.
ferror(3S) ferror(3S) clearerr() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C feof() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.
fesetenv(3M) fesetenv(3M) NAME fesetenv( ) - set floating-point environment SYNOPSIS #include void fesetenv(const fenv_t *envp); DESCRIPTION The fesetenv() function establishes the floating-point environment represented by the object pointed to by envp. The argument envp must point to an object set by a call to fegetenv() or feholdex cept() , or equal the macro FE_DFL_ENV .
fesetexceptflag(3M) fesetexceptflag(3M) NAME fesetexceptflag( ) - set floating-point exception flags SYNOPSIS #include void fesetexceptflag(const fexcept_t *flagp, int excepts); DESCRIPTION The fesetexceptflag() function sets the status for the exception flags indicated by the argument excepts according to the representation in the object pointed to by flagp.
fesetflushtozero(3M) fesetflushtozero(3M) NAME fesetflushtozero( ) - set floating-point underflow mode SYNOPSIS #include void fesetflushtozero(int); DESCRIPTION The fesetflushtozero() function sets the current underflow mode. If the argument is 1, the underflow mode is set to flush-to-zero mode. If the argument is zero, the underflow mode is set to IEEE754-compliant (gradual) underflow mode. For arguments other than 1 or zero, the effect is undefined.
fesetround(3M) fesetround(3M) NAME fesetround( ) - set floating-point rounding direction mode SYNOPSIS #include int fesetround(int round); DESCRIPTION The fesetround() function establishes the rounding direction represented by its argument round. The round argument must equal one of the macros FE_TONEAREST , FE_UPWARD , FE_DOWNWARD , and FE_TOWARDZERO. If the argument does not match a rounding direction macro, the rounding direction is not changed.
fesettrapenable(3M) fesettrapenable(3M) NAME fesettrapenable( ) - set exception trap enable bits SYNOPSIS #include void fesettrapenable(int excepts); DESCRIPTION The fesettrapenable() function sets the exception trap enable bits indicated by the argument excepts. The argument can be constructed as a bitwise OR of the exception macros: FE_INEXACT , FE_DIVBYZERO , FE_UNDERFLOW , FE_OVERFLOW , and FE_INVALID . FE_ALL_EXCEPT represents all the exceptions.
fetestexcept(3M) fetestexcept(3M) NAME fetestexcept( ) - test floating-point exceptions SYNOPSIS #include int fetestexcept(int excepts); DESCRIPTION The fetestexcept() function determines which of a specified subset of the exception flags are currently set. The excepts argument specifies the exception flags to be queried. The argument can be constructed as a bitwise OR of the exception macros: FE_INEXACT , FE_DIVBYZERO , FE_UNDERFLOW , FE_OVERFLOW , and FE_INVALID .
feupdateenv(3M) feupdateenv(3M) NAME feupdateenv( ) - update floating-point environment SYNOPSIS #include void feupdateenv(const fenv_t *envp); DESCRIPTION The feupdateenv() function saves the current exceptions in its automatic storage, installs the floatingpoint environment represented through envp, and then raises the saved exceptions. The argument envp must point to an object set by a call to fegetenv() or feholdexcept(), or equal the macro FE_DFL_ENV .
fgetpos(3S) fgetpos(3S) NAME fgetpos( ), fsetpos( ) - save and restore a file position indicator for a stream SYNOPSIS #include int fgetpos(FILE *stream, fpos_t *pos); int fsetpos(FILE *stream, const fpos_t *pos); DESCRIPTION fgetpos() Store the current value of the file position indicator for the stream pointed to by stream in the object pointed to by pos.
fgetpos64(3S) fgetpos64(3S) NAME fgetpos64(), fopen64(), freopen64(), fseeko64(), fsetpos64(), fstatvfsdev64(), ftello64(), ftw64(), nftw64(), statvfsdev64(), tmpfile64() - non-POSIX standard API interfaces to support large files SYNOPSIS f #include int fgetpos64(FILE *stream, fpos64_t *pos); #include FILE *fopen64(const char *pathname, const char *type); #include FILE *freopen64(const char *pathname, const char *type, FILE *stream); #include
fgetpos64(3S) fgetpos64(3S) be used to grow the file past 2 GB if desired. All other functional behaviors, returns, and errors are identical to freopen() . fseeko64() The fseeko64() function is identical to fseeko() except that fseeko64() accepts an off64_t for the size parameter instead of off_t . All other functional behaviors, returns, and errors are identical.
fgetws(3C) fgetws(3C) NAME fgetws( ) - get a wide character string from a stream file SYNOPSIS #include #include wchar_t *fgetws(wchar_t *ws, int n, FILE *stream); Obsolescent Interface wchar_t *fgetws_unlocked(wchar_t *ws, int n, FILE *stream); Remarks: fgetws() is compliant with the XPG4 Worldwide Portability Interface wide-character I/O functions. It parallels the 8-bit character I/O function defined in gets(3S).
fgetws(3C) fgetws(3C) WARNINGS fgetws_unlocked() is an obsolescent interface supported only for compatibility with existing DCE applications. New multithreaded applications should use fgetws() . AUTHOR fgetws() was developed by OSF and HP. SEE ALSO ferror(3S), flockfile(3S), thread_safety(5).
fileno(3S) fileno(3S) NAME fileno( ) - map stream pointer to file descriptor SYNOPSIS #include int fileno(FILE *stream); Obsolescent Interfaces int fileno_unlocked(FILE *stream); DESCRIPTION f fileno() returns the integer file descriptor associated with the named stream; see open(2). The following symbolic values in define the file descriptors associated with stdin , stdout , and stderr when a program is started : STDIN_FILENO Value of zero for standard input, stdin .
filter(3X) filter(3X) (ENHANCED CURSES) NAME filter — disable use of certain terminal capabilities SYNOPSIS #include void filter(void); DESCRIPTION The filter() function changes the algorithm for initialising terminal capabilities that assume that the terminal has more than one line. A subsequent call to initscr() or newterm() performs the following additional actions: • Disable use of clear , cud , cud1 , cup , cuu1 and vpa .
flash(3X) flash(3X) (CURSES) NAME flash — flash the screen SYNOPSIS #include int flash(void); DESCRIPTION The flash() function alerts the user. It flashes the screen, or if that is not possible, it sounds the audible alarm on the terminal. If neither signal is possible, nothing happens. RETURN VALUE The flash() function always returns OK. f ERRORS No errors are defined. APPLICATION USAGE Nearly all terminals have an audible alarm, but only some can flash the screen.
flockfile(3S) flockfile(3S) NAME flockfile( ), ftrylockfile( ), funlockfile( ) - explicit locking of streams within a multithread application SYNOPSIS #include void flockfile(FILE *stream); int ftrylockfile(FILE *stream); void funlockfile(FILE *stream); DESCRIPTION The flockfile() , ftrylockfile(), and funlockfile() functions provide for explicit application-level locking of streams.
floor(3M) floor(3M) NAME floor( ) - floor function SYNOPSIS #include double floor(double x); DESCRIPTION floor() returns the largest integer (represented as a double-precision number) not greater than x. To use this function, make sure your program includes , and link in the math library by specifying -lm on the compiler or linker command line. f RETURN VALUE If x is ±INFINITY or ±zero, floor() returns x. If x is NaN, floor() returns NaN.
flushinp(3X) flushinp(3X) (CURSES) NAME flushinp — discard input SYNOPSIS #include int flushinp(void); DESCRIPTION The flushinp() function discards (flushes) any characters in the input buffer associated with the current screen. RETURN VALUE The flushinp() function always returns OK. ERRORS No errors are defined. f SEE ALSO . CHANGE HISTORY First released in X/Open Curses, Issue 2. X/Open Curses, Issue 4 The entry is rewritten for clarity.
fmax(3M) fmax(3M) NAME fmax( ) - maximum value function SYNOPSIS #include double fmax(double x, double y); DESCRIPTION The fmax() function determines the maximum numeric value of its arguments. The ISO/ANSI C committee has approved the fmax() function for inclusion in the C9X draft standard. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. Make sure your program includes .
fmin(3M) fmin(3M) NAME fmin( ) - minimum value function SYNOPSIS #include double fmin(double x, double y); DESCRIPTION The fmin() function determines the minimum numeric value of its arguments. The ISO/ANSI C committee has approved the fmin() function for inclusion in the C9X draft standard. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. Make sure your program includes .
fmod(3M) fmod(3M) NAME fmod( ), fmodf( ) - remainder functions SYNOPSIS #include double fmod(double x, double y); float fmodf(float x, float y); DESCRIPTION The fmod() function returns the floating-point remainder ( f ) of the division of x by y, where f has the same sign as x, such that x = iy + f for some integer i, and |f| < |y|. f fmodf() is a float version of fmod() ; it takes float arguments and returns a float result.
fmtmsg(3C) fmtmsg(3C) NAME fmtmsg() - displays formatted message on standard error and console SYNOPSIS #include int fmtmsg( long class, const char *label, int severity, const char *text, const char *action, const char *tag ); DESCRIPTION The fmtmsg() routine is intended as a language-independent error message service. Messages are displayed on the system console, standard error, or both, depending on the setting of the class parameter.
fmtmsg(3C) fmtmsg(3C) The tag component is intended to direct the user to the appropriate documentation to correct or avoid the error. It may be disabled by setting tag to MM_NULLTXT or RMM_NULL . EXTERNAL INFLUENCES The user may control the appearance of the message produced on standard error through the use of two environment variables: MSGVERB and SEV_LEVEL . These have no effect on the console message. The MSGVERB environment variable describes the components the user is interested in seeing.
fnmatch(3C) fnmatch(3C) NAME fnmatch( ) - match filename patterns SYNOPSIS #include int fnmatch(const char *pattern, const char *string, int flags); DESCRIPTION fnmatch() performs pattern matching as described in regexp(5) under PATTERN MATCHING NOTATION. By default, the rule qualifications for filename expansion do not apply; i.e., periods (dots) and slashes are matched as ordinary characters. This default behavior can be modified by using the flags described below.
fopen(3S) fopen(3S) NAME fopen( ), freopen( ), fdopen( ) - open or re-open a stream file; convert file to stream SYNOPSIS #include FILE *fopen(const char *pathname, const char *type); FILE *freopen(const char *pathname, const char *type, FILE *stream); FILE *fdopen(int fildes, const char *type); DESCRIPTION f fopen() Opens the file named by pathname and associates a stream with it. pointer to the FILE structure associated with the stream.
fopen(3S) [ENOMEM] fopen(3S) There is insufficient space to allocate a buffer. fopen() and freopen() fail if: [EACCES] Search permission is denied on a component of the path prefix, or the file exists and the permissions specified by type are denied, or the file does not exist and write permission is denied for the parent directory of the file to be created. [EINTR] A signal was caught during fopen() or freopen() . function. [EISDIR] The named file is a directory and type requires write access.
fpclassify(3M) fpclassify(3M) NAME fpclassify( ) - floating-point operand classification macro SYNOPSIS #include int fpclassify( floating-type x); DESCRIPTION The fpclassify() macro classifies its argument value as NaN, infinite, normalized, denormalized, or zero. The fpclassify() macro can be used with either double or float arguments, and classifies the argument based on its type.
fread(3S) fread(3S) NAME fread( ), fwrite( ) - buffered binary input/output to a stream file SYNOPSIS #include
frexp(3M) frexp(3M) NAME frexp( ) - extract mantissa and exponent from double-precision number SYNOPSIS #include double frexp(double num, int *exp); DESCRIPTION The frexp() function breaks a floating-point number into a normalized fraction and an integral power of 2. It stores the integer exponent in the int object pointed to by exp. To use this function, make sure your program includes , and link in the math library by specifying -lm on the compiler or linker command line.
fseek(3S) fseek(3S) NAME fseek(), fseeko(), ftell(), ftello(), rewind(), fseek_unlocked(), ftell_unlocked(), rewind_unlocked() - reposition a file pointer in a stream SYNOPSIS #include
fseek(3S) fseek(3S) ERRORS fseek() , fseeko() , fseek_unlocked(), ftell() , ftello() , ftell_unlocked(), rewind() and rewind_unlocked() fail if the stream is unbuffered or the buffered data needs to be flushed, or if any of the following conditions are encountered: [EAGAIN] The O_NONBLOCK flag is set for the file descriptor and the process would be delayed in the write operation. [EBADF] The stream is NULL. [EBADF] The underlying file is not open for writing.
ftok(3C) ftok(3C) NAME ftok( ) - create interprocess communication identifier SYNOPSIS #include key_t ftok(const char *path, int id); DESCRIPTION All interprocess communication facilities require the user to supply a key to be used by the msgget() , semget() , and shmget() system calls to obtain interprocess communication identifiers (see msgget(2), semget (2), and shmget(2)).
ftw(3C) ftw(3C) NAME ftw(), nftw() - walk a file tree executing a function SYNOPSIS f #include
ftw(3C) ftw(3C) performance, depth should be at least as large as the number of levels in the tree. nftw() is similar to ftw() except that it takes the additional argument flags, and does not report or enter a directory which has already been visited during the walk. The flags field is the inclusive OR of the following values, as defined in the header file: FTW_PHYS If set, nftw() does a physical walk. It will not follow symbolic links, but will follow hard links.
ftw(3C) ftw(3C) int base; int level; The value of base is the offset from the first character in the path name to where the base name of the object starts; this path name is passed as the first argument to fn. The value of level indicates depth relative to the start of the walk, where the start level has a value of zero. APPLICATION USAGE ftw() can execute concurrently in separate threads. nftw() and nftw2() are serialized if the path argument is relative (i.e.
ftw(3C) ftw(3C) STANDARDS CONFORMANCE ftw() : AES, SVID2, SVID3, XPG2, XPG3, XPG4 f HP-UX 11i Version 1: September 2005 −4− Hewlett-Packard Company Section 3−−287
fwide(3C) fwide(3C) NAME fwide( ) - set stream orientation SYNOPSIS #include #include int fwide(FILE *stream, int mode); DESCRIPTION The fwide() function determines the orientation of the stream pointed to by stream. If mode is greater than zero, the function first attempts to make the stream wide-oriented. If mode is less than zero, the function first attempts to make the stream byte-oriented. Otherwise, mode is zero and the function does not alter the orientation of the stream.
fwprintf(3C) fwprintf(3C) NAME fwprintf( ), wprintf( ), swprintf( ) - print formatted wide-character output SYNOPSIS #include #include int fwprintf(FILE *stream, const wchar_t *format, ... ); int wprintf(const wchar_t *format, ... ); int swprintf(wchar_t *s, size_t n, const wchar_t *format, ... ); DESCRIPTION The fwprintf function places output on the named output stream. The wprintf() function places output on the standard output stream stdout.
fwprintf(3C) fwprintf(3C) flag followed by a positive field width. A negative precision is taken as if the precision were omitted.
fwprintf(3C) fwprintf(3C) X Behaves the same as the x conversion wide-character except that letters ABCDEF are used instead of abcdef . f The double argument is converted to decimal notation in the style [-]ddd.ddd, where the number of digits after the radix character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly 0 and no # flag is present, no radix character appears.
fwprintf(3C) fwprintf(3C) ERRORS For the conditions under which fwprintf() and wprintf() fails, refer to fputwc() ; see putwc(3C). In addition, all forms of fwprintf() may fail if one of the following occurs: [EILSEQ] A wide-character code that does not correspond to a valid character has been detected. [EINVAL] There are insufficient arguments. [ENOMEM] Insufficient storage space is available. In addition, wprintf() may fail if: stdout is byte-oriented.
fwscanf(3C) fwscanf(3C) NAME fwscanf( ), wscanf( ), swscanf( ) - convert formatted wide-character input SYNOPSIS #include #include int fwscanf(FILE *stream, const wchar_t *format, ... ); int wscanf(const wchar_t *format, ... ); int swscanf(const wchar_t *s, const wchar_t *format, ... ); DESCRIPTION The fwscanf() function reads from the named input stream. The wscanf() function reads from the standard input stream stdin . The swscanf() reads from the wide-character string s.
fwscanf(3C) fwscanf(3C) If an h, l (ell) or L appears with any other conversion wide-character, the behavior is undefined. • A conversion wide-character that specifies the type of conversion to be applied. The valid conversion wide-characters are described below. The fwscanf() functions execute each directive of the format in turn. If a directive fails, as detailed below, the function returns.
fwscanf(3C) s fwscanf(3C) Matches a sequence of non white-space wide-characters. If no l (ell) qualifier is present, characters from the input field are converted as if by repeated calls to the wcrtomb() function, with the conversion state described by an mbstate_t object initialized to zero before the first wide-character is converted.
fwscanf(3C) fwscanf(3C) Reaching the end of the string in swscanf() is equivalent to encountering end-of-file for fwscanf() . If conversion terminates on a conflicting input, the offending input is left unread in the input. Any trailing white space (including newline) is left unread unless matched by a conversion specification. The success of literal matches and suppressed assignments is only directly determinable via the %n conversion specification.
fwscanf(3C) fwscanf(3C) SEE ALSO getwc(3C), fwprintf(3C), setlocale(3C), wcstod(3C), wcstol(3C), wcstoul(3C), wcrtomb(3C), langinfo(5), orientation(5), thread_safety(5).
get_expiration_time(3T) get_expiration_time(3T) NAME get_expiration_time() - add a specific time interval to the current absolute system time SYNOPSIS #include int get_expiration_time( struct timespec *delta, struct timespec *abstime ); DESCRIPTION The get_expiration_time() function adds a specific time interval to the current absolute system time and returns the new absolute time. This new absolute time is used as the expiration time in a call to pthread_cond_timedwait(3T).
get_wch(3X) get_wch(3X) (ENHANCED CURSES) NAME get_wch, mvget_wch, mvwget_wch, wget_wch - get a wide character from a terminal SYNOPSIS #include int get_wch(wint_t *ch); int mvget_wch(int y, int x, wint_t *ch); int mvwget_wch(WINDOW *win, int y, int x, wint_t *ch); int wget_wch(WINDOW *win, wint_t *ch); DESCRIPTION These functions read a character from the terminal associated with the current or specified window.
getaddrinfo(3N) getaddrinfo(3N) NAME getaddrinfo(), getnameinfo(), freeaddrinfo(), gai_strerror() - get hostname and address entry SYNOPSIS #include #include
getaddrinfo(3N) getaddrinfo(3N) matching IPv6 addresses. getaddrinfo() ignores an AI_V4MAPPED flag if the ai_family is not equal to AF_INET6 . If an AI_ALL flag is used with an AI_V4MAPPED flag, getaddrinfo() returns all the matching IPv6 and IPv4 addresses. getaddrinfo() ignores an AI_ALL flag without an AI_V4MAPPED flag.
getaddrinfo(3N) getaddrinfo(3N) void freeaddrinfo(struct addrinfo *ai); The addrinfo structure pointed to by the ai argument is freed, along with any dynamic storage pointed to by the structure. This operation is repeated until a NULL ai_next pointer is encountered. gai_strerror() To aid applications in printing error messages based on the EAI_ xxx codes returned by getaddrinfo() , the gai_strerror function is defined. #include #include
getaddrinfo(3N) getaddrinfo(3N) many commands provide. A fifth flag bit, NI_DGRAM , specifies that the service is a datagram service, and causes getservbyport() to be called with a second argument of "udp" instead of its default of "tcp". This is required for the few ports (512-514) that have different services for UDP and TCP. These NI_ xxx flags are defined in along with the AI_ xxx flags already defined for getaddrinfo() .
getbegyx(3X) getbegyx(3X) (ENHANCED CURSES) NAME getbegyx, getmaxyx, getparyx — get additional cursor and window coordinates SYNOPSIS #include void getbegyx(WINDOW *win, int y, int x); void getmaxyx(WINDOW *win, int y, int x); void getparyx(WINDOW *win, int y, int x); DESCRIPTION The getbegyx() macro stores the absolute screen coordinates of the specified window’s origin in y and x.
getbootpent(3X) getbootpent(3X) NAME getbootpent(), putbootpent(), setbootpent(), parse_bp_iaddr() - get or put bootptab entry endbootpent(), parse_bp_htype(), parse_bp_haddr(), SYNOPSIS #include
getbootpent(3X) getbootpent(3X) in the /etc/bootptab file (or from an alternate file specified by a call to setbootpent() ), including leading, or embedded, comment lines. Each subsequent call returns a pointer to the next entry in the file so that successive calls can be used to search the entire file. If no file is currently in memory, getbootpent() reads the /etc/bootptab file prior to doing its work.
getbootpent(3X) getbootpent(3X) Entry field strings are of the form: tag [@ ] [=" value" ] with surrounding whitespace, if any, removed (see bootpd(1M) for the full description). Double quotes, and backslashes, can appear anywhere in the field strings. Template entries (those referred to by other entries using tc fields) are not special. They can be managed like other entries.
getbootpent(3X) getbootpent(3X) if (putbootpent (bp, fields, newfilep)) { (handle error) } } if (fields < 0) { (handle error) } /* error reading file */ if (endbootpent()) { (handle error) } if (fclose (newfilep)) { (handle error) } g The following code fragment saves a copy of a bootptab entry returned by getbootpent(). #include #include #include
getc(3S) getc(3S) NAME getc( ), getc_unlocked( ), getchar( ), getchar_unlocked( ), fgetc( ), getw( ) - get character or word from a stream file SYNOPSIS #include int getc(FILE *stream); int getc_unlocked(FILE *stream); int getchar(void); int getchar_unlocked(void); int fgetc(FILE *stream); int getw(FILE *stream); Obsolescent Interface g int getw_unlocked(FILE *stream); DESCRIPTION getc() Returns the next character (i.e.
getc(3S) getc(3S) ERRORS getc() , getc_unlocked(), getchar() , getchar_unlocked(), getw() , getw_unlocked(), and fgetc() fail if data needs to be read into the stream’s buffer, and: [EAGAIN] The O_NONBLOCK flag is set for the file descriptor underlying stream and the process would be delayed in the read operation. [EBADF] The file descriptor underlying stream is not a valid file descriptor open for reading.
getc(3S) getc(3S) fgetc() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, XPG4.2, FIPS 151-2, POSIX.1, ANSI C getchar() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C getchar_unlocked(): POSIX.
getcchar(3X) getcchar(3X) (ENHANCED CURSES) NAME getcchar — get a wide character string and rendition from a cchar_t SYNOPSIS #include
getch(3X) getch(3X) (CURSES) NAME getch, wgetch, mvgetch, mvwgetch — get a single-byte character from the terminal SYNOPSIS #include int getch(void); int mvgetch(int y, int x); int mvwgetch(WINDOW *win, int y, int x); int wgetch(WINDOW *win); DESCRIPTION These functions read a single-byte character from the terminal associated with the current or specified window. The results are unspecified if the input is not a single-byte character.
getclock(3C) getclock(3C) NAME getclock - get current value of system-wide clock SYNOPSIS #include int getclock(int clock_type, struct timespec *tp); DESCRIPTION The getclock() function gets the current value tp of the specified system-wide clock, clock_type . getclock() supports a clock_type of TIMEOFDAY , defined in , which represents the time-of-day clock for the system. For this clock, the values returned by getclock() represent the amount of time since the Epoch.
getcwd(3C) getcwd(3C) NAME getcwd( ) - get pathname of current working directory SYNOPSIS #include char *getcwd(char *buf, size_t size); DESCRIPTION The getcwd() function places the absolute pathname of the current working directory in the array pointed to by buf, and returns buf. The value of size must be at least one greater than the length of the pathname to be returned. If buf is a NULL pointer, getcwd() obtains size bytes of space using malloc() (see malloc(3C)).
getdate(3C) getdate(3C) NAME getdate() - convert user format date and time SYNOPSIS #include struct tm *getdate(const char *string); Obsolescent Interface int getdate_r(const char *string, struct tm *result, int *errnum); DESCRIPTION The getdate() function converts user definable date and/or time specifications pointed to by string into a struct tm. The structure declaration is in the header file (see ctime(3C)).
getdate(3C) getdate(3C) The following example shows the possible contents of a template: %m %A %B %d, %Y, %H:%M:%S %A %B %m/%d/%y %I %p %d,%m,%Y %H:%M at %A the %dst of %B in %Y run job at %I %p, %B %dnd %A den %d. %B %Y %H.
getdate(3C) getdate(3C) Input Mon Sun Fri September January December Sep Mon Jan Fri Dec Mon Jan Wed 1989 Fri 9 Feb 10:30 10:30 13:30 g Line in Template %a %a %a %B %B %B %b %a %b %a %b %a %b %a %Y %a %H %b %H:%S %H:%M %H:%M Date Mon Sep 22 12:19:47 EDT 1986 Sun Sep 28 12:19:47 EDT 1986 Fri Sep 26 12:19:47 EDT 1986 Mon Sep 1 12:19:47 EDT 1986 Thu Jan 1 12:19:47 EST 1987 Mon Dec 1 12:19:47 EST 1986 Mon Sep 1 12:19:47 EDT 1986 Fri Jan 2 12:19:47 EST 1987 Mon Dec 1 12:19:47 EST 1986 Wed Jan 4 12:19:47 EST
getdiskbyname(3C) getdiskbyname(3C) NAME getdiskbyname( ) - get disk description by its name SYNOPSIS #include struct disktab *getdiskbyname(const char *name); Obsolescent Interface int getdiskbyname_r( const char *name, struct disktab *result, char *buffer, int buflen); DESCRIPTION getdiskbyname() takes a disk name (such as hp7959B) and returns a pointer to a structure that describes its geometry information and the standard disk partition tables.
getdvagent(3) getdvagent(3) NAME getdvagent, getdvagnam, setdvagent, enddvagent, putdvagnam, copydvagent - manipulate device assignment database entry for a trusted system SYNOPSIS g #include #include #include
getdvagent(3) getdvagent(3) table of character string pointers, whose last entry is a NULL pointer. fd_users is a pointer to a null-terminated table of character string pointers referring to user allowed access. For trusted system versions supporting network connections, the device name can be a 12 character host name, where the first 8 characters are the ASCII hex address of the device, and the last 4 characters are ASCII zeroes. For example, a host with Internet address 129.75.0.
getenv(3C) getenv(3C) NAME getenv( ) - return value for environment name SYNOPSIS #include char *getenv(const char *name); DESCRIPTION getenv() searches the environment list (see environ(5)) for a string of the form name =value, and returns a pointer to the value in the current environment if such a string is present, otherwise a NULL pointer.
getfsent(3X) getfsent(3X) (TO BE OBSOLETED) NAME getfsent( ), getfsspec( ), getfsfile( ), getfstype( ), setfsent( ), endfsent( ) - get file system descriptor file entry SYNOPSIS #include struct checklist *getfsent(void); struct checklist *getfsspec(const char *spec); struct checklist *getfsfile(const char *file); struct checklist *getfstype(const char *type); int setfsent(void); int endfsent(void); Remarks: These routines are included only for compatibility with 4.2 BSD.
getfsent(3X) getfsent(3X) (TO BE OBSOLETED) FILES /etc/fstab SEE ALSO fstab(4).
getgrent(3C) getgrent(3C) NAME getgrent( ), getgrgid( ), getgrgid_r( ), getgrnam( ), getgrnam_r( ), setgrent( ), endgrent( ), fgetgrent( ) - get group file entry SYNOPSIS #include
getgrent(3C) getgrent(3C) Reentrant Interfaces getgrgid_r () and getgrnam_r() both update the struct group pointed to by grp and store a pointer to that structure at the location pointed to by result . The structure shall contain an entry from the group database with a matching gid or name . Storage referenced by the group structure pointed to by grp shall be allocated from the memory provided with the buffer parameter, which is buflen in size.
getgrent(3C) getgrent(3C) setgrent() : SVID2, SVID3, XPG2 getgrnam_r(), getgrgid_r() : POSIX.
gethostent(3N) gethostent(3N) NAME gethostent(), gethostbyaddr(), gethostbyname(), sethostent(), endhostent() - get, set, or end network host entry SYNOPSIS g #include #include #include
gethostent(3N) gethostent() sethostent() gethostent(3N) Always returns a NULL pointer. Requests the use of a connected stream socket for queries to the name server if the stayopen flag is non-zero. The connection is retained after each call to gethostbyname() or gethostbyaddr(). endhostent() Closes the stream socket connection. gethostbyname() gethostbyaddr() Each retrieves host information from the name server. Names are matched without respect to uppercase or lowercase. For example, berkeley.
gethostent(3N) gethostent(3N) In a multithreaded application, gethostent() , gethostbyaddr(), and gethostbyname() use thread-specific storage that is reused in each call. The return value, struct hostent , should be unique for each thread and should be saved, if desired, before the thread makes the next gethost*() call.
gethostent(3N) gethostent(3N) u_int addr; struct hostent *hp; char **p; if (argc != 2) { (void) printf("usage: %s IP-address\n",argv[0]); exit (1); } if ((int) (addr = inet_addr (argv[1])) == -1) { (void) printf("IP-address must be of the form a.b.c.d\n"); exit (2); } hp=gethostbyaddr((char *) &addr, sizeof (addr), AF_INET); if (hp == NULL) { (void) printf("host information for %s no found \n", argv[1]); exit (3); } for (p = hp->h_addr_list; *p!=0;p++){ struct in_addr in; char **q; (void)memcpy(&in.
gethostent(3N) gethostent(3N) The reentrant routines return -1 if the operation is unsuccessful, or, in the case of gethostent_r(), if the end of the hosts list has been reached. 0 is returned otherwise. AUTHOR gethostent() was developed by Sun Microsystems Inc. FILES /etc/hosts SEE ALSO nis+(1), named(1M), thread_safety(5). ypserv(1M), resolver(3N), ypclnt(3C), hosts(4), nsswitch.
gethrtime(3C) gethrtime(3C) NAME gethrtime( ) - get high resolution time SYNOPSIS #include hrtime_t gethrtime(void); DESCRIPTION The gethrtime() function returns the current high-resolution real time. Time is expressed as nanoseconds since a certain time in the past. This API uses a fast light weight system call to get the nanoseconds from a certain time. It is not correlated in any way to the time of day.
getipnodebyname(3N) getipnodebyname(3N) NAME getipnodebyname(), getipnodebyaddr() - translation between node name and address SYNOPSIS g #include #include struct hostent *getipnodebyname( const char *name, int af, int flags, int *error_num ); struct hostent *getipnodebyaddr( const void *src, size_t len, int af, int *error_num ); DESCRIPTION getipnodebyname() - nodename to address translation (forward lookup). getipnodebyaddr() - address to nodename translation (reverse lookup).
getipnodebyname(3N) getipnodebyname(3N) Domain Name Server Operation If the local system is configured to use the named name server (see named(1M) and resolver (4)) for name or address resolution, then the functions: getipnodebyname() getipnodebyaddr() Both retrieve host information from the name server. Names are matched without respect to uppercase or lowercase. For example, berkeley.edu , Berkeley.EDU , and BERKELEY.EDU all match the entry for berkeley.edu .
getipnodebyname(3N) getipnodebyname(3N) RETURN VALUE If successful, getipnodebyname() and getipnodebyaddr() return a pointer to the requested hostent structure. getipnodebyname() and getipnodebyaddr() return NULL if their host or src parameters, respectively, cannot be found in the database. If /etc/hosts is being used, they return NULL if they are unable to open /etc/hosts . getipnodebyaddr() returns NULL if either its src or len parameter is invalid.
getipnodebyname(3N) getipnodebyname(3N) AUTHOR gethostent(3N) was developed by Sun Microsystems Inc. getipnodebyname(3N) was developed by Hewlett-Packard. FILES /etc/hosts SEE ALSO gethostent(3N), named(1M), resolver(3N), hosts(4), nsswitch.conf(4), thread_safety(5).
getlogin(3C) getlogin(3C) NAME getlogin( ), getlogin_r( ) - get name of user logged in on this terminal SYNOPSIS #include char *getlogin(void); int getlogin_r(char *buf, size_t buflen); DESCRIPTION The getlogin() function retrieves the name of the user currently logged in on a terminal associated with the calling process, as found in /etc/utmpx . At least one of the standard input, standard output, or standard error must be a terminal.
getlogin(3C) getlogin(3C) FILES /etc/utmpx Database that maps user logins to terminals. WARNINGS Users of getlogin_r() should note getlogin_r() now conforms with the POSIX.1c Threads standard. The old prototype of getlogin_r() is supported for compatibility with existing DCE applications only. SEE ALSO getuid(2), getgrent(3C), getpwent(3C), utmpx(4), thread_safety(5). STANDARDS CONFORMANCE getlogin() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1 getlogin_r() : POSIX.
getmntent(3X) getmntent(3X) NAME getmntent( ), getmntent_r( ), setmntent( ), addmntent( ), delmntent( ), endmntent( ), hasmntopt( ) - get file system descriptor file entry SYNOPSIS g #include
getmntent(3X) getmntent(3X) hasmntopt() Scans the mnt_opts field of the mntent structure mnt for a substring that matches opt. It returns the address of the substring if a match is found; 0 otherwise. endmntent() Closes the file. The following definitions are provided in
getmntent(3X) getmntent(3X) optional in /etc/fstab and /etc/mnttab . In the supplied structure, such missing character pointer fields are set to NULL and missing integer fields are set to −1 for mnt_freq and mnt_passno . If the integer field for mnt_time is missing, it is set to 0. getmntent_r() Returns a -1 on error or EOF, or if the supplied buffer is of insufficient length. If the operation is successful, 0 is returned. addmntent() Returns 1 on error. delmntent() Returns -1 on error.
getn_wstr(3X) getn_wstr(3X) (ENHANCED CURSES) NAME getn_wstr, get_wstr, mvgetn_wstr, mvget_wstr, mvwgetn_wstr, mvwget_wstr, wgetn_wstr, wget_wstr — get an array of wide characters and function key codes from a terminal SYNOPSIS #include
getnetconfig(3N) getnetconfig(3N) NAME getnetconfig(), setnetconfig(), endnetconfig(), getnetconfigent(), freenetconfigent(), nc_perror(), nc_sperror() - get network configuration database entry SYNOPSIS #include
getnetconfig(3N) getnetconfig(3N) nc_perror() and nc_sperror() can also be used with the NETPATH access routines defined in getnetpath(3N). RETURN VALUES setnetconfig() returns a unique handle to be used by getnetconfig(). In the case of an error, setnetconfig() returns NULL and nc_perror() or nc_sperror() can be used to print the reason for failure. getnetconfig() returns a pointer to the current entry in the netconfig() database, formatted as a struct netconfig .
getnetent(3N) getnetent(3N) NAME getnetent(), getnetbyaddr(), getnetbyname(), setnetent(), endnetent() - get, set, or end network entry SYNOPSIS g #include #include
getnetent(3N) getnetent(3N) /etc/nsswitch.conf file (see nsswitch.conf(4)). The lookup policy defines the order and the criteria of the supported name services used to resolve network names and addresses. RETURN VALUE getnetent() , getnetbyname(), and getnetbyaddr() return a null pointer (0) on EOF or when they are unable to open /etc/networks. getnetbyaddr() also returns a null pointer if its type parameter is invalid.
getnetgrent(3C) getnetgrent(3C) NAME getnetgrent( ), setnetgrent( ), endnetgrent( ), innetgr( ), - get network group entry SYNOPSIS g int innetgr( char *netgroup, char *machine, char *user, char *domain ); int setnetgrent(char *netgroup); int endnetgrent(); int getnetgrent( char **machinep, char **userp, char **domainp ); DESCRIPTION These functions are used to test membership in and enumerate members of ‘‘netgroup’’ network groups defined in a system database.
getnetgrent(3C) MULTITHREAD USAGE Thread Safe: Cancel Safe: Fork Safe: Async-cancel Safe: Async-signal Safe: getnetgrent(3C) Yes Yes No No No These functions can be called safely in a multithreaded environment. They may be cancellation points in that they call functions that are cancel points. In a multithreaded environment, these functions are not safe to be called by a child process after fork() and before exec() .
getnetpath(3N) getnetpath(3N) NAME getnetpath(), setnetpath(), endnetpath() - get /etc/netconfig entry corresponding to NETPATH component SYNOPSIS #include struct netconfig *getnetpath(void *handlep ); void *setnetpath(void); int endnetpath(void *handlep ); MULTITHREAD USAGE Thread Safe: Cancel Safe: Fork Safe: Async-cancel Safe: Async-signal Safe: g Yes Yes No No No These functions can be called safely in a multithreaded environment.
getnetpath(3N) getnetpath(3N) SEE ALSO getnetconfig(3N), netconfig(4), environ(5).
getnstr(3X) getnstr(3X) (ENHANCED CURSES) NAME getnstr, mvgetnstr, mvwgetnstr, wgetnstr, — get a multi-byte character length limited string from the terminal SYNOPSIS #include
getopt(3C) getopt(3C) NAME getopt( ), optarg, optind, opterr - get option letter from argument vector SYNOPSIS #include int getopt(int argc, char * const argv[], const char *optstring); extern char *optarg; extern int optind, opterr, optopt; DESCRIPTION getopt() returns the next option letter in argv (starting from argv[ 1 ]) that matches a letter in optstring. argc and argv are the argument count and argument array as passed to main() .
getopt(3C) getopt(3C) EXAMPLES The following code fragment shows to process arguments for a command that can take the mutually exclusive options a and b, and the options f and o, both of which require arguments: g #include #include main (int argc, char *argv[]) { int c; int bflg, aflg, errflg; extern char *optarg; extern int optind, optopt; . . .
getopt(3C) getopt(3C) SEE ALSO getopt(1), thread_safety(5). STANDARDS CONFORMANCE getopt() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2 optarg : AES, SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2 opterr : AES, SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2 optind : AES, SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2 optopt : AES, SVID3, XPG4, POSIX.
getpass(3C) getpass(3C) (TO BE OBSOLETED) NAME getpass( ) - read a password SYNOPSIS #include char *getpass(const char *prompt); DESCRIPTION getpass() reads up to a newline or EOF from the file /dev/tty , after prompting on the standard error output with the null-terminated string prompt and disabling echoing. A pointer is returned to a nullterminated string of at most 8 characters. If /dev/tty cannot be opened, a NULL pointer is returned.
getprdfent(3) getprdfent(3) NAME getprdfent, getprdfnam, setprdfent, endprdfent, putprdfnam - manipulate system default database entry for a trusted system SYNOPSIS #include #include #include
getprdfent(3) getprdfent(3) A call to setprdfent has the effect of rewinding the default control file to allow repeated searches. endprdfent can be called to close the database when processing is complete. putprdfnam puts a new or replaced default control entry pr with key name into the database. If the prg.fd_name field is 0, the requested entry is deleted from the system default database.
getprotoent(3N) getprotoent(3N) NAME getprotoent(), getprotobynumber(), getprotobyname(), setprotoent(), endprotoent() - get, set, or end protocol entry SYNOPSIS #include
getprotoent(3N) getprotoent(3N) RETURN VALUE getprotoent(), getprotobyname(), and getprotobynumber() return a null pointer (0) on EOF or when they are unable to open /etc/protocols.
getprpwent(3) getprpwent(3) NAME getprpwent, getprpwuid, getprpwnam, getprpwaid, setprpwent, endprpwent, putprpwnam - manipulate protected password database entries (for trusted systems only). SYNOPSIS #include #include #include
getprpwent(3) int char int char getprpwent(3) fd_nlogins; fd_unsuctty[14]; fd_max_tries; fd_lock; /* /* /* /* consecutive unsuccessful logins */ tty of last unsuccessful login */ maximum unsuc login tries allowed */ Unconditionally lock account? */ }; struct pr_flag { unsigned short /* Identity: */ fg_name:1, fg_uid:1, fg_encrypt:1, fg_owner:1, fg_boot_auth:1, fg_pw_audid:1, fg_pw_audflg:1, /* /* /* /* /* /* /* /* Password maintenance fg_min:1, fg_maxlen:1, fg_expire:1, fg_lifetime:1, fg_schange:1,
getprpwent(3) getprpwent(3) fd_owner is the user name accountable for the account. The fd_boot_auth field is used when the system default file specifies boot authorization is required. init(1M) prompts for a user name and password. If the authentication succeeds, a value in this field allows the user to continue the system boot process. fd_min is the time, in seconds, that must elapse before the user can change passwords. fd_maxlen is the maximum password length (in characters) for the user.
getprpwent(3) getprpwent(3) getprpwnam searches from the beginning of the database until a login name matching name is found, and returns a pointer to the particular structure in which it was found. If an end-of-file or an error is encountered on reading, these functions return a NULL pointer. A call to setprpwent has the effect of rewinding the protected password database to allow repeated searches. endprpwent can be called to close the protected password database when processing is complete.
getprpwent(3) getprpwent(3) SEE ALSO authcap(4), getpwent(3C), getprdfent(3), prpwd(4), ttsyncd(1M), nis+(1).
getprtcent(3) getprtcent(3) NAME getprtcent, getprtcnam, setprtcent, endprtcent, putprtcnam - manipulate terminal control database entry for a trusted system SYNOPSIS #include #include #include
getprtcent(3) getprtcent(3) Note that ufld and uflg refer to user-specific entries, and sfld and sflg refer to the system default values (see authcap(4)). The value returned by getprtcent or getprtcnam refers to a structure that is overwritten by calls to these routines. To retrieve an entry, modify it, and replace it in the database, copy the entry using structure assignment and supply the modified buffer to putprtcnam .
getpublickey(3N) getpublickey(3N) NAME getpublickey(), getsecretkey(), publickey() - retrieve public or secret key SYNOPSIS #include #include
getpw(3C) getpw(3C) (TO BE OBSOLETED) NAME getpw( ) - get name from UID SYNOPSIS #include int getpw(uid_t uid, char *buf); DESCRIPTION getpw() searches the password file for a user ID number that equals uid, copies the line of the password file in which uid was found into the array pointed to by buf, and returns 0. getpw() returns non-zero if uid cannot be found. The line is null-terminated.
getpwent(3C) getpwent(3C) NAME getpwent( ), getpwuid( ), getpwuid_r( ), getpwnam( ), getpwnam_r( ), setpwent( ), endpwent( ), fgetpwent( ), get password file entry SYNOPSIS g #include
getpwent(3C) getpwent(3C) getpwnam() searches from the beginning of the password database until a login name matching name is found, and returns a pointer to the particular structure in which it was found; fgetpwent() unlike the other functions above, does not use nsswitch.conf, nor access NIS or NIS+. It returns a pointer to the next passwd structure in the standard I/O stream stream, which should be open for reading, and its contents should match the format of /etc/passwd .
getpwent(3C) getpwent(3C) nsswitch.conf(4).) An application that uses these interfaces cannot be fully archive bound. EXAMPLE The following code excerpt prints name and uid of user logged in on this terminal: struct passwd pwd; struct passwd *result; char logBuffer [1024]; char pwdBuffer [1024]; if (getlogin_r (loginBuffer, 1024) == 0) if (getpwnam_r (logBuffer, &pwd, pwdBuffer, 1024, &result) == 0) printf ("Name = %s; uid = %d\n", pwd.pw_name, pwd.
getresuid(3) getresuid(3) NAME getresuid, getresgid - get real, effective and saved user or group IDs SYNOPSIS int getresuid (uid_t *ruid, uid_t *euid, uid_t *suid); int getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid); DESCRIPTION getresuid and getresgid return the real, effective, and saved user or group ID’s of the current process. RETURN VALUE On error, the return is -1, and errno is set appropriately. On success the return is 0.
getrpcent(3C) getrpcent(3C) NAME getrpcent( ), getrpcbyname( ), getrpcbynumber( ), - get RPC entry SYNOPSIS cc [ flag . . . ] file . . . -lnsl [ library . . . ] #include struct rpcent *getrpcent(); struct rpcent *getrpcbyname(char *name); struct rpcent *getrpcbynumber(int number); int setrpcent(int stayopen); int endrpcent(); g DESCRIPTION These functions are used to obtain entries for RPC (Remote Procedure Call) services.
getrpcent(3C) getrpcent(3C) long r_number; /* rpc program number */ }; The functions getrpcbyname(), and getrpcbynumber() each return a pointer to a struct rpcent if they successfully locate the requested entry; otherwise they return NULL. The function getrpcent() returns a pointer to a struct rpcent if it successfully enumerates an entry; otherwise it returns NULL, indicating the end of the enumeration.
getrpcport(3N) getrpcport(3N) NAME getrpcport( ) - get RPC port number SYNOPSIS int getrpcport( char *host, int prognum, int versnum, int proto ); DESCRIPTION getrpcport() returns the port number for version versnum of the RPC program prognum running on host and using protocol proto. It returns 0 if it cannot contact portmap or if prognum is not registered. If prognum is registered but not with version versnum, it returns the port number of the last registered (prognum, proto) pair.
gets(3S) gets(3S) NAME gets( ), fgets( ) - get a string from a stream SYNOPSIS #include char *gets(char *s); char *fgets(char *s, int n, FILE *stream); Obsolescent Interface char *fgets_unlocked(char *s, int n, FILE *stream); DESCRIPTION gets() Reads characters from the standard input stream, stdin , into the array pointed to by s, until a new-line character is read or an end-of-file condition is encountered.
getservent(3N) getservent(3N) NAME getservent(), getservbyname(), getservbyport(), setservent(), endservent() - get, set, or end service entry SYNOPSIS #include
getservent(3N) getservent(3N) OBSOLESCENT INTERFACES int getservent_r(struct servent *result, struct servent_data *buffer); int getservbyname_r(const char *name, const char *proto, struct servent *result, struct servent_data *buffer); int getservbyport_r(int port, const char *proto, struct servent *result, struct servent_data *buffer); int setservent_r(int stayopen, struct servent_data *buffer); int endservent_r(struct servent_data *buffer); The above reentrant interfaces have been moved from libc to lib
getspent(3C) getspent(3C) NAME getspent(), getspnam(), setspent(), endspent(), getspnam_r(), fgetspent() - access secure password entries SYNOPSIS #include
getspent(3C) getspent(3C) The fgetspent() routine is available only if libsec patch PHCO_27038 or later is installed. Unlike the other functions above, it does not use /etc/nsswitch.conf, and does not access NIS or NIS+. It returns a pointer to the next spwd structure in the standard I/O stream. The I/O stream should be open for reading and its contents should match the format of /etc/shadow . Programs using these routines must be compiled with -lsec .
getspwent(3X) getspwent(3X) NAME getspwent( ), getspwuid( ), getspwaid( ), getspwnam( ), setspwent( ), endspwent( ), fgetspwent( ) - get secure password file entry on trusted systems SYNOPSIS #include
getspwent(3X) getspwent(3X) To access other fields in the protected password database that are not included in the s_passwd structure, use getprpwent() . See getprpwent(3) for more information. getspwent() When first called, getspwent() returns a pointer to each s_passwd structure obtained from the protected password database for each user in sequence. Subsequent calls can be used to search the entire database. getspwuid() Searches for an entry that matches the specified uid.
getspwent(3X) getspwent(3X) Obsolescent Interfaces The following interfaces are to be obsoleted: getspwent_r(), getspwuid_r(), getspwaid_r(), getspwnam_r(), setspwent_r(), endspwent_r(), and fgetspwent_r(). EXAMPLE The following code excerpt counts the number of entries in the protected password database: int count = 0; struct s_passwd *pwbuf; setspwent(); while (pwbuf=getspwent()) count++; endspwent(); AUTHOR getspwent() was developed by HP.
getstr(3X) getstr(3X) (CURSES) NAME getstr, mvgetstr, mvwgetstr, wgetstr — get a multi-byte character string from the terminal SYNOPSIS #include int getstr(char *str); int mvgetstr(int y, int x, char *str); int mvwgetstr(WINDOW *win, int y, int x, char *str); int wgetstr(WINDOW *win, char *str); DESCRIPTION The effect of getstr() is as though a series of calls to getch() were made, until a newline or carriage return is received. The resulting value is placed in the area pointed to by str.
getsubopt(3C) getsubopt(3C) NAME getsubopt( ) - parse suboptions from a string. SYNOPSIS #include int getsubopt(char **optionp, char * const *tokens, char **valuep); DESCRIPTION getsubopt() parses suboptions in a flag argument that were initially parsed by getopt() (see getopt(3C)). These suboptions are separated by commas, and may consist of either a single token, or a token-value pair separated by an equal sign.
getsubopt(3C) getsubopt(3C) char *options, *value; extern char *optarg; extern int optind; . . .
getsubopt(3C) getsubopt(3C) SEE ALSO getopt(3C), thread_safety(5).
gettimer(3C) gettimer(3C) NAME gettimer - get value of a per-process timer SYNOPSIS #include int gettimer(timer_t timerid, struct itimerspec *value); DESCRIPTION The gettimer() function returns an itimerspec structure value to the value argument. The it_value member of the structure represents the amount of time in the current interval before the timer expires for the timer specified in timerid , or zero if the timer is disabled.
gettxt(3C) gettxt(3C) (TO BE OBSOLETED) NAME gettxt() - read text string from message file SYNOPSIS #include char *gettxt(char *msg_id, char *def_str); DESCRIPTION The gettxt() routine retrieves a text string from a message file for the current locale. msg_id has the following syntax: msgfilename :msgnumber where msgfilename is the name of the message file generated by mkmsgs(1). If msgfilename is NULL , gettxt() uses the message file specified in the last call to setcat(3C).
getusershell(3C) getusershell(3C) NAME getusershell( ), setusershell( ), endusershell( ) - get legal user shells SYNOPSIS #include char *getusershell(void); void setusershell(void); void endusershell(void); Obsolescent Interfaces char *getusershell_r(char **shell_datap); void setusershell_r(char **shell_datap); void endusershell_r(char **shell_datap); DESCRIPTION getusershell() Returns a pointer to the first legal user shell as defined in the file /etc/shells (see shells(4)).
getut(3C) getut(3C) NAME getutent( ), getutid( ), getutline( ), pututline( ), _pututline( ), utmp file entry setutent( ), endutent( ), utmpname( ) - access SYNOPSIS g #include
getut(3C) getut(3C) LOGIN_PROCESS , USER_PROCESS , or DEAD_PROCESS , getutid() returns a pointer to the first entry whose type is one of these four, and whose ut_id field matches id−>ut_id. If end-of-file is reached without a match, getutid() fails. getutline() Searches forward from the current point in the utmp file until it finds an entry of type LOGIN_PROCESS or USER_PROCESS that also has a ut_line string matching the line−>ut_line string. If end-of-file is reached without a match, getutline() fails.
getut(3C) getut(3C) Reentrant Interfaces getutent_r() , getutid_r() , Upon successful completion, pututline_r() return 0. Otherwise, they all return -1 and set errno . getutline_r() and ERRORS Reentrant Interfaces [EINVAL] utmp or ud parameter is equal to NULL . WARNINGS getutent_r() , getutid_r() , getutline_r(), pututline_r(), setutent_r() , endutent_r() , and utmpname_r() are obsolescent interfaces supported only for compatibility with existing DCE applications.
getutx(3C) getutx(3C) NAME getutxent( ), getutxid( ), getutxline( ), pututxline( ), setutxent( ), endutxent( ) - access utmpx file entry SYNOPSIS #include
getutx(3C) getutx(3C) setutxent() Resets the input stream to the beginning of the file. This should be done before each search for a new entry if it is desired that the entire file be examined. endutxent() Closes the currently open file. The most current entry is saved in a static structure. Multiple accesses require that the structure be copied before further accesses are made. During each call to either getutxid() or getutxline() , the static structure is examined before performing more I/O.
getwc(3C) getwc(3C) NAME getwc( ), getwchar( ), fgetwc( ) - get a wide character from a stream file SYNOPSIS #include wint_t getwc(FILE *stream); wint_t getwchar(void); wint_t fgetwc(FILE *stream); Obsolescent Interfaces wint_t getwc_unlocked(FILE *stream); wint_t getwchar_unlocked(void); wint_t fgetwc_unlocked(FILE *stream); Remarks: These functions are compliant with the XPG4 Worldwide Portability Interface wide-character I/O functions.
getwc(3C) getwc(3C) [EILSEQ] The data obtained from the input stream does not form a valid wide character. Additional errno values may be set by the underlying read() function (see read(2)). EXTERNAL INFLUENCES Locale The LC_CTYPE category determines how wide character conversions are done. International Code Set Support Single- and multi-byte character code sets are supported.
getwd(3C) getwd(3C) NAME getwd( ) - get pathname of current working directory SYNOPSIS #include char *getwd(char *buf); DESCRIPTION getwd() places the absolute pathname of the current working directory in the array pointed to by buf, and returns buf. If the length of the pathname of the current working directory is greater than PATH_MAX+1 bytes, getwd() fails and returns a null pointer. RETURN VALUE Upon successful completion, getwd() returns a pointer to the current directory pathname.
getwin(3X) getwin(3X) (ENHANCED CURSES) NAME getwin, putwin — dump window to, and reload window from, a file SYNOPSIS #include WINDOW *getwin(FILE *filep); int putwin(WINDOW *win, FILE *filep); DESCRIPTION The getwin() function reads window-related data stored in the file by putwin() . The function then creates and initialises a new window using that data. The putwin() function writes all data associated with win into the stdio stream to which filep points, using an unspecified format.
getyx(3X) getyx(3X) (CURSES) NAME getyx — get cursor and window coordinates SYNOPSIS #include void getyx(WINDOW *win, int y, int x); DESCRIPTION The getyx() macro stores the cursor position of the specified window in y and x. RETURN VALUE No return values are defined. ERRORS No errors are defined. APPLICATION USAGE These interfaces are macros and ‘&’ cannot be used before the y and x arguments. g SEE ALSO getbegyx(3X), . CHANGE HISTORY First released in X/Open Curses, Issue 2.
glob(3C) glob(3C) NAME glob(), globfree() - file name generation function SYNOPSIS #include int glob( const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob ); void globfree(glob_t *pglob); g DESCRIPTION glob() is a path name generator. pattern is a pointer to a path name pattern to be expanded. If pattern contains any of the special characters *, ?, or [, pattern is matched against all accessible path names.
glob(3C) glob(3C) • The count returned in pglob −> gl_pathc will be the total number of path names from the two calls. • The application can change any of the fields after a call to glob() . If it does, it must reset them to the original value before a subsequent call, using the same pglob value, to globfree() or glob() with the GLOB_APPEND flag.
glob(3C) glob(3C) STANDARDS CONFORMANCE glob() : XPG4, POSIX.2 globfree() : XPG4, POSIX.
grantpt(3C) grantpt(3C) NAME grantpt - grant access to the STREAMS slave pty SYNOPSIS int grantpt (int fildes); DESCRIPTION The passed parameter, fildes, is a file descriptor that is returned from a successful open of a STREAMS master pty (pseudo-terminal) device. The grantpt() function modifies the ownership and mode of the slave pty device special file associated with its master pty counterpart.
gss_accept_sec_context(3) gss_accept_sec_context(3) NAME gss_accept_sec_context( ) - establish a security context between the application and a context acceptor SYNOPSIS g #include
gss_accept_sec_context(3) gss_accept_sec_context(3) actual_mech_type Actual mechanism used. Specify NULL if not required. output_token Returns a token to pass to the context acceptor. If no token is to be passed to the context acceptor, the routine sets the length field of the returned token buffer to 0 (zero). ret_flags Returns a bitmask containing six independent flags, each of which requests that the context support a service option.
gss_accept_sec_context(3) False time_rec gss_accept_sec_context(3) The security context is not transferable. Returns the number of seconds for which the context remains valid. This is optional information. If the time is not required, specify NULL. delegated_cred_handle Returns the credential handle for credentials received from the context initiator. The credential handle is valid only if delegated credentials are available.
gss_acquire_cred(3) gss_acquire_cred(3) NAME gss_acquire_cred( ) - allow an application to acquire a handle for an existing, named credential SYNOPSIS #include
gss_acquire_cred(3) GSS_S_NO_CRED GSS_S_FAILURE gss_acquire_cred(3) No credentials were found for the specified name. The routine failed. See the minor_status parameter return value for more information. AUTHOR gss_acquire_cred() was developed by Sun Microsystems, Inc. SEE ALSO gss_init_sec_context(3). The manpages for DCE-GSSAPI are included with the DCE-CoreTools product. To see those manpages add /opt/dce/share/man to MANPATH .
gss_add_cred(3) gss_add_cred(3) NAME gss_add_cred( ) - adds a credential-element to a credential SYNOPSIS #include
gss_add_cred(3) gss_add_cred(3) parameter, the newly acquired credential-element will be added to the credential identified by input_cred_handle. g actual_mechs Returns a set of mechanisms for which the credential is valid. This information is optional. If you do not want a set of mechanisms returned, specify NULL. initiator_time_rec Specifies the actual number of seconds that credentials remain valid for initiating security contexts using the specified mechanism.
gss_add_oid_set_member(3) gss_add_oid_set_member(3) NAME gss_add_oid_set_member() - add an Object Identifier (OID) to an OID set SYNOPSIS #include OM_uint32 gss_add_oid_set_member ( OM_uint32* minor_status, gss_OID* member_OID, gss_OID_set* OID_set) DESCRIPTION The gss_add_oid_set_member() routine adds a new Object Identifier to an Object Identifier set. If an OID set does not exist, you can create a new, empty OID set with the gss_create_empty_oid_set() routine.
gss_canonicalize_name(3) gss_canonicalize_name(3) NAME gss_canonicalize_name() - convert an internal name to an internal mechanism name (MN) representation of an opaque internal name SYNOPSIS #include OM_uint32 gss_canonicalize_name ( OM_uint32 *minor_status, const gss_name_t input_name, const gss_OID *mech_type, gss_name_t *output_name) g DESCRIPTION The gss_canonicalize_name() routine generate a canonical mechanism name (MN) from an arbitrary internal name.
gss_compare_name(3) gss_compare_name(3) NAME gss_compare_name( ) - allow an application to compare two internal names to determine whether they are equivalent SYNOPSIS #include OM_uint32 gss_compare_name ( OM_uint32 *minor_status, const gss_name_t name1, const gss_name_t name2, int *name_equal) DESCRIPTION The gss_compare_name() routine lets an application compare two internal names to determine whether they are the same.
gss_context_time(3) gss_context_time(3) NAME gss_context_time( ) - check the number of seconds the context will remain valid SYNOPSIS #include OM_uint32 gss_context_time ( OM_uint32 *minor_status, const gss_ctx_id_t context_handle, OM_int32 *time_rec) DESCRIPTION The gss_context_time() routine checks the number of seconds for which the context will remain valid. Input Parameters context_handle g Output Parameters time_rec minor_status Specifies the context to be checked.
gss_create_empty_oid_set(3) gss_create_empty_oid_set(3) NAME gss_create_empty_oid_set( ) - create a new, empty OID set, to which members can be added SYNOPSIS #include OM_uint32 gss_create_empty_oid_set ( OM_uint32 *minor_status, gss_OID_set *OID_set); DESCRIPTION The gss_create_empty_oid_set( ) routine creates a new, empty OID set to which the context initiator can add members. Use the gss_add_oid_set_member( ) routine to add members to the OID set.
gss_delete_sec_context(3) gss_delete_sec_context(3) NAME gss_delete_sec_context( ) - delete a security context SYNOPSIS #include OM_uint32 gss_delete_sec_context ( OM_uint32 *minor_status, gss_ctx_id_t *context_handle, gss_buffer_t output_token_buffer) DESCRIPTION The gss_delete_sec_context( ) routine deletes a security context. It also deletes the local data structures associated with the security context. When it deletes the context, the routine can generate a token.
gss_display_name(3) gss_display_name(3) NAME gss_display_name( ) - provide textual representation of an opaque internal name to an application SYNOPSIS #include OM_uint32 gss_display_name ( OM_uint32 *minor_status, const gss_name_t input_name, gss_buffer_t output_name_buffer, gss_OID *output_name_type) DESCRIPTION The gss_display_name( ) routine provides an application with the text form of an opaque internal name. The application can use the text to display the name but not to print it.
gss_display_status(3) gss_display_status(3) NAME gss_display_status( ) - provide an application with the textual representation of a GSSAPI status code that can be displayed to a user or used for logging SYNOPSIS #include
gss_display_status(3) gss_display_status(3) SEE ALSO The manpages for DCE-GSSAPI are included with the DCE-CoreTools product. To see those manpages add /opt/dce/share/man to MANPATH .
gss_duplicate_name(3) gss_duplicate_name(3) NAME gss_duplicate_name( ) - allow an application to create an exact duplicate of the existing internal name SYNOPSIS #include OM_uint32 gss_duplicate_name ( OM_uint32 *minor_status, const gss_name_t src_name, gss_name_t *dest_name) DESCRIPTION The gss_duplicate_name( ) routine create an exact duplicate of the existing internal name src_name. The new dest_name will be independent of src_name.
gss_export_name(3) gss_export_name(3) NAME gss_export_name() - convert a mechanism name (MN) to a form suitable for direct comparison SYNOPSIS #include OM_uint32 gss_export_name ( OM_uint32 *minor_status, const gss_name_t input_name, gss_buffer_t exported_name) DESCRIPTION The gss_export_name() converts a mechanism name (MN) to export form. Input Parameters input_name Specifies the mechanism name (MN) to be exported.
gss_export_sec_context(3) gss_export_sec_context(3) NAME gss_export_sec_context() - transfer a security context to another process on a single machine SYNOPSIS #include
gss_get_mic(3) gss_get_mic(3) NAME gss_get_mic() - calculate a cryptographic message integrity code (MIC) for a message and return in a token SYNOPSIS #include
gss_import_name(3) gss_import_name(3) NAME gss_import_name( ) - convert a printable name to an internal form SYNOPSIS #include OM_uint32 gss_import_name ( OM_uint32 *minor_status, const gss_buffer_t input_buffer_name, const gss_OID input_name_type, gss_name_t *output_name) DESCRIPTION The gss_import_name( ) routine converts a printable name to an internal form.
gss_import_sec_context(3) gss_import_sec_context(3) NAME gss_import_sec_context( ) - transfer a security context to another process on a single machine SYNOPSIS #include OM_uint32 gss_import_sec_context ( OM_uint32 *minor_status, const gss_buffer_t interprocess_token) gss_ctx_id_t *context_handle) DESCRIPTION The gss_import_sec_context( ) routine lets a process to import a security context established by another process. A given interprocess token may be imported only once.
gss_indicate_mechs(3) gss_indicate_mechs(3) NAME gss_indicate_mechs() - allow an application to determine which underlying security mechanisms are available SYNOPSIS #include OM_uint32 gss_indicate_mechs ( OM_uint32 *minor_status, gss_OID_set *mech_set) DESCRIPTION The gss_indicate_mechs( ) routine enables an application to determine which underlying security mechanisms are available. Output Parameters mech_set g minor_status Returns the set of supported security mechanisms.
gss_init_sec_context(3) gss_init_sec_context(3) NAME gss_init_sec_context() - establish a security context between the context initiator and a context acceptor SYNOPSIS #include
gss_init_sec_context(3) gss_init_sec_context(3) GSS_C_MUTUAL_FLAG. The True/False values are: True The context acceptor has been asked to authenticate itself. False The context initiator has not been asked to authenticates itself. GSS_C_REPLAY_FLAG. The True/False values are: True Replayed signed or sealed messages will be detected. False Replayed messages will not be detected. GSS_C_SEQUENCE_FLAG. The True/False values are: True Out-of-sequence signed or sealed messages will be detected.
gss_init_sec_context(3) gss_init_sec_context(3) True Replayed signed or sealed messages will be detected. False Replayed messages will not be detected. GSS_C_SEQUENCE_FLAG. The True/False values are: True Out-of-sequence signed or sealed messages will be detected. False Out-of-sequence signed or sealed messages will not be detected. GSS_C_CONF_FLAG. The True/False values are: True Confidentiality service can be invoked by calling the gss_seal() routine.
gss_init_sec_context(3) gss_init_sec_context(3) GSS_S_CREDENTIALS_EXPIRED The referenced credentials have expired. GSS_S_DEFECTIVE_CREDENTIAL Consistency checks performed on the credential failed. GSS_S_DEFECTIVE_TOKEN Consistency checks performed on the input_token parameter failed. GSS_S_DUPLICATE_TOKEN The input_token parameter was already processed. This is a fatal error that occurs during context establishment. g GSS_S_FAILURE The routine failed.
gss_inquire_context(3) gss_inquire_context(3) NAME gss_inquire_context() - obtain information about a security context SYNOPSIS #include
gss_inquire_context(3) gss_inquire_context(3) True Out-of-sequence signed or sealed messages will be detected. False Out-of-sequence signed or sealed messages will not be detected. GSS_C_CONF_FLAG. The True/False values are: True Request that confidentiality service be made available False No per-message confidentiality service is required. GSS_C_INTEG_FLAG. The True/False values are: True Request that integrity service be be made available False No per-message integrity service is required.
gss_inquire_cred(3) gss_inquire_cred(3) NAME gss_inquire_cred() - provide the calling application information about a credential SYNOPSIS #include OM_uint32 gss_inquire_cred ( OM_uint32 *minor_status, const gss_cred_id_t cred_handle, gss_name_t *name, OM_uint32 *lifetime, int *cred_usage, gss_OID_set *mechs) DESCRIPTION The gss_inquire_cred() routine provides information about a credential to the calling application.
gss_inquire_cred(3) gss_inquire_cred(3) The manpages for DCE-GSSAPI are included with the DCE-CoreTools product. To see those manpages add /opt/dce/share/man to MANPATH .
gss_inquire_cred_by_mech(3) gss_inquire_cred_by_mech(3) NAME gss_inquire_cred_by_mech() - provide the calling application per-mechanism information about a credential SYNOPSIS #include .
gss_inquire_cred_by_mech(3) GSS_S_NO_CRED gss_inquire_cred_by_mech(3) The routine could not access the credentials. AUTHOR gss_inquire_cred_by_mech() was developed by Sun Microsystems, Inc. SEE ALSO gss_acquire_cred(3). The manpages for DCE-GSSAPI are included with the DCE-CoreTools product. To see those manpages add /opt/dce/share/man to MANPATH .
gss_inquire_mechs_for_name(3) gss_inquire_mechs_for_name(3) NAME gss_inquire_mechs_for_name() - list the mechanisms that support the specified name-type SYNOPSIS #include OM_uint32 gss_inquire_mechs_for_name ( OM_uint32 *minor_status, const gss_name_t input_name, gss_OID_set *mech_types) DESCRIPTION The gss_inquire_mechs_for_name() routine returns the set of mechanisms supported by the GSS-API implementation that may be able to process the specified name.
gss_inquire_names_for_mech(3) gss_inquire_names_for_mech(3) NAME gss_inquire_names_for_mech() - list the name-types supported by the specified mechanism SYNOPSIS #include OM_uint32 gss_inquire_names_for_mech ( OM_uint32 *minor_status, const gss_OID *mechanism, gss_OID_set *name_types) DESCRIPTION The gss_inquire_names_for_mech() routine returns the set of nametypes supported by the specified mechanism. g Input Parameters mechanism The mechanism to be interrogated.
gss_process_context_token(3) gss_process_context_token(3) NAME gss_process_context_token() - process a context to the security service SYNOPSIS #include OM_uint32 gss_process_context_token ( OM_uint32 *minor_status, const gss_ctx_id_t *context_handle, const gss_buffer_t input_token_buffer) DESCRIPTION The gss_process_context_token() routine passes tokens gss_delete_security_context() routine to the security service.
gss_release_buffer(3) gss_release_buffer(3) NAME gss_release_buffer() - free storage associated with a buffer SYNOPSIS #include OM_uint32 gss_release_buffer ( OM_uint32 *minor_status, gss_buffer_t buffer) DESCRIPTION The gss_release_buffer() routine deletes the buffer by freeing the storage associated with it. g Input Parameters buffer The buffer to delete. Output Parameters minor_status Returns a status code from the security mechanism.
gss_release_cred(3) gss_release_cred(3) NAME gss_release_cred() - mark a credential for deletion SYNOPSIS #include OM_uint32 gss_release_cred ( OM_uint32 *minor_status, gss_cred_id_t *cred_handle) DESCRIPTION The gss_release_cred() routine informs the GSSAPI that a credential is no longer required and marks it for deletion. Input Parameters cred_handle Output Parameters minor_status Specifies the buffer containing the opaque credential handle to be released.
gss_release_name(3) gss_release_name(3) NAME gss_release_name() - free storage associated with an internal name allocated by a GSSAPI routine SYNOPSIS #include OM_uint32 gss_release_name ( OM_uint32 *minor_status, gss_name_t *name) DESCRIPTION The gss_release_name() routine deletes the internal name by freeing the storage associated with that internal name. g Input Parameters name The name to delete. Output Parameters minor_status Returns a status code from the security mechanism.
gss_release_oid_set(3) gss_release_oid_set(3) NAME gss_release_oid_set() - free storage associated with a gss_OID_set object SYNOPSIS #include OM_uint32 gss_release_oid_set ( OM_uint32 *minor_status, gss_OID_set *set) DESCRIPTION The gss_release_oid_set() routine frees storage that is associated with the gss_OID_set parameter and was allocated by a GSSAPI routine. Input Parameters set Output Parameters minor_status The storage associated with the gss_OID_set will be deleted.
gss_test_oid_set_member(3) gss_test_oid_set_member(3) NAME gss_test_oid_set_member() - check an OID set for a specified OID SYNOPSIS #include OM_uint32 gss_test_oid_set_member ( OM_uint32 *minor_status, const gss_OID member_OID, const gss_OID_set set, int* is_present /* 1 = present, 0 = absent */ ); DESCRIPTION The gss_test_oid_set_member() routine checks an OID set to see if the specified OID is a member of the set. To add a member to an OID set, use the gss_add_oid_set_member() routine.
gss_unwrap(3) gss_unwrap(3) NAME gss_unwrap() - verify a message with attached message integrity code (MIC) and decrypt message content if necessary SYNOPSIS #include OM_uint32 gss_unwrap ( OM_uint32 *minor_status, gss_ctx_id_t context_handle, gss_buffer_t input_message_buffer, gss_buffer_t output_message_buffer, int *conf_state, gss_qop_t *qop_state) DESCRIPTION The gss_unwrap() routine converts a protected message to a usable form and verifies the embedded message integrity code (MIC).
gss_unwrap(3) GSS_S_GAP_TOKEN gss_unwrap(3) The token was valid, and contained a correct MIC for the message, but has been verified out of sequence; an earlier expected token has not yet been received. AUTHOR gss_unwrap() was developed by Sun Microsystems, Inc. SEE ALSO gss_get_mic(3), gss_wrap(3).
gss_verify_mic(3) gss_verify_mic(3) NAME gss_verify_mic() - check a cryptographic message integrity code (MIC) against a message to verify its integrity SYNOPSIS #include OM_uint32 gss_verify_mic( OM_uint32 *minor_status, const gss_ctx_id_t context_handle, const gss_buffer_t message_buffer, const gss_buffer_t token_buffer) gss_qop_t *qop_state) DESCRIPTION The gss_verify_mic() routine verifies that a cryptographic MIC, contained in the token_buffer parameter, fits the supplied message.
gss_wrap(3) gss_wrap(3) NAME gss_wrap() - attach a message integrity code (MIC) to a message, and optionally encrypt the message content SYNOPSIS #include
gss_wrap(3) gss_wrap(3) SEE ALSO gss_unwrap(3), gss_wrap_size_limit(3). The manpages for DCE-GSSAPI are included with the DCE-CoreTools product. To see those manpages add /opt/dce/share/man to MANPATH .
gss_wrap_size_limit(3) gss_wrap_size_limit(3) NAME gss_wrap_size_limit() - determine a token-size limit for gss_wrap on a context SYNOPSIS #include
halfdelay(3X) halfdelay(3X) (ENHANCED CURSES) NAME halfdelay — control input character delay mode SYNOPSIS #include int halfdelay(int tenths); DESCRIPTION The halfdelay() function sets the input mode for the current window to Half-Delay Mode and specifies tenths tenths of seconds as the half-delay interval. The tenths argument must be in a range from 1 up to and including 255. RETURN VALUE Upon successful completion, halfdelay() returns OK. Otherwise, it returns ERR.
has_ic(3X) has_ic(3X) (CURSES) NAME has_ic, has_il — query functions for terminal insert and delete capability SYNOPSIS #include bool has_ic(void); bool has_il(void); DESCRIPTION The has_ic() function indicates whether the terminal has insert- and delete-character capabilities. The has_il() function indicates whether the terminal has insert- and delete-line capabilities, or can simulate them using scrolling regions.
hline(3X) hline(3X) (ENHANCED CURSES) NAME hline, mvhline, mvvline, mvwhline, mvwvline, vline, whline, wvline — draw lines from single-byte characters and renditions SYNOPSIS #include
hline_set(3X) hline_set(3X) (ENHANCED CURSES) NAME hline_set, mvhline_set, mvvline_set, mvwhline_set, mvwvline_set, vline_set, whline_set, wvline_set — draw lines from complex characters and renditions SYNOPSIS #include
hppac(3X) hppac(3X) NAME HPPACADDD, HPPACCMPD, HPPACCVAD, HPPACCVBD, HPPACCVDA, HPPACCVDB, HPPACDIVD, HPPACLONGDIVD, HPPACMPYD, HPPACNSLD, HPPACSLD, HPPACSRD, HPPACSUBD - 3000-mode packed-decimal library SYNOPSIS #include
hppac(3X) h hppac(3X) int ∗pacstatus ); void HPPACLONGDIVD( unsigned char ∗operand2, int op2digs, unsigned char ∗operand1, int op1digs, enum HPPAC_CC ∗compcode, int ∗pacstatus ); void HPPACMPYD( unsigned char ∗operand2, int op2digs, unsigned char ∗operand1, int op1digs, enum HPPAC_CC ∗compcode, int ∗pacstatus ); void HPPACNSLD( unsigned char ∗operand2, int op2digs, unsigned char ∗operand1, int op1digs, int ∗shift_amt, enum HPPAC_CC ∗compcode, int ∗pacstatus, int ∗carry ); void HPPACSLD( unsigned char ∗op
hppac(3X) HPPACADDD() HPPACCMPD() HPPACCVAD() HPPACCVBD() HPPACCVDA() HPPACCVDB() HPPACDIVD() HPPACLONGDIVD() HPPACMPYD() HPPACNSLD() HPPACSLD() HPPACSRD() HPPACSUBD() hppac(3X) Performs packed-decimal addition. Compares two packed-decimal numbers. Converts an ASCII representation to packed-decimal. Converts a binary representation to packed-decimal. Converts a packed-decimal number to ASCII. Converts a packed-decimal number to binary. Performs packed-decimal division.
hsearch(3C) hsearch(3C) NAME hsearch( ), hcreate( ), hdestroy( ) - manage hash search tables SYNOPSIS #include ENTRY *hsearch(ENTRY item, ACTION action); int hcreate(size_t nel); void hdestroy(void); DESCRIPTION hsearch() is a hash-table search routine generalized from Knuth (6.4) Algorithm D. It returns a pointer h into a hash table indicating the location at which an entry can be found.
hsearch(3C) hsearch(3C) /* put info in structure, and structure in item */ item.key = str_ptr; item.data = (char *)info_ptr; str_ptr += strlen(str_ptr) + 1; info_ptr++; /* put item into table */ (void) hsearch(item, ENTER); } /* access table */ item.key = name_to_find; while (scanf("%s", item.
hypot(3M) hypot(3M) NAME hypot( ) - Euclidean distance function SYNOPSIS #include double hypot(double x, double y); DESCRIPTION hypot() returns sqrt( x *x+y *y ), taking precautions against unwarranted overflows. The ISO/ANSI C committee has approved the hypot() function for inclusion in the C9X draft standard. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. Make sure your program includes .
iconv(3C) iconv(3C) NAME iconv(), iconv_open(), iconv_close() - codeset conversion routines SYNOPSIS #include iconv_t iconv_open(const char *tocode , const char *fromcode ); size_t iconv( iconv_t cd , const char **inbuf, size_t *inbytesleft , char **outbuf , size_t *outbytesleft ); int iconv_close(iconv_t cd ); Remarks These interfaces conform to the XPG4 standard, and should be used instead of the 9.
iconv(3C) iconv(3C) to a pre-defined character, called the "galley character" that is defined at the time of table generation. (See genxlt(1)). iconv_close() Deallocates the conversion descriptor cd and all other associated resources allocated by iconv_open() . APPLICATION USAGE Portable applications must assume that conversion descriptors are not valid after calls to any of the exec functions. Special Usage In state-dependent encodings, the characters are interpreted depending on "state" of the input.
iconv(3C) iconv(3C) EXAMPLES The following example shows how the iconv() interfaces maybe used for conversions. #include #include main() { ... convert("roman8", "iso88591", fd); ...
iconv(3C) iconv(3C) return BAD; } /* iconv() returns the number of non-identical conversions * performed. If the entire string in the input buffer is * converted, the value pointed to by inbytesleft will be * zero. If the conversion stopped due to any reason, the * value pointed to by inbytesleft will be non-zero and * errno is set to indicate the condition.
iconv(3C) iconv(3C) AUTHOR iconv() was developed by HP. FILES /usr/lib/nls/iconv/tables Directory containing tables used for conversion. /usr/lib/nls/iconv/methods Directory containing methods used for conversion. /usr/lib/nls/iconv/config.iconv Configuration file is used by iconv_open() to check if the requested conversion is supported, and if so, to determine which table and/or method is used for the conversion. SEE ALSO genxlt(1), iconv(1), thread_safety(5).
idcok(3X) idcok(3X) (ENHANCED CURSES) NAME idcok — enable or disable use of hardware insert- and delete-character features SYNOPSIS #include void idcok(WINDOW *win, bool bf); DESCRIPTION The idcok() function specifies whether the implementation may use hardware insert- and deletecharacter features in win if the terminal is so equipped. If bf is TRUE, use of these features in win is enabled. If bf is FALSE, use of these features in win is disabled. The initial state is TRUE.
if_nameindex(3N) if_nameindex(3N) NAME if_nameindex(), if_nametoindex(), if_indextoname(), if_freenameindex() - functions that map between an index and interface name SYNOPSIS #include unsigned int if_nametoindex(const char *ifname); char *if_indextoname(unsigned int ifindex, char *ifname); struct if_nameindex *if_nameindex(void); void if_freenameindex(struct if_nameindex *ptr); DESCRIPTION Interfaces are normally known by names such as "lan0", "vlan200" etc.
if_nameindex(3N) if_nameindex(3N) SEE ALSO ndp(1M), inet6_opt_init(3N), inet6_rth_space(3N), ip6(7P), ndp(7P).
ilogb(3M) ilogb(3M) NAME ilogb( ) - returns an unbiased exponent SYNOPSIS #include int ilogb(double x); DESCRIPTION The ilogb() function returns the exponent part of x. Formally, the return value is the integral part of log base r of |x| as a signed integral value, for nonzero x, where r is the radix of the machine’s floating point arithmetic. The argument x is a double-precision floating-point value.
immedok(3X) immedok(3X) (ENHANCED CURSES) NAME immedok — enable or disable immediate terminal refresh SYNOPSIS #include void immedok(WINDOW *win, bool bf); DESCRIPTION The immedok() function specifies whether the screen is refreshed whenever the window pointed to by win is changed. If bf is TRUE, the window is implicitly refreshed on each such change. If bf is FALSE, the window is not implicitly refreshed. The initial state is FALSE. RETURN VALUE The immedok() function does not return a value.
in_wch(3X) in_wch(3X) (ENHANCED CURSES) NAME in_wch, mvin_wch, mvwin_wch, win_wch — input a complex character and rendition from a window SYNOPSIS #include
in_wchnstr(3X) in_wchnstr(3X) (ENHANCED CURSES) NAME in_wchnstr, in_wchstr, mvin_wchnstr, mvin_wchstr, mvwin_wchnstr, mvwin_wchstr, win_wchnstr, win_wchstr — input an array of complex characters and renditions from a window SYNOPSIS #include
inch(3X) inch(3X) (CURSES) NAME inch, mvinch, mvwinch, winch — input a single-byte character and rendition from a window SYNOPSIS #include chtype inch(void); chtype mvinch(int y, int x); chtype mvwinch(WINDOW *win, int y, int x); chtype winch(WINDOW *win); DESCRIPTION These functions return the character and rendition, of type chtype, at the current or specified position in the current or specified window.
inchnstr(3X) inchnstr(3X) (ENHANCED CURSES) NAME inchnstr, inchstr, mvinchnstr, mvinchstr, mvwinchnstr, mvwinchstr, winchnstr, winchstr — input an array of single-byte characters and renditions from a window SYNOPSIS #include
inet(3N) inet(3N) NAME inet_addr( ), inet_network( ), inet_ntoa( ), inet_makeaddr( ), inet_lnaof( ), inet_netof( ) - Internet address manipulation routines SYNOPSIS #include #include #include
inet(3N) inet(3N) All numbers supplied as parts in dot notation can be decimal, octal, or hexadecimal, as specified in the C language (i.e., a leading 0x or 0X implies hexadecimal; a leading 0 implies octal; otherwise, the number is interpreted as decimal). In a multithreaded application, inet_ntoa() uses thread-specific storage that is re-used in each call.
inet6(3N) inet6(3N) NAME inet_pton(), inet_ntop() - Internet address manipulation routines for IP Version 4 and later SYNOPSIS: #include #include int inet_pton(int af, const char *src, void *dst); const char *inet_ntop(int af, const void *src, char *dst, size_t size); DESCRIPTION The functions inet_pton() and inet_ntop() are new with IP Version 6 (IPv6) and work with both IP Version 4 (IPv4) and IPv6 addresses. The letters "p" and "n" stand for presentation and numeric .
inet6(3N) inet6(3N) 16-octets. In order to allow applications to easily declare buffers of the proper size to store IPv4 and IPv6 addresses in string form, the following two constants are defined in : #define INET_ADDRSTRLEN 16 #define INET6_ADDRSTRLEN 46 The inet_ntop() function returns a pointer to the buffer containing the text string if the conversion succeeds, and NULL otherwise.
inet6(3N) inet6(3N) ::FFFF:1.2.3.5 or ::FFFF:102:305 AUTHOR These inet routines were developed by the University of California, Berkeley. SEE ALSO gethostent(3N), getnetent(3N), inet(3N), hosts(4), networks(4).
inet6_opt_init(3N) inet6_opt_init(3N) NAME inet6_opt_append(), inet6_opt_find(), inet6_opt_finish(), inet6_opt_get_val(), inet6_opt_init(), inet6_opt_next(), inet6_opt_set_val() - IPv6 Hop-by-Hop and Destination options manipulation functions. SYNOPSIS i #include
inet6_opt_init(3N) inet6_opt_init(3N) inet6_opt_append() This function returns the updated total length required to add an option with length len and alignment align. If extbuf is not NULL, then in addition to returning the length, this function also inserts any needed pad option, initializes the option (sets the type and length fields), and returns a pointer to the location for the option content in databufp.
inet6_opt_init(3N) inet6_opt_init(3N) inet6_opt_get_val() This function extracts data items of various sizes (1, 2, 4, or 8 bytes) in the data portion of the option. The function returns the offset for the next field (offset + vallen) which can be used when extracting option content with multiple fields. The first parameter databuf should be a pointer returned by inet6_opt_next() or inet6_opt_find() containing the data portion of the option.
inet6_rth_space(3N) inet6_rth_space(3N) NAME inet6_rth_add(), inet6_rth_getaddr(), inet6_rth_init(), inet6_rth_reverse(), inet6_rth_space() - IPv6 Routing header options manipulation functions. inet6_rth_segments(), SYNOPSIS #include
inet6_rth_space(3N) inet6_rth_space(3N) Upon success, the return value is the pointer to the buffer (bp), and the pointer is then used as the first argument to the inet6_rth_add() function. Upon an error, the return value is NULL. inet6_rth_add() This function adds the IPv6 address pointed to by addr to the end of the Routing header being constructed.
initgroups(3C) initgroups(3C) NAME initgroups( ) - initialize group access list SYNOPSIS #include int initgroups(const char *name, gid_t basegid); DESCRIPTION initgroups() reads the login group file, /etc/logingroup, and sets up the group access list for the user specified by name, using the setgroups(2) system call. If the value of basegid is zero or positive, it is automatically included in the groups list. Typically this value is given as the group number from the password file.
initscr(3X) initscr(3X) (CURSES) NAME initscr, newterm — screen initialisation functions SYNOPSIS #include WINDOW *initscr(void); SCREEN *newterm(char *type, FILE *outfile, FILE *infile); DESCRIPTION The initscr() function determines the terminal type and initialises all implementation data structures. The TERM environment variable specifies the terminal type. The initscr() function also causes the first refresh operation to clear the screen.
innstr(3X) innstr(3X) (ENHANCED CURSES) NAME innstr, instr, mvinnstr, mvinstr, mvwinnstr, mvwinstr, winnstr, winstr — input a multi-byte character string from a window SYNOPSIS #include
innwstr(3X) innwstr(3X) (ENHANCED CURSES) NAME innwstr, inwstr, mvinnwstr, mvinwstr, mvwinnwstr, mvwinwstr, winnwstr, winwstr — input a string of wide characters from a window SYNOPSIS #include
ins_nwstr(3X) ins_nwstr(3X) (ENHANCED CURSES) NAME ins_nwstr, ins_wstr, mvins_nwstr, mvins_wstr, mvwins_nwstr, mvwins_wstr, wins_nwstr, wins_wstr — insert a wide-character string into a window SYNOPSIS #include
ins_wch(3X) ins_wch(3X) (ENHANCED CURSES) NAME ins_wch, mvins_wch, mvwins_wch, wins_wch — insert a complex character and rendition into a window SYNOPSIS #include
insch(3X) insch(3X) (CURSES) NAME insch, mvinsch, mvwinsch, winsch — insert a single-byte character and rendition into a window SYNOPSIS #include int insch(chtype ch); int mvinsch(int y, int x, chtype ch); int mvwinsch(WINDOW *win, int y, int x, chtype ch); int winsch(WINDOW *win, chtype ch); DESCRIPTION These functions insert the character and rendition from ch into the current or specified window at the current or specified position. These functions do not perform wrapping.
insdelln(3X) insdelln(3X) (ENHANCED CURSES) NAME insdelln, winsdelln — delete or insert lines into a window SYNOPSIS #include int insdelln(int n); int winsdelln(WINDOW *win, int n); DESCRIPTION The insdelln() and winsdelln() functions perform the following actions: • If n is positive, these functions insert n lines into the current or specified window before the current line. The n last lines are no longer displayed.
insertln(3X) insertln(3X) (CURSES) NAME insertln, winsertln — insert lines into a window SYNOPSIS #include int insertln(void); int winsertln(WINDOW *win); DESCRIPTION The insertln() and winsertln() functions insert a blank line before the current line in the current or specified window. The bottom line is no longer displayed. The cursor position does not change. RETURN VALUE Upon successful completion, these functions return OK. Otherwise, they return ERR. ERRORS No errors are defined.
insnstr(3X) insnstr(3X) (ENHANCED CURSES) NAME insnstr, insstr, mvinsnstr, mvinsstr, mvwinsnstr, mvwinsstr, winsnstr, winsstr — insert a multi-byte character string into a window SYNOPSIS #include
insque(3C) insque(3C) NAME insque(), remque() - insert or remove an element in a queue SYNOPSIS #include void insque(void *element, void *pred); void remque(void *element); DESCRIPTION The insque() and remque() functions manipulate queues built from doubly-linked lists. An application using these functions must define a structure in which the first two members of the structure are pointers to the same type of structure. Any additional members of the structure are application specific.
intrflush(3X) intrflush(3X) (CURSES) NAME intrflush — enable or disable flush on interrupt SYNOPSIS #include int intrflush(WINDOW *win, bool bf); DESCRIPTION The intrflush() function specifies whether pressing an interrupt key (interrupt, suspend or quit) will flush the input buffer associated with the current screen. If bf is TRUE, pressing an interrupt key will flush this input buffer. If bf is FALSE, pressing an interrupt key will not flush this input buffer.
is_linetouched(3X) is_linetouched(3X) (ENHANCED CURSES) NAME is_linetouched, is_wintouched, touchline, untouchwin, wtouchln — window refresh control functions SYNOPSIS #include bool is_linetouched(WINDOW *win, int line); bool is_wintouched(WINDOW *win); int touchline(WINDOW *win, int start, int count); int untouchwin(WINDOW *win); int wtouchln(WINDOW *win, int y, int n, int changed); DESCRIPTION The touchline() function only touches count lines, beginning with line start.
isastream(3C) isastream(3C) NAME isastream( ) - determine if a file descriptor refers to a STREAMS device or STREAMS-based pipe SYNOPSIS #include int isastream(int fd); DESCRIPTION The isastream() function tests whether an open file descriptor (fd) corresponds to a STREAMS device or STREAMS-based pipe.
isendwin(3X) isendwin(3X) (ENHANCED CURSES) NAME isendwin — determine whether a screen has been refreshed SYNOPSIS #include bool isendwin(void); DESCRIPTION The isendwin() function indicates whether the screen has been refreshed since the last call to endwin() . RETURN VALUE The isendwin() function returns TRUE if endwin() has been called without any subsequent refresh. Otherwise, it returns FALSE. ERRORS No errors are defined. SEE ALSO endwin(3X), .
isfinite(3M) isfinite(3M) NAME isfinite( ) - floating-point finiteness macro SYNOPSIS #include int isfinite( floating-type x); DESCRIPTION The isfinite() macro determines whether its argument has a finite value (zero, denormalized, or normalized, and not infinite or NaN). The macro can be used with either double or float arguments. The ISO/ANSI C committee has approved the isfinite() macro for inclusion in the C9X draft standard.
isgreater(3M) isgreater(3M) NAME isgreater( ) - floating-point comparison macro (>) SYNOPSIS #include int isgreater( floating-expr x, floating-expr y); DESCRIPTION The isgreater() macro determines whether its first argument is greater than its second argument. The value of isgreater( x ,y ) is always equal to (x ) > (y ); however, unlike (x ) > (y ), isgreater( x ,y ) does not raise the invalid exception when x and y are unordered. The macro can be used with either double or float arguments.
isgreaterequal(3M) isgreaterequal(3M) NAME isgreaterequal( ) - floating-point comparison macro (>=) SYNOPSIS #include int isgreaterequal(floating-expr x, floating-expr y); DESCRIPTION The isgreaterequal() macro determines whether its first argument is greater than or equal to its second argument. The value of isgreaterequal(x ,y ) is always equal to (x ) >= (y ); however, unlike (x ) >= (y ), isgreaterequal(x ,y ) does not raise the invalid exception when x and y are unordered.
isinf(3M) isinf(3M) NAME isinf( ) - floating-point test for infinity SYNOPSIS #include int isinf( floating-type x); DESCRIPTION The isinf() macro determines whether its argument value is an infinity. The macro can be used with either double or float arguments. The ISO/ANSI C committee has approved the isinf() macro for inclusion in the C9X draft standard. To use this macro, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options.
isless(3M) isless(3M) NAME isless( ) - floating-point comparison macro (<) SYNOPSIS #include int isless( floating-expr x, floating-expr y); DESCRIPTION The isless() macro determines whether its first argument is less than its second argument. The value of isless( x ,y ) is always equal to (x ) < (y ); however, unlike (x ) < (y ), isless( x ,y ) does not raise the invalid exception when x and y are unordered. The macro can be used with either double or float arguments.
islessequal(3M) islessequal(3M) NAME islessequal( ) - floating-point comparison macro (<=) SYNOPSIS #include int islessequal( floating-expr x, floating-expr y); DESCRIPTION The islessequal() macro determines whether its first argument is less than or equal to its second argument. The value of islessequal( x ,y ) is always equal to (x ) <= (y ); however, unlike (x ) <= (y ), islessequal( x ,y ) does not raise the invalid exception when x and y are unordered.
islessgreater(3M) islessgreater(3M) NAME islessgreater( ) - floating-point comparison macro (<>) SYNOPSIS #include int islessgreater(floating-expr x, floating-expr y); DESCRIPTION The islessgreater() macro determines whether its first argument is less than or greater than its second argument.
isnan(3M) isnan(3M) NAME isnan( ) - floating-point test for NaN SYNOPSIS #include int isnan( floating-type x); DESCRIPTION The isnan() macro determines whether its argument value is a NaN. The macro can be used with either double or float arguments. The ISO/ANSI C committee has approved the isnan() macro for inclusion in the forthcoming C9X draft standard. The isnan() macro implements the isnan() function recommended by the IEEE-754 standard for floating-point arithmetic.
isnormal(3M) isnormal(3M) NAME isnormal( ) - floating-point test for normalized value SYNOPSIS #include int isnormal( floating-type x); DESCRIPTION The isnormal() macro determines whether its argument has a normalized value (neither zero, denormalized, infinite, nor NaN). The macro can be used with either double or float arguments, and classifies the argument based on its type. The ISO/ANSI C committee has approved the isnormal() macro for inclusion in the C9X draft standard.
isunordered(3M) isunordered(3M) NAME isunordered( ) - floating-point comparison macro (unordered) SYNOPSIS #include int isunordered( floating-expr x, floating-expr y); DESCRIPTION The isunordered() macro determines whether its arguments are unordered. The arguments are unordered if at least one argument is a NaN. The macro can be used with either double or float arguments. The ISO/ANSI C committee has approved the isunordered() macro for inclusion in the C9X draft standard.
j0(3M) j0(3M) NAME j0( ), j1( ), jn( ) - Bessel functions of the first kind SYNOPSIS #include double j0(double x); double j1(double x); double jn(int n, double x); DESCRIPTION j0() and j1() return Bessel functions of x of the first kind of orders 0 and 1 respectively. jn() returns the Bessel function of x of the first kind of order n. To use these functions, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. Make sure your program includes .
keyname(3X) keyname(3X) (ENHANCED CURSES) NAME keyname, key_name — get name of key SYNOPSIS #include char *keyname(int c); char *key_name(wchar_t c); DESCRIPTION The keyname() and key_name() functions generate a character string whose value describes the key c. The c argument of keyname() can be an 8-bit character or a key code. The c argument of key_name() must be a wide character.
keypad(3X) keypad(3X) (CURSES) NAME keypad — enable/disable abbreviation of function keys SYNOPSIS #include int keypad(WINDOW *win, bool bf); DESCRIPTION The keypad() function controls keypad translation. If bf is TRUE, keypad translation is turned on. If bf is FALSE, keypad translation is turned off. The initial state is FALSE. This function affects the behaviour of any function that provides keyboard input.
l3tol(3C) l3tol(3C) NAME l3tol( ), ltol3( ) - convert between 3-byte integers and long integers SYNOPSIS #include void l3tol(long int *lp, const char *cp, int n); void ltol3(char *cp, const long int *lp, int n); DESCRIPTION l3tol() Convert a list of n three-byte integers packed into a character string pointed to by cp into a list of long integers pointed to by lp. ltol3() Perform the reverse conversion from long integers (lp) to three-byte integers (cp).
lckpwdf(3C) lckpwdf(3C) NAME lckpwdf(), ulckpwdf() - control access to /etc/passwd file SYNOPSIS #include int lckpwdf (void) int ulckpwdf (void) DESCRIPTION The lckpwdf() and ulckpwdf() routines are used to coordinate modification access to the password file /etc/passwd and to the secure password entries. The lock file used by these two routines is /etc/.pwd.lock. A process first calls lckpwdf() to gain exclusive access rights for password modification.
ldcvt(3C) ldcvt(3C) NAME _ldecvt( ), _ldfcvt( ), _ldgcvt( ) - convert long-double floating-point number to string SYNOPSIS #include
ldcvt(3C) ldcvt(3C) International Code Set Support Single-byte character code sets are supported. AUTHOR _ldecvt() , _ldfcvt() , and _ldgcvt() were developed by HP. SEE ALSO setlocale(3C), printf(3S), lang(5), thread_safety(5).
ldexp(3M) ldexp(3M) NAME ldexp( ) - load exponent of a floating-point number SYNOPSIS #include double ldexp(double x, int exp); DESCRIPTION The ldexp() function computes the quantity x ∗ 2exp . To use this function, make sure your program includes , and link in the math library by specifying -lm on the compiler or linker command line. RETURN VALUE Upon successful completion, the ldexp() function returns a double representing the value x multiplied by 2 raised to the power exp.
lgamma(3M) lgamma(3M) NAME lgamma( ), lgamma_r( ), gamma( ), signgam( ) - log gamma function SYNOPSIS #include double lgamma(double x); double gamma(double x); (TO BE WITHDRAWN) extern int signgam; double lgamma_r(double x, int *sign); DESCRIPTION lgamma() and gamma() return ln(|Γ(x )|) , where Γ(x) is defined as the integral, as t goes from zero to infinity, of exp(− t ) times t to the power (x−1). The sign of Γ(x) is returned in the external integer signgam .
libkrb5(3) libkrb5(3) NAME libkrb5 - Kerberos client libraries (libkrb5, libk5crypto, libcom_err) SYNOPSIS /usr/lib/libkrb5.sl /usr/lib/libcom_err.sl com_err() /usr/lib/libk5crypto.sl DESCRIPTION Kerberos is a network authentication protocol developed at MIT. This is now an IETF standard RFC 1510, the Kerberos Network Authentication Service (V5). The shared libraries, libkrb5.sl, libcom_err.sl and libk5crypto.
libkrb5(3) libkrb5(3) krb5_princ_realm(), krb5_copy_principal(), etc. Some of the APIs are internal functions, not intended for use by the application programs, interface may change at any time. Even though it is possible to directly access the data elements in the structure, it is recommended that these APIs should be used. The returned principal should be freed with krb5_free_principal().
libkrb5(3) libkrb5(3) SEE ALSO kdestroy(1), kinit(1), klist(1), kpasswd(1), ktutil(1), kvno(1), krb5.conf(4), gssapi(5), kerberos(9).
LINES(3X) LINES(3X) (ENHANCED CURSES) NAME LINES — number of lines on terminal screen SYNOPSIS #include extern int LINES; DESCRIPTION The external variable LINES indicates the number of lines on the terminal screen. SEE ALSO initscr(3X), . CHANGE HISTORY First released in X/Open Curses, Issue 4.
llrint(3M) llrint(3M) NAME llrint( ) - round to nearest long long function SYNOPSIS #include long long llrint(double x); DESCRIPTION llrint() rounds its argument to the nearest integral value, rounding according to the current rounding direction. If the rounded value is outside the range of long long , the numeric result is unspecified. The ISO/ANSI C committee has approved the llrint() function for inclusion in the C9X draft standard.
llround(3M) llround(3M) NAME llround( ) - round to long long function SYNOPSIS #include long long llround(double x); DESCRIPTION llround() rounds its argument to the nearest integral value. An argument exactly halfway between two integers is rounded away from zero, regardless of the current rounding direction. Rounding away from zero also applies to the functions, round and lround . If the rounded value is outside the range of long long , the numeric result is unspecified.
localeconv(3C) localeconv(3C) NAME localeconv() - query the numeric formatting conventions of the current locale SYNOPSIS #include struct lconv *localeconv(void); DESCRIPTION The localeconv() function sets the components of an object of type struct lconv (defined in ) with values appropriate for the formatting of numeric quantities (monetary and otherwise) according to the rules of the program’s current locale (see setlocale(3C)).
localeconv(3C) localeconv(3C) char p_cs_precedes Set to 1 or 0 if the currency_symbol or int_curr_symbol respectively precedes or succeeds the value for a nonnegative formatted monetary quantity. char p_sep_by_space Set to 1 or 0 if the currency_symbol or int_curr_symbol respectively is or is not separated by a space from the value for a nonnegative formatted monetary quantity; and set to 2 if a space separates the symbol and the sign string, if adjacent.
localeconv(3C) localeconv(3C) RETURN VALUE localeconv() returns a pointer to the filled-in struct lconv . EXAMPLES The following table illustrates the formatting used in five languages for monetary quantities. Country en_US.iso88591 it_IT.iso88591 nl_NL.iso88591 no_NO.iso88591 pt_PT.iso88591 Positive format $1,234.56 L.1.234 F 1.234,56 kr1.234,56 1,234$56 Negative format -$1,234.56 -L.1.234 F -1.234,56 kr1.234,56-1,234$56 International format USD 1,234.56 ITL.1.234 NLG 1.234,56 NOK 1.
log(3M) log(3M) NAME log( ), logf( ) - natural logarithm functions SYNOPSIS #include double log(double x); float logf(float x); DESCRIPTION log() returns the natural logarithm of x. The value of x must be greater than zero. logf() is a float version of log() ; it takes a float argument and returns a float result. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options.
log10(3M) log10(3M) NAME log10( ), log10f( ) - common logarithm functions SYNOPSIS #include double log10(double x); float log10f(float x); DESCRIPTION log10() returns the logarithm base ten of x. The value of x must be greater than zero. log10f() is a float version of log10() ; it takes a float argument and returns a float result. To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options.
log1p(3M) log1p(3M) NAME log1p( ) - natural logarithm function SYNOPSIS #include double log1p(double x); DESCRIPTION The log1p() function computes logarithmic functions. The log1p() function is equivalent to log(1 + x ), but may be more accurate for very small values of x.
log2(3M) log2(3M) NAME log2( ), log2f( ) - logarithm base two functions SYNOPSIS #include double log2(double x); float log2f(float x); DESCRIPTION log2() returns the logarithm base two of x. The value of x must be greater than zero. The ISO/ANSI C committee has approved the log2() function for inclusion in the C9X draft standard. log2f() is a float version of log2() ; it takes a float argument and returns a float result.
logb(3M) logb(3M) NAME logb( ) - radix-independent exponent SYNOPSIS #include double logb(double x); DESCRIPTION The logb() function computes the exponent of x. Formally, the return value is the integral part of log base r of |x| as a signed floating point value, for nonzero x, where r is the radix of the machine’s floatingpoint arithmetic. The logb() function is recommended by the IEEE-754 standard for floating-point arithmetic.
logname(3C) logname(3C) NAME logname( ) - return login name of user SYNOPSIS #include char *logname(void); DESCRIPTION logname() returns a pointer to the null-terminated login name; it extracts the $LOGNAME variable from the user’s environment. WARNINGS logname() returns a pointer to static data that is overwritten by each subsequent call. This method of determining a login name is subject to forgery. FILES /etc/profile SEE ALSO env(1), login(1), profile(4), environ(5), thread_safety(5).
longname(3X) longname(3X) (CURSES) NAME longname — get verbose description of current terminal SYNOPSIS #include char *longname(void); DESCRIPTION The longname() function generates a verbose description of the current terminal. The maximum length of a verbose description is 128 bytes. It is defined only after the call to initscr() or newterm() . RETURN VALUE Upon successful completion, longname() returns a pointer to the description specified above.
lrint(3M) lrint(3M) NAME lrint( ) - round to nearest long function SYNOPSIS #include long lrint(double x); DESCRIPTION lrint() rounds its argument to the nearest integral value, rounding according to the current rounding direction. If the rounded value is outside the range of long , the numeric result is unspecified. The ISO/ANSI C committee has approved the lrint() function for inclusion in the C9X draft standard.
lround(3M) lround(3M) NAME lround( ) - round to long function SYNOPSIS #include long lround(double x); DESCRIPTION lround() rounds its argument to the nearest integral value. An argument exactly halfway between two integers is rounded away from zero, regardless of the current rounding direction. Rounding away from zero also applies to the functions, round and llround . If the rounded value is outside the range of long , the numeric result is unspecified.
lsearch(3C) lsearch(3C) NAME lsearch( ), lfind( ) - linear search and update SYNOPSIS #include void *lsearch( const void *key, void *base, size_t *nelp, size_t width, int (*compar)(const void *, const void *) ); void *lfind( const void *key, const void *base, size_t *nelp, size_t width, int (*compar)(const void *, const void *) ); DESCRIPTION lsearch() is a linear search routine generalized from Knuth (6.1) Algorithm S. It returns a pointer into a table indicating where a datum may be found.
lsearch(3C) lsearch(3C) ELSIZE, strcmp); ... RETURN VALUE If the searched-for datum is found, both lsearch() and lfind() return a pointer to it. Otherwise, lfind() returns NULL and lsearch() returns a pointer to the newly added element. WARNINGS Undefined results can occur if there is not enough room in the table to add a new item. SEE ALSO bsearch(3C), hsearch(3C), tsearch(3C), thread_safety(5).
ltostr(3C) ltostr(3C) NAME ltostr(), ultostr(), ltoa(), ultoa() - convert long integers to strings SYNOPSIS #include
malloc(3C) malloc(3C) NAME malloc(), free(), realloc(), calloc(), valloc(), mallopt(), mallinfo(), memorymap(), alloca() - main memory allocator SYNOPSIS #include void *malloc(size_t size); void *calloc(size_t nelem, size_t elsize); void *realloc(void *ptr, size_t size); void *valloc(size_t size); void free(void *ptr); void memorymap(int show_stats); alloca #include void *alloca(size_t size); SYSTEM V SYNOPSIS m #include
malloc(3C) mallopt() malloc(3C) Provides for control over the allocation algorithm and other options in the malloc(3C) package. The available values for cmd are: M_MXFAST Set maxfast to value. The algorithm allocates all blocks below the size of maxfast in large groups, then doles them out very quickly. The default value for maxfast is zero. M_NLBLKS Set numlblks to value. The above mentioned ‘‘large groups’’ each contain numlblks blocks. numlblks must be greater than 1.
malloc(3C) malloc(3C) alloca() Allocates space from the stack of the caller for a block of at least size bytes, but does not initialize the space. The space is automatically freed when the calling routine exits. Memory returned by alloca() is not related to memory allocated by other memory allocation functions. Behavior of addresses returned by alloca() as parameters to other memory functions is undefined. The implementation of this routine is system dependent and its use is discouraged.
malloc(3C) malloc(3C) $ export _M_SBA_OPTS = 512:100:16 This means that the maxfast size is 512, the number of small blocks is 100, and the grain size is 16. You have to supply all 3 values, and in that order. If not, the default values will be used instead. _M_ARENA_OPTS has no effects on non-threaded applications, while _M_SBA_OPTS has. WARNINGS malloc() functions use brk() and sbrk() (see brk(2)) to increase the address space of a process.
mbrlen(3C) mbrlen(3C) NAME mbrlen( ) - get number of bytes in a character (restartable) SYNOPSIS #include size_t mbrlen(const char *s, size_t n, mbstate_t *ps); DESCRIPTION If s is not a null pointer, mbrlen() determines the number of bytes constituting the character pointed to by s.
mbrtowc(3C) mbrtowc(3C) NAME mbrtowc( ) - convert a character to a wide-character code (restartable) SYNOPSIS #include size_t mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps); DESCRIPTION If s is a null pointer, the mbrtowc() function is equivalent to the call: mbrtowc(NULL, "", 1, ps) In this case, the values of the arguments pwc and n are ignored.
mbrtowc(3C) mbrtowc(3C) SEE ALSO mbsinit(3C).
mbsinit(3C) mbsinit(3C) NAME mbsinit( ) - determine conversion object status SYNOPSIS #include int mbsinit(const mbstate_t *ps); DESCRIPTION If ps is not a null pointer, the mbsinit() function determines whether the object pointed to by ps describes an initial conversion state.
mbsrtowcs(3C) mbsrtowcs(3C) NAME mbsrtowcs( ) - convert a character string to a wide-character string (restartable) SYNOPSIS #include size_t mbsrtowcs(wchar_t *dst, const char **src, size_t len, mbstate_t *ps); DESCRIPTION The mbsrtowcs() function converts a sequence of characters, beginning in the conversion state described by the object pointed to by ps, from the array indirectly pointed to by src into a sequence of corresponding wide-characters.
memalign(3C) memalign(3C) NAME memalign() - allocate aligned memory SYNOPSIS #include void *memalign(size_t boundary, size_t size); DESCRIPTION memalign() allocates space for a block of size bytes, whose address is a multiple of boundary. The space is not initialized. The boundary must be a power of 2. RETURN VALUE Upon successful completion, memalign() returns a pointer to space aligned to a multiple of boundary. Otherwise, it returns a NULL pointer.
memory(3C) memory(3C) NAME memccpy( ), memchr( ), memcmp( ), memcpy( ), memmove( ), memset( ), bcopy( ), bcmp( ), bzero( ), ffs( ) memory operations SYNOPSIS #include void *memccpy(void *s1, const void *s2, int c, size_t n); void *memchr(const void *s, int c, size_t n); int memcmp(const void *s1, const void *s2, size_t n); void *memcpy(void *s1, const void *s2, size_t n); void *memmove(void *s1, const void *s2, size_t n); void *memset(void *s, int c, size_t n); #include
memory(3C) memory(3C) memset() Copy the value of c (converted to an unsigned char ) into each of the first n bytes of the object pointed to by s. memset() returns the value of s. bcopy() bcmp() copies n bytes from the area pointed to by s1 to the area pointed to by s2. bzero() ffs() Clear n bytes in the area pointed to by s by setting them to zero. Compare the first n bytes of the area pointed to by s1 with the area pointed to by s2. bcmp() returns zero if they are identical; non-zero otherwise.
meta(3X) meta(3X) (ENHANCED CURSES) NAME meta — enable/disable meta-keys SYNOPSIS #include int meta(WINDOW *win, bool bf); DESCRIPTION Initially, whether the terminal returns 7 or 8 significant bits on input depends on the control mode of the display driver (see the X/Open System Interface Definitions, Issue 4, Version 2 specification, General Terminal Interface). To force 8 bits to be returned, invoke meta(win, TRUE). To force 7 bits to be returned, invoke meta(win, FALSE).
mkdirp(3G) mkdirp(3G) NAME mkdirp(), rmdirp() - create, remove directories in a path SYNOPSIS #include int mkdirp (const char *path , mode_t mode ); int rmdirp (char *d , char *d1); DESCRIPTION mkdirp creates all the missing directories in the given path with the given mode. [See chmod(2) for the values of mode.] The protection part of the mode argument is modified by the process’s file creation mask (see umask(2)). rmdirp removes directories in path d.
mkfifo(3C) mkfifo(3C) NAME mkfifo( ) - make a FIFO file SYNOPSIS #include int mkfifo(char *path, mode_t mode); DESCRIPTION mkfifo() creates a new FIFO (first-in-first-out) file, at the path name to which path points. The file permission bits of the new file are initialized from the mode argument, as modified by the process’s file creation mask: for each bit set in the process’s file mode creation mask, the corresponding bit in the new file’s mode is cleared (see umask(2)).
mkfifo(3C) mkfifo(3C) STANDARDS CONFORMANCE mkfifo() : AES, SVID3, XPG3, XPG4, FIPS 151-2, POSIX.
mktemp(3C) mktemp(3C) NAME mktemp( ), mkstemp( ) - make a unique file name SYNOPSIS #include char *mktemp(char *template); int mkstemp(char *template); Remarks: These functions are provided solely for backward compatibility and importability of applications, and are not recommended for new applications where portability is important. For portable applications, use tmpfile() instead (see tmpfile(3S)).
mktimer(3C) mktimer(3C) NAME mktimer - allocate a per-process timer SYNOPSIS #include timer_t mktimer(int clock_type, int notify_type, void *itimercbp); DESCRIPTION The mktimer() function is used to allocate a per-process timer using the specified system-wide clock as the timing base. mktimer() returns an unique timer ID of type timer_t used to identify the timer in timer requests (see gettimer (3C)).
modf(3M) modf(3M) NAME modf( ) - decompose floating-point number SYNOPSIS #include double modf(double x, double *iptr); DESCRIPTION The modf() function breaks the argument x into integral and fractional parts, each of which has the same sign as the argument. It stores the integral part as a double in the object pointed to by iptr. To use this function, make sure your program includes , and link in the math library by specifying -lm on the compiler or linker command line.
monitor(3C) monitor(3C) NAME monitor( ) - prepare execution profile SYNOPSIS #include void monitor( void (*lowpc)(), void (*highpc)(), WORD *buffer, int bufsize, int nfunc ); DESCRIPTION An executable program created by cc -p automatically includes calls for monitor() with default parameters; monitor() need not be called explicitly except to gain fine control over profiling. monitor() is an interface to profil(2).
mount(3N) mount(3N) NAME mount - keep track of remotely mounted file systems SYNOPSIS #include
mount(3N) mount(3N) char *ml_path; struct mountlist *ml_nxt; }; struct fhstatus { int fhs_status; fhandle_t fhs_fh; }; /* * List of exported directories * An export entry with ex_groups * NULL indicates an entry which is exported to the world.
move(3X) move(3X) (CURSES) NAME move, wmove — window cursor location functions SYNOPSIS #include int move(int y, int x); int wmove(WINDOW *win, int y, int x); DESCRIPTION The move() and wmove() functions move the cursor associated with the current or specified window to (y, x) relative to the window’s origin. This function does not move the terminal’s cursor until the next refresh operation. RETURN VALUE Upon successful completion, these functions return OK. Otherwise, they return ERR.
multibyte(3C) multibyte(3C) NAME mblen( ), mbtowc( ), mbstowcs( ), wctomb( ), wcstombs( ) - multibyte characters and strings conversions SYNOPSIS #include
multibyte(3C) multibyte(3C) character is converted as if by a call to mbtowc() . No more than n elements are modified in the array pointed to by pwcs. If an invalid multibyte character is encountered, mbstowcs() returns (size_t) − 1. Otherwise, mbstowcs() returns the number of array elements modified, not including a terminating zero code, if any. The array is not null- or zero-terminated if the value returned is n.
mvcur(3X) mvcur(3X) (ENHANCED CURSES) NAME mvcur — output cursor movement commands to the terminal SYNOPSIS #include int mvcur(int oldrow, int oldcol, int newrow, int newcol); DESCRIPTION The mvcur() function outputs one or more commands to the terminal that move the terminal’s cursor to (newrow, newcol), an absolute position on the terminal screen. The (oldrow, oldcol) arguments specify the former cursor position.
mvderwin(3X) mvderwin(3X) (ENHANCED CURSES) NAME mvderwin — define window coordinate transformation SYNOPSIS #include int mvderwin(WINDOW *win, int par_y, int par_x); DESCRIPTION The mvderwin() function specifies a mapping of characters. The function identifies a mapped area of the parent of the specified window, whose size is the same as the size of the specified window and whose origin is at (par_y, par_x) of the parent window.
mvprintw(3X) mvprintw(3X) (CURSES) NAME mvprintw, mvwprintw, printw, wprintw — print formatted output in window SYNOPSIS #include int mvprintw(int y, int x, char *fmt, ...); int mvwprintw(WINDOW *win, int y, int x, char *fmt, ...); int printw(char *fmt, ...); int wprintw(WINDOW *win, char *fmt, ...); DESCRIPTION The mvprintw() , mvwprintw() , printw() and wprintw() functions are analogous to printf() .
mvscanw(3X) mvscanw(3X) (CURSES) NAME mvscanw, mvwscanw, scanw, wscanw — convert formatted input from a window SYNOPSIS #include int mvscanw(int y, int x, char *fmt, ...); int mvwscanw(WINDOW *win, int y, int x, char *fmt, ...); int scanw(char *fmt, ...); int wscanw(WINDOW *win, char *fmt, ...); DESCRIPTION These functions are similar to scanf() .
mvwin(3X) mvwin(3X) (CURSES) NAME mvwin — move window SYNOPSIS #include int mvwin(WINDOW *win, int y, int x); DESCRIPTION The mvwin() function moves the specified window so that its origin is at position (y, x). If the move would cause any portion of the window to extend past any edge of the screen, the function fails and the window is not moved. RETURN VALUE Upon successful completion, mvwin() returns OK. Otherwise, it returns ERR. ERRORS No errors are defined.
(Notes) (Notes) m Section 3−−572 Hewlett-Packard Company −1− HP-UX 11i Version 1: September 2005