1*da6c28aaSamw /* 2*da6c28aaSamw * CDDL HEADER START 3*da6c28aaSamw * 4*da6c28aaSamw * The contents of this file are subject to the terms of the 5*da6c28aaSamw * Common Development and Distribution License (the "License"). 6*da6c28aaSamw * You may not use this file except in compliance with the License. 7*da6c28aaSamw * 8*da6c28aaSamw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*da6c28aaSamw * or http://www.opensolaris.org/os/licensing. 10*da6c28aaSamw * See the License for the specific language governing permissions 11*da6c28aaSamw * and limitations under the License. 12*da6c28aaSamw * 13*da6c28aaSamw * When distributing Covered Code, include this CDDL HEADER in each 14*da6c28aaSamw * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*da6c28aaSamw * If applicable, add the following below this CDDL HEADER, with the 16*da6c28aaSamw * fields enclosed by brackets "[]" replaced with your own identifying 17*da6c28aaSamw * information: Portions Copyright [yyyy] [name of copyright owner] 18*da6c28aaSamw * 19*da6c28aaSamw * CDDL HEADER END 20*da6c28aaSamw */ 21*da6c28aaSamw /* 22*da6c28aaSamw * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23*da6c28aaSamw * Use is subject to license terms. 24*da6c28aaSamw */ 25*da6c28aaSamw 26*da6c28aaSamw #ifndef _SMBSRV_STRING_H 27*da6c28aaSamw #define _SMBSRV_STRING_H 28*da6c28aaSamw 29*da6c28aaSamw #pragma ident "%Z%%M% %I% %E% SMI" 30*da6c28aaSamw 31*da6c28aaSamw #include <sys/types.h> 32*da6c28aaSamw #include <smbsrv/smb_i18n.h> 33*da6c28aaSamw 34*da6c28aaSamw #ifdef __cplusplus 35*da6c28aaSamw extern "C" { 36*da6c28aaSamw #endif 37*da6c28aaSamw 38*da6c28aaSamw extern char *strsubst(char *, char, char); 39*da6c28aaSamw extern char *strsep(char **, const char *); 40*da6c28aaSamw extern char *strcanon(char *, const char *); 41*da6c28aaSamw 42*da6c28aaSamw extern char *utf8_strupr(char *); 43*da6c28aaSamw extern char *utf8_strlwr(char *); 44*da6c28aaSamw extern int utf8_isstrupr(const char *); 45*da6c28aaSamw extern int utf8_isstrlwr(const char *); 46*da6c28aaSamw extern int utf8_strcasecmp(const char *, const char *); 47*da6c28aaSamw extern int utf8_strncasecmp(const char *, const char *, int); 48*da6c28aaSamw extern int utf8_isstrascii(const char *); 49*da6c28aaSamw 50*da6c28aaSamw extern int smb_match(char *patn, char *str); 51*da6c28aaSamw extern int smb_match_ci(char *patn, char *str); 52*da6c28aaSamw extern int smb_match83(char *patn, char *str83); 53*da6c28aaSamw 54*da6c28aaSamw /* 55*da6c28aaSamw * Maximum number of bytes per multi-byte character. 56*da6c28aaSamw */ 57*da6c28aaSamw #define MTS_MB_CUR_MAX 3 58*da6c28aaSamw #define MTS_MB_CHAR_MAX MTS_MB_CUR_MAX 59*da6c28aaSamw 60*da6c28aaSamw size_t mts_mbstowcs(mts_wchar_t *, const char *, size_t); 61*da6c28aaSamw size_t mts_wcstombs(char *, const mts_wchar_t *, size_t); 62*da6c28aaSamw int mts_mbtowc(mts_wchar_t *, const char *, size_t); 63*da6c28aaSamw int mts_wctomb(char *, mts_wchar_t); 64*da6c28aaSamw 65*da6c28aaSamw size_t mts_wcequiv_strlen(const char *); 66*da6c28aaSamw size_t mts_sbequiv_strlen(const char *); 67*da6c28aaSamw 68*da6c28aaSamw int mts_stombs(char *, char *, int); 69*da6c28aaSamw int mts_mbstos(char *, const char *); 70*da6c28aaSamw 71*da6c28aaSamw #ifdef __cplusplus 72*da6c28aaSamw } 73*da6c28aaSamw #endif 74*da6c28aaSamw 75*da6c28aaSamw #endif /* _SMBSRV_STRING_H */ 76