diff options
author | Christopher Faylor <me@cgf.cx> | 2001-01-08 04:02:02 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-01-08 04:02:02 +0000 |
commit | 077ec4cb37134f2e90dd282ce9c6e496052e35e5 (patch) | |
tree | d551c0b2fc0000d7a858d98afbd1c5d27ecb8ac1 /winsup/cygwin/environ.cc | |
parent | 10422a10ea57f189556171b00c691536512beaa0 (diff) | |
download | newlib-077ec4cb37134f2e90dd282ce9c6e496052e35e5.zip newlib-077ec4cb37134f2e90dd282ce9c6e496052e35e5.tar.gz newlib-077ec4cb37134f2e90dd282ce9c6e496052e35e5.tar.bz2 |
* 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.
Diffstat (limited to 'winsup/cygwin/environ.cc')
-rw-r--r-- | winsup/cygwin/environ.cc | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 09d8195..1e160b5 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. */ |