X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=lib%2Fbtowc.c;fp=lib%2Fbtowc.c;h=0000000000000000000000000000000000000000;hb=3322ff6164a1e9dd3d1622c64a9b9b7c5f303ef6;hp=7f3b9663c4f261ece2ce3ff4db8bd3a6d7a99876;hpb=d73c4937b8f7712f6eb78774fa9711b701b419fd;p=tar diff --git a/lib/btowc.c b/lib/btowc.c deleted file mode 100644 index 7f3b966..0000000 --- a/lib/btowc.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Convert unibyte character to wide character. - Copyright (C) 2008 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include - -wint_t -btowc (int c) -{ - if (c != EOF) - { - char buf[1]; - wchar_t wc; - - buf[0] = c; - if (mbtowc (&wc, buf, 1) >= 0) - return wc; - } - return WEOF; -}