TNS/R Native Application Migration Guide

C and C++ Migration Tasks
TNS/R Native Application Migration Guide523745-001
3-10
Replacing Calls to Obsolete C Library
Supplementary Functions
memswap() Replace memswap() with a series of calls to memcpy() to
swap the blocks of memory using a temporary buffer. The
order and type of parameters for these two functions are
different.
movmem() Replace movmem() with a call to memmove(). The order and
type of parameters for these two functions are different.
repmem() Replace repmen() with a series of calls to memcpy() to
copy the block of memory the required number of times. The
order and type of parameters for these two functions are
different.
setmem() Replace setmem() with a call to memset(). The order and
type of parameters for these two functions are different.
setnbuf() Replace setnbuf() with a call to setbuf() with a buffer
parameter set to NULL.
stcarg() Replace stcarg() with a call to strcspn(). The return
values for these two functions are different.
stccpy() Replace stccpy() with a call to strncpy(). The type of
parameters and the return value for these two functions are
different.
stcd_i() Replace stcd_i() with a call to strtol(). The order and
type of parameters and the return value for these two functions
are different.
stcd_l() Replace stcd_l() with a call to strtol(). The order and
type of parameters and the return value for these two functions
are different.
stch_i() Replace stch_i() with a call to strtol(). The order and
type of parameters and the return value for these two functions
are different.
stci_d() Replace stci_d() with a call to sprintf() with a %d
conversion specifier.
stcis() Replace stcis() with a call to strspn().
stcisn() Replace stcisn() with a call to strcspn().
stclen() Replace stclen() with a call to strlen().
stcpm() Replace stcpm() with a call to strstr(). The order and
type of parameters and the return value for these two functions
are different. Additional code might be required to support
pattern matching.
stcpma() Replace stcpma() with a call to strstr(). The order and
type of parameters and the return value for these two functions
are different. Additional code might be required to support
pattern matching.
Table 3-1. Obsolete C Supplementary Functions (page 2 of 3)
Obsolete Function Suggested Replacement