Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ st_lang_str(3) — Tru64 UNIX 5.1b

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

libst_intro(3)

st_obj_open(3)

st_obj_file_start(3)

st_sym_type(3)

st_sym_class(3)

st_lang_str(3)  —  Subroutines

NAME

st_lang_str, st_type_str, st_class_str − translate symbol table codes to printable strings

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

objSpecifies an object handle, as returned by the st_obj_open() function. 

bufSpecifies an address to which these functions will copy a printable string. 

buflen
Specifies the size in bytes of the memory region addressed by the buf parameter. 

fileSpecifies the handle of a file within the specified object, for example, the handle returned by st_obj_file_start(). 

typeSpecifies the type of a symbol, as returned by st_sym_type(). 

sym_class
Specifies 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, respectively, to their printable form. 

The buf 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 nonzero return status is the recommended method for detecting an error return from a libst function. 

FILES

/usr/include/st.h
Header file that contains definitions and function prototypes for libst.a functions

SEE ALSO

Functions: libst_intro(3), st_obj_open(3), st_obj_file_start(3), st_sym_type(3), st_sym_class(3)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026