Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

st_get_version_byname(3) [osf1 man page]

st_get_known_versions(3)				     Library Functions Manual					  st_get_known_versions(3)

NAME
st_get_known_versions, st_get_format_versions, st_mem_get_format_versions, st_get_version_byname, st_mem_get_version_byname, st_fd_get_ver- sion_byname - Access version information in an object file LIBRARY
Symbol Table and Object File Access Library (libst.a) SYNOPSIS
#include <st.h> st_status_t st_get_known_versions ( unsigned short *objver, unsigned short *symver); st_status_t st_get_format_versions ( char *objname, unsigned short *objver, unsigned short *symver); st_status_t st_mem_get_format_versions ( void *addr, unsigned short *objver, unsigned short *symver); st_status_t st_get_version_byname ( char *objname, char *toolname, unsigned long *toolver, char **verstring); st_status_t st_mem_get_version_byname ( void *addr, unsigned long size, char *toolname, unsigned long *toolver, char **verstring); st_status_t st_fd_get_version_byname ( int fd, off_t pos, char *toolname, unsigned long *toolver, char **verstring); PARAMETERS
Name of file to be opened Object file version stamp Symbol table version stamp Address of file in memory Identifier of tool version entry Numeric tool version from toolname's entry Printable tool version from toolname's entry DESCRIPTION
These functions access version information in an object file. The st_get_known_versions routine returns the version stamp values (from the file /usr/include/stamp.h) that libst.a was built with. The st_get_format_versions and st_mem_get_format_versions retrieve the object file and symbol table version stamps from a given object file. Use st_mem_get_format_versions if the contents of the object have been memory- mapped or read into memory and st_get_format_versions otherwise. The st_get_version_byname, st_mem_get_version_byname, and st_fd_get_version_byname routines search the .comment section for a tool-specific version entry for the tool identified by the toolname parameter. Tool-specific versions are typically recorded only for system utilities. Use st_fd_get_version_byname for a file that has already been opened, st_mem_get_version_byname for a file that has been read into memory, and st_get_version_byname otherwise. The caller is responsible for freeing the verstring parameter after a successful call; space for this character string is dynamically allocated by these libst functions. RETURN VALUES
All routines return zero to indicate success and non-zero to indicate failure. RELATED INFORMATION
libst_intro(3), st_obj_open(3) delim off st_get_known_versions(3)

Check Out this Related Man Page

st_strerror(3)						     Library Functions Manual						    st_strerror(3)

NAME
st_strerror - Translate a libst return code to a printable error message. LIBRARY
Symbol Table and Object File Access Library (libst.a) SYNOPSIS
#include <st.h> st_status_t st_strerror ( st_status_t errcode, char *buf, int buflen); PARAMETERS
Status code returned by a function defined in the symbol table and object file access library (libst.a). Specifies an address to which st_strerror will a printable error message string. Specifies the size in bytes of the memory region addressed by the buf parameter. DESCRIPTION
The st_strerror function translates a libst error code to a printable error message and copies that error message to the memory region addressed by the buf parameter. If the error message exceeds the size in bytes of the memory region specified by the buflen parameter, st_strerror will truncate the error message. The error codes recognized and translated by the st_strerror function are defined in /usr/include/st.h. RETURN VALUES
All functions indicate success by returning a value of 0 (zero). A positive return value is an errno value from a system call. A negative return value is a library error or informational code. The library codes are documented in st.h. EXAMPLE
This code fragment illustrates how to use st_strerror to report an error returned by a libst routine. #include <st.h> ... st_obj_t *obj; st_status_t status; char *objname char errmsg[128]; ... if (status = st_obj_open(&obj, objname, ST_RDWR)) { st_strerror(status, errmsg, sizeof(errmsg)); fprintf(stderr, "st_obj_open failure: %s ", errmsg); exit(1); } ... FILES
Header file that contains definitions (including error codes) and function prototypes for libst.a functions RELATED INFORMATION
Functions: libst_intro(3), st_obj_open(3) delim off st_strerror(3)
Man Page