summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/environ.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/environ.cc')
-rw-r--r--winsup/cygwin/environ.cc26
1 files changed, 25 insertions, 1 deletions
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. */