ambsntowcs man page on MirBSD

Man page or keyword search:  
man Server   6113 pages
apropos Keyword Search (all sections)
Output format
MirBSD logo
[printable version]

AMBSTOWCS(3)		   BSD Programmer's Manual		  AMBSTOWCS(3)

NAME
     ambsntowcs, ambstowcs, awcsntombs, awcstombs - convert between multibyte
     and wide strings with allocation

SYNOPSIS
     #define _ALL_SOURCE
     #include <wchar.h>

     wchar_t *
     ambsntowcs(const char *s, size_t n);

     wchar_t *
     ambstowcs(const char *s);

     char *
     awcsntombs(const wchar_t *s, size_t n);

     char *
     awcstombs(const wchar_t *s);

DESCRIPTION
     The ambsntowcs() and ambstowcs() functions convert the NUL-terminated
     multibyte (MirOS OPTU-8 encoded) string s into a wide (MirOS OPTU-16
     encoded) string, requesting just enough storage via calloc(3) from the
     system to store the result, including a terminating WNUL character. The
     awcsntombs() and awcstombs() functions convert the WNUL-terminated wide
     (MirOS OPTU-16 encoded) string s into a multibyte (MirOS OPTU-8 encoded)
     string, requesting just enough storage via malloc(3) from the system to
     store the result, including a terminating NUL byte. The ambsntowcs() and
     awcsntombs() functions convert at most n characters; the ambstowcs() and
     awcstombs() functions convert the entire string.

RETURN VALUES
     ambsntowcs() and ambstowcs() return the newly allocated wide character
     string. awcsntombs() and awcstombs() return the newly allocated multibyte
     character string. Failure to allocate enough memory will terminate the
     calling programme, xmalloc style, with errorlevel 1 and an appropriate
     error message. Passing a NULL pointer results in undefined behaviour.

SEE ALSO
     mbsrtowcs(3), wcsrtombs(3)

HISTORY
     The ambsntowcs, ambstowcs, awcsntombs, and awcstombs functions are
     MirOS BSD extensions and first appeared in MirOS #11.

AUTHORS
     Thorsten Glaser <tg@mirbsd.de> wrote the entire internationalisation im-
     plementation in MirOS. He is also the steward for the OPTU encoding.

MirOS BSD #10-current	       August 13, 2009				     1
[top]

List of man pages available for MirBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net