*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> st_strerror (3)              
Title
Content
Arch
Section
 

st_strerror(3)

Contents


NAME    [Toc]    [Back]

       st_strerror - translate a libst return code to a printable
       error message

SYNOPSIS    [Toc]    [Back]

       #include <st.h>

       st_status_t st_strerror(
               st_status_t errcode,
               char *buf,
               int buflen );

LIBRARY    [Toc]    [Back]

       Symbol Table and Object File Access Library (libst.a)

PARAMETERS    [Toc]    [Back]

       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  copy  a  printable
       error  message string.  Specifies the size in bytes of the
       memory region addressed by the buf parameter.

DESCRIPTION    [Toc]    [Back]

       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    [Toc]    [Back]

       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    [Toc]    [Back]

       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\n",
       errmsg);
             exit(1); }

       ...


FILES    [Toc]    [Back]

       Header  file  that  contains  definitions (including error
       codes) and function prototypes for libst.a functions

SEE ALSO    [Toc]    [Back]

      
      
       Functions: libst_intro(3), st_obj_open(3)



                                                   st_strerror(3)
[ Back ]
 Similar pages
Name OS Title
gai_strerror Tru64 Print an error message string based on a return code from the getaddrinfo or getnameinfo routine
gss_get_mic HP-UX calculate a cryptographic message integrity code (MIC) for a message and return in a token
strerror Linux return string describing error code
tt_error_int HP-UX return an integer error object that encodes the code
tt_error_pointer HP-UX return a pointer to an error object that encodes the code
st_class_str Tru64 translate symbol table codes to printable strings
st_type_str Tru64 translate symbol table codes to printable strings
st_lang_str Tru64 translate symbol table codes to printable strings
find2perl Linux translate find command lines to Perl code
find2perl OpenBSD translate find command lines to Perl code
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service