Chapter Contents |
Previous |
Next |
htoncs |
Portability: | SAS/C extension |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
PORTABILITY | |
IMPLEMENTATION | |
RELATED FUNCTIONS |
SYNOPSIS |
#include <lclib.h> int htoncs(int hostchar);
The synopsis for network use is as follows:
#include <sys/types.h> #include <netinet/in.h> int htoncs(int hostchar);
DESCRIPTION |
htoncs
converts a single EBCDIC character
hostchar
to an ASCII character. High-order bits will be ignored in
the input parameter. The name of this function, an abbreviation of "host
to network character set," is analogous to the
htonl
and
htons
functions. ASCII is the predominant character set for text on TCP/IP networks,
while EBCDIC is the predominant character set for text on OS/390 and CMS systems.
The
htoncs
function is provided to facilitate the writing of TCP/IP programs
on OS/390 and CMS systems. You may find that other EBCDIC-to-ASCII translation
routines are better suited to your requirements.
RETURN VALUE |
htoncs
returns the ASCII character corresponding to the input argument
interpreted as an EBCDIC character.
PORTABILITY |
htoncs
is not portable; character set translation is seldom required
in other environments.
IMPLEMENTATION |
RELATED FUNCTIONS |
htonl
,
htons
,
ntohcs
,
ntohl
,
ntohs
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.