From 077ec4cb37134f2e90dd282ce9c6e496052e35e5 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 8 Jan 2001 04:02:02 +0000 Subject: * pinfo.cc (codepage_init): Move function. * environ.cc (codepage_init): To here. * exceptoins.cc (SIG_NONMASKABLE): Remove SIGCONT from consideration since it is supposed to be maskable. * signal.cc (sigaction): Ditto. * sigproc.cc (wait_sig): Ditto. * winsup.h: Eliminate global declaration of codepage_init. --- winsup/cygwin/environ.cc | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/environ.cc') diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 09d8195ee..1e160b50e 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -1,7 +1,7 @@ /* environ.cc: Cygwin-adopted functions from newlib to manipulate process's environment. - Copyright 1997, 1998, 1999, 2000 Red Hat, Inc. + Copyright 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for @@ -393,6 +393,30 @@ glob_init (const char *buf) } } +static void +codepage_init (const char *buf) +{ + if (!buf || !*buf) + return; + + if (strcmp (buf, "oem")== 0 ) + { + current_codepage = oem_cp; + SetFileApisToOEM (); + debug_printf ("File APIs set to OEM" ); + } + else if (strcmp (buf, "ansi")== 0 ) + { + current_codepage = ansi_cp; + SetFileApisToANSI (); + debug_printf ("File APIs set to ANSI" ); + } + else + { + debug_printf ("Wrong codepage name: %s", buf ); + } +} + /* The structure below is used to set up an array which is used to parse the CYGWIN environment variable or, if enabled, options from the registry. */ -- cgit v1.2.3