* Makefile.in: add miscfuncs.cc

* miscfuncs.cc: new, miscellaneous functions
* winsup.h: define table-driven tolower/toupper
* environ.cc: use them
* fhandler_console.cc: ditto
* fhandler_termios: ditto
* path.cc: ditto
(strncasematch, strcasematch, strcasestr): move to miscfuncs.cc
This commit is contained in:
DJ Delorie
2000-10-19 03:12:44 +00:00
parent cc55c579a3
commit 2556e737ec
8 changed files with 144 additions and 105 deletions

View File

@@ -354,7 +354,7 @@ ucenv (char *p, char *eq)
we only do it for the first process in a session group. */
for (; p < eq; p++)
if (islower (*p))
*p = toupper (*p);
*p = cyg_toupper (*p);
}
/* Parse CYGWIN options */
@@ -538,8 +538,8 @@ environ_init (char **envp, int envc)
{
for (int i = 0; conv_envvars[i].name != NULL; i++)
{
conv_start_chars[tolower(conv_envvars[i].name[0])] = 1;
conv_start_chars[toupper(conv_envvars[i].name[0])] = 1;
conv_start_chars[cyg_tolower(conv_envvars[i].name[0])] = 1;
conv_start_chars[cyg_toupper(conv_envvars[i].name[0])] = 1;
}
initted = 1;
}