xref: /illumos-gate/usr/src/man/man3c/euclen.3c (revision b02947bf393d39f68e6c7fa8ccb98688f7f9c407)
te
Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
EUCLEN 3C "Dec 20, 1996"
NAME
euclen, euccol, eucscol - get byte length and display width of EUC characters
SYNOPSIS

#include <euc.h>

int euclen(const unsigned char *s);

int euccol(const unsigned char *s);

int eucscol(const unsigned char *str);
DESCRIPTION

The euclen() function returns the length in bytes of the Extended Unix Code (EUC) character pointed to by s, including single-shift characters, if present.

The euccol() function returns the screen column width of the EUC character pointed to by s.

The eucscol() function returns the screen column width of the EUC string pointed to by str.

For the euclen() and euccol(), functions, s points to the first byte of the character. This byte is examined to determine its codeset. The character type table for the current locale is used for codeset byte length and display width information.

USAGE

These functions will work only with EUC locales.

These functions can be used safely in multithreaded applications, as long as setlocale(3C) is not called to change the locale.

ATTRIBUTES

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
MT-Level MT-Safe with exceptions
SEE ALSO

getwidth (3C), setlocale (3C), attributes (7)