Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

st_type_str(3) [osf1 man page]

st_lang_str(3)						     Library Functions Manual						    st_lang_str(3)

NAME
st_lang_str, st_type_str, st_class_str - Translate symbol table codes to printable strings. LIBRARY
Symbol Table and Object File Access Library (libst.a) SYNOPSIS
#include <st.h> st_status_t st_lang_str ( st_obj_t *obj, st_file_t file, char *buf, int buflen); st_status_t st_type_str ( st_obj_t *obj, unsigned int type, char *buf, int buflen); st_status_t st_class_str ( st_obj_t *obj, unsigned int sym_class, char *buf, int buflen); PARAMETERS
Specifies an object handle, as returned by the st_obj_open function. Specifies an address to which these functions will copy a printable string. Specifies the size in bytes of the memory region addressed by the buff parameter. Specifies the handle of a file within the spec- ified object (for example, the handle returned by st_obj_file_start). Specifies the type of a symbol, as returned by st_sym_type. Speci- fies the storage class of a symbol, as returned by st_sym_class. DESCRIPTION
These functions are used to get a printable string corresponding to an encoded value in an object file's symbol table. The st_lang_str function determines the source language for a file. The st_type_str and st_class_str functions translate type and class values, respec- tively, to their printable form. The buff parameter identifies an area of memory to which the st_lang_str, st_type_str, and st_class_str functions copy a printable string. If the printable string exceeds the size specified by the buflen parameter, these functions truncate the printable string. 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. Return parameters are set to 0 or -1 when an error occurs. Address parameters are set to 0, and file and procedure handles are set to -1. An exception to this is if a NULL pointer for the object or other return parameter is input. In these cases, the return parameters will be unchanged. A non-zero return status is the recommended method for detecting an error return from a libst function. FILES
Header file that contains definitions and function prototypes for libst.a functions RELATED INFORMATION
Functions: libst_intro(3), st_obj_open(3), st_obj_file_start(3), st_sym_type(3), st_sym_class(3) delim off st_lang_str(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