Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference (Volume 6 of 9): Section 3: Library Functions (A-M) > b

btowc(3C)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

btowc(), wctob() — conversion between single-byte and wide-character

SYNOPSIS

#include <stdio.h> #include <wchar.h> wint_t btowc(int c); int wctob(wint_t c);

DESCRIPTION

btowc()

The btowc() function determines whether c constitutes a valid (one-byte) character in the initial shift state.

wctob()

The wctob() function determines whether c corresponds to a member of the extended character set whose character representation is a single byte when in the initial shift state.

APPLICATION USAGE

btowc() and wctob() are thread-safe.

EXTERNAL INFLUENCES

locale

The behavior of these functions is affected by the LC_CTYPE category.

RETURN VALUE

The btowc() function returns WEOF if c has the value EOF or if c as an unsigned character does not constitute a valid (one-byte) character in the initial shift state. Otherwise, it returns the wide-character representation of that character.

The wctob() function returns EOF if c does not correspond to a character with length one in the initial shift state. Otherwise, it returns the single-byte representation of that character.

ERRORS

No errors are defined.

AUTHOR

btowc() was developed by HP and Mitsubishi Electric Corp.

SEE ALSO

None.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2000 Hewlett-Packard Development Company, L.P.