diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-03-30 17:09:11 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-03-30 17:09:11 +0200 |
commit | 208c1a556654a5cc3a3fd5fcc500f70261fb084b (patch) | |
tree | 1a1a0112594a7939739b32e48bf370618f8eb812 /package/heirloom-cpio/src/mbtowi.h | |
parent | 113a0add9081f04a0dc1f11ae47eb11fbe6b5512 (diff) | |
parent | 44422107fcae7591bc9ee0ca54fa580160345e4a (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/heirloom-cpio/src/mbtowi.h')
-rw-r--r-- | package/heirloom-cpio/src/mbtowi.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/package/heirloom-cpio/src/mbtowi.h b/package/heirloom-cpio/src/mbtowi.h new file mode 100644 index 000000000..525ad08d1 --- /dev/null +++ b/package/heirloom-cpio/src/mbtowi.h @@ -0,0 +1,22 @@ +/* Sccsid @(#)mbtowi.h 1.2 (gritter) 7/16/04 */ + +#ifndef LIBCOMMON_MBTOWI_H +#define LIBCOMMON_MBTOWI_H + +static +#if defined (__GNUC__) || defined (__USLC__) || defined (__INTEL_COMPILER) || \ + defined (__IBMC__) || defined (__SUNPRO_C) + inline +#endif + int +mbtowi(wint_t *pwi, const char *s, size_t n) +{ + wchar_t wc; + int i; + + i = mbtowc(&wc, s, n); + *pwi = wc; + return i; +} + +#endif /* !LIBCOMMON_MBTOWI_H */ |