diff --git a/lib/libc/locale/big5.c b/lib/libc/locale/big5.c index 9294f0c0c2c6..b8628ddcfd94 100644 --- a/lib/libc/locale/big5.c +++ b/lib/libc/locale/big5.c @@ -32,9 +32,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ -#ifdef XPG4 #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)big5.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ @@ -117,4 +118,3 @@ _BIG5_sputrune(c, string, n, result) return (0); } -#endif /* XPG4 */ diff --git a/lib/libc/locale/euc.c b/lib/libc/locale/euc.c index ea5cdb483455..3c8101235d56 100644 --- a/lib/libc/locale/euc.c +++ b/lib/libc/locale/euc.c @@ -32,9 +32,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ -#ifdef XPG4 #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)euc.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ @@ -220,4 +221,3 @@ _EUC_sputrune(c, string, n, result) } return (len); } -#endif /* XPG4 */ diff --git a/lib/libc/locale/mskanji.c b/lib/libc/locale/mskanji.c index bce27fe43386..6c3199ebbfa3 100644 --- a/lib/libc/locale/mskanji.c +++ b/lib/libc/locale/mskanji.c @@ -29,9 +29,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ -#ifdef XPG4 #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)mskanji.c 1.0 (Phase One) 5/5/95"; #endif /* LIBC_SCCS and not lint */ @@ -104,4 +105,3 @@ _MSKanji_sputrune(c, string, n, result) } return len; } -#endif /* XPG4 */ diff --git a/lib/libc/locale/runetype.c b/lib/libc/locale/runetype.c index 282f806c2466..dde54a4ca768 100644 --- a/lib/libc/locale/runetype.c +++ b/lib/libc/locale/runetype.c @@ -32,6 +32,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #include @@ -41,7 +43,6 @@ unsigned long ___runetype(c) _BSD_CT_RUNE_T_ c; { -#ifdef XPG4 int x; _RuneRange *rr = &_CurrentRuneLocale->runetype_ext; _RuneEntry *re = rr->ranges; @@ -59,6 +60,6 @@ ___runetype(c) return(re->map); } } -#endif + return(0L); } diff --git a/lib/libc/locale/setlocale.c b/lib/libc/locale/setlocale.c index 179be54325fc..f5f5fae472cb 100644 --- a/lib/libc/locale/setlocale.c +++ b/lib/libc/locale/setlocale.c @@ -96,10 +96,6 @@ static int stub_load_locale __P((const char *)); extern int __time_load_locale __P((const char *)); /* strftime.c */ -#ifdef XPG4 -extern int _xpg4_setrunelocale __P((char *)); -#endif - char * setlocale(category, locale) int category; @@ -243,18 +239,10 @@ loadlocale(category) return (old); if (category == LC_CTYPE) { -#ifdef XPG4 - ret = _xpg4_setrunelocale(new) ? NULL : new; -#else ret = setrunelocale(new) ? NULL : new; -#endif - if (!ret) { -#ifdef XPG4 - (void)_xpg4_setrunelocale(old); -#else + if (!ret) (void)setrunelocale(old); -#endif - } else + else (void)strcpy(old, new); return (ret); } diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c index 8cfddabdd26a..55d6ba90b566 100644 --- a/lib/libc/locale/setrunelocale.c +++ b/lib/libc/locale/setrunelocale.c @@ -32,6 +32,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #include @@ -44,31 +46,15 @@ #include "setlocale.h" extern int _none_init __P((_RuneLocale *)); -#ifdef XPG4 extern int _UTF2_init __P((_RuneLocale *)); extern int _EUC_init __P((_RuneLocale *)); extern int _BIG5_init __P((_RuneLocale *)); extern int _MSKanji_init __P((_RuneLocale *)); -extern int _xpg4_setrunelocale __P((char *)); -#endif extern _RuneLocale *_Read_RuneMagi __P((FILE *)); -#ifdef XPG4 int setrunelocale(encoding) char *encoding; -{ - return _xpg4_setrunelocale(encoding); -} -#endif - -int -#ifndef XPG4 -setrunelocale(encoding) -#else -_xpg4_setrunelocale(encoding) -#endif - char *encoding; { FILE *fp; char name[PATH_MAX]; @@ -117,23 +103,18 @@ _xpg4_setrunelocale(encoding) } fclose(fp); -#ifdef XPG4 - if (!rl->encoding[0] || !strcmp(rl->encoding, "UTF2")) - return(_UTF2_init(rl)); -#else if (!rl->encoding[0]) return(EINVAL); -#endif else if (!strcmp(rl->encoding, "NONE")) return(_none_init(rl)); -#ifdef XPG4 + else if (!strcmp(rl->encoding, "UTF2")) + return(_UTF2_init(rl)); else if (!strcmp(rl->encoding, "EUC")) return(_EUC_init(rl)); else if (!strcmp(rl->encoding, "BIG5")) return(_BIG5_init(rl)); else if (!strcmp(rl->encoding, "MSKanji")) return(_MSKanji_init(rl)); -#endif else return(EINVAL); } diff --git a/lib/libc/locale/table.c b/lib/libc/locale/table.c index 2fe979cd32c8..1c81e80535f6 100644 --- a/lib/libc/locale/table.c +++ b/lib/libc/locale/table.c @@ -49,7 +49,7 @@ extern int _none_init __P((char *, char **)); _RuneLocale _DefaultRuneLocale = { _RUNE_MAGIC_1, - "none", + "NONE", _none_sgetrune, _none_sputrune, 0xFFFD, diff --git a/lib/libc/locale/tolower.c b/lib/libc/locale/tolower.c index 65d5175a7b3c..d9cbd6f6556e 100644 --- a/lib/libc/locale/tolower.c +++ b/lib/libc/locale/tolower.c @@ -32,6 +32,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #include @@ -41,7 +43,6 @@ _BSD_CT_RUNE_T_ ___tolower(c) _BSD_CT_RUNE_T_ c; { -#ifdef XPG4 int x; _RuneRange *rr = &_CurrentRuneLocale->maplower_ext; _RuneEntry *re = rr->ranges; @@ -55,6 +56,6 @@ ___tolower(c) if (c <= re->max) return(re->map + c - re->min); } -#endif + return(c); } diff --git a/lib/libc/locale/toupper.c b/lib/libc/locale/toupper.c index d2e4480d8fad..d01104b002b8 100644 --- a/lib/libc/locale/toupper.c +++ b/lib/libc/locale/toupper.c @@ -32,6 +32,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #include @@ -41,7 +43,6 @@ _BSD_CT_RUNE_T_ ___toupper(c) _BSD_CT_RUNE_T_ c; { -#ifdef XPG4 int x; _RuneRange *rr = &_CurrentRuneLocale->mapupper_ext; _RuneEntry *re = rr->ranges; @@ -55,6 +56,6 @@ ___toupper(c) if (c <= re->max) return(re->map + c - re->min); } -#endif + return(c); } diff --git a/lib/libc/locale/utf2.c b/lib/libc/locale/utf2.c index 52b4cad0f40f..81a9412b74e2 100644 --- a/lib/libc/locale/utf2.c +++ b/lib/libc/locale/utf2.c @@ -32,9 +32,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ -#ifdef XPG4 #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)utf2.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ @@ -147,4 +148,3 @@ _UTF2_sputrune(c, string, n, result) return (1); } } -#endif /* XPG4 */