zoslib
z/OS C/C++ Library
Loading...
Searching...
No Matches
Functions
zos-io.h File Reference
#include "zos-macros.h"
#include <stdarg.h>
#include <sys/types.h>

Go to the source code of this file.

Functions

__Z_EXPORT int dprintf (int fd, const char *,...)
 
__Z_EXPORT int vdprintf (int fd, const char *, va_list ap)
 
__Z_EXPORT void __dump (int fd, const void *addr, size_t len, size_t bw)
 
__Z_EXPORT void __dump_title (int fd, const void *addr, size_t len, size_t bw, const char *,...)
 
__Z_EXPORT void __console (const void *p_in, int len_i)
 
__Z_EXPORT int __console_printf (const char *fmt,...)
 
__Z_EXPORT int __find_file_in_path (char *out, int size, const char *envvar, const char *file)
 
__Z_EXPORT int __chgfdccsid (int fd, unsigned short ccsid)
 
__Z_EXPORT int __chgfdcodeset (int fd, char *codeset)
 
__Z_EXPORT int __setfdtext (int fd)
 
__Z_EXPORT int __setfdbinary (int fd)
 
__Z_EXPORT int __disableautocvt (int fd)
 
__Z_EXPORT int __copyfdccsid (int sourcefd, int destfd)
 
__Z_EXPORT int __getfdccsid (int fd)
 
__Z_EXPORT int __setfdccsid (int fd, int t_ccsid)
 
__Z_EXPORT int __getLogMemoryFileNo ()
 
__Z_EXPORT void __memprintf (const char *format,...)
 

Function Documentation

◆ __chgfdccsid()

__Z_EXPORT int __chgfdccsid ( int  fd,
unsigned short  ccsid 
)

Change file descriptor to CCSID.

Parameters
[in]fdfile descriptor.
[in]ccsidCCSID.
Returns
returns 0 if successful, or -1 on failure.

◆ __chgfdcodeset()

__Z_EXPORT int __chgfdcodeset ( int  fd,
char *  codeset 
)

Change file descriptor to CCSID from a codeset

Parameters
[in]fdfile descriptor.
[in]codesetcode set
Returns
returns 0 if successful, or -1 on failure.

◆ __console()

__Z_EXPORT void __console ( const void *  p_in,
int  len_i 
)

Print given buffer to MVS Console.

◆ __console_printf()

__Z_EXPORT int __console_printf ( const char *  fmt,
  ... 
)

Print formatted data to MVS Console.

◆ __copyfdccsid()

__Z_EXPORT int __copyfdccsid ( int  sourcefd,
int  destfd 
)

Copy ccsid from source fd to destination fd

Parameters
[in]sourcefdfile descriptor.
[in]destfdfile descriptor.
Returns
returns 0 if successful, or -1 on failure.

◆ __disableautocvt()

__Z_EXPORT int __disableautocvt ( int  fd)

Disable auto-conversion on file descriptors

Parameters
[in]fdfile descriptor.
Returns
returns 0 if successful, or -1 on failure.

◆ __dump()

__Z_EXPORT void __dump ( int  fd,
const void *  addr,
size_t  len,
size_t  bw 
)

Dump to console.

◆ __dump_title()

__Z_EXPORT void __dump_title ( int  fd,
const void *  addr,
size_t  len,
size_t  bw,
const char *  format,
  ... 
)

Dump title to console.

◆ __find_file_in_path()

__Z_EXPORT int __find_file_in_path ( char *  out,
int  size,
const char *  envvar,
const char *  file 
)

Finds file in a given path

Parameters
[out]outFound path string
[in]sizeMax size of path string
[in]envarEnvironment variable to search
[in]filefile to search
Returns
returns non-zero if successful, 0 if not found.

◆ __getfdccsid()

__Z_EXPORT int __getfdccsid ( int  fd)

Get file descriptor CCSID.

Parameters
[in]fdfile descriptor.
Returns
returns file descriptors ccsid.

◆ __getLogMemoryFileNo()

__Z_EXPORT int __getLogMemoryFileNo ( )

Returns the fileno to which memory diagnostics is written (use for instance in a __display_backtrace(__getLogMemoryFileNo()); call).

◆ __memprintf()

__Z_EXPORT void __memprintf ( const char *  format,
  ... 
)

Logs memory allocation and release to the file name specified in the environment variable zoslib_config_t.MEMORY_USAGE_LOG_FILE_ENVAR.

Parameters
[in]sameas C's printf() parameters

◆ __setfdbinary()

__Z_EXPORT int __setfdbinary ( int  fd)

Change file descriptor to binary

Parameters
[in]fdfile descriptor.
Returns
returns 0 if successful, or -1 on failure.

◆ __setfdccsid()

__Z_EXPORT int __setfdccsid ( int  fd,
int  t_ccsid 
)

Set file descriptor to the provided CCSID.

Parameters
[in]fdfile descriptor.
[in]t_ccsidCCSID.
Returns
returns 0 if successful, or -1 on failure.

◆ __setfdtext()

__Z_EXPORT int __setfdtext ( int  fd)

Change file descriptor to text (819 or controlled via envar)

Parameters
[in]fdfile descriptor.
Returns
returns 0 if successful, or -1 on failure.

◆ dprintf()

__Z_EXPORT int dprintf ( int  fd,
const char *  fmt,
  ... 
)

Debug Printf.

Returns
returns total number of bytes written to file descriptor

◆ vdprintf()

__Z_EXPORT int vdprintf ( int  fd,
const char *  fmt,
va_list  ap 
)

Variadic Debug Printf.

Returns
returns total number of bytes written to file descriptor