hbase

heirloom base
git clone git://git.2f30.org/hbase
Log | Files | Refs | README

mbtowi.h (408B)


      1 /*	Sccsid @(#)mbtowi.h	1.2 (gritter) 7/16/04	*/
      2 
      3 #ifndef	LIBCOMMON_MBTOWI_H
      4 #define	LIBCOMMON_MBTOWI_H
      5 
      6 static
      7 #if defined (__GNUC__) || defined (__USLC__) || defined (__INTEL_COMPILER) || \
      8 		defined (__IBMC__) || defined (__SUNPRO_C)
      9 	inline
     10 #endif
     11 	int
     12 mbtowi(wint_t *pwi, const char *s, size_t n)
     13 {
     14 	wchar_t	wc;
     15 	int	i;
     16 
     17 	i = mbtowc(&wc, s, n);
     18 	*pwi = wc;
     19 	return i;
     20 }
     21 
     22 #endif	/* !LIBCOMMON_MBTOWI_H */