Assorted whitespace cleanup and typo fixes.
[haiku.git] / src / system / libroot / posix / locale / nl_langinfo.cpp
blobb48f6f56ed31245638b9c10069efa58b0df85be9
1 /*
2 * Copyright 2010, Oliver Tappe, zooey@hirschkaefer.de
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
7 #include <langinfo.h>
9 #include "LocaleBackend.h"
11 #include <PosixLanginfo.h>
14 using BPrivate::Libroot::gLocaleBackend;
15 using BPrivate::Libroot::gPosixLanginfo;
18 extern "C" char*
19 nl_langinfo(nl_item item)
21 if (item < 0 || item >= _NL_LANGINFO_LAST)
22 return const_cast<char*>("");
24 if (gLocaleBackend != NULL)
25 return const_cast<char*>(gLocaleBackend->GetLanginfo(item));
27 return const_cast<char*>(gPosixLanginfo[item]);