1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-22 18:35:09 +00:00

(main): Treat command line options as case-insensitive.

This commit is contained in:
Geoff Voelker 1998-10-06 02:59:27 +00:00
parent 850b7aa7a2
commit 1d7d10d1fc

View File

@ -496,21 +496,21 @@ main (int argc, char ** argv)
passed on to real shell if used (only really of benefit for
interactive use, but allow for batch use as well). Accept / as
switch char for compatability with cmd.exe. */
if ( ((*argv)[0] == '-' || (*argv)[0] == '/') && (*argv)[1] != '\0' )
if (((*argv)[0] == '-' || (*argv)[0] == '/') && (*argv)[1] != '\0')
{
if ( ((*argv)[1] == 'c') && ((*argv)[2] == '\0') )
if (((*argv)[1] == 'c' || (*argv)[1] == 'C') && ((*argv)[2] == '\0'))
{
if (--argc == 0)
fail ("error: expecting arg for %s\n", *argv);
cmdline = *(++argv);
interactive = FALSE;
}
else if ( ((*argv)[1] == 'i') && ((*argv)[2] == '\0') )
else if (((*argv)[1] == 'i' || (*argv)[1] == 'I') && ((*argv)[2] == '\0'))
{
if (cmdline)
warn ("warning: %s ignored because of -c\n", *argv);
}
else if ( ((*argv)[1] == 'e') && ((*argv)[2] == ':') )
else if (((*argv)[1] == 'e' || (*argv[1] == 'E')) && ((*argv)[2] == ':'))
{
int requested_envsize = atoi (*argv + 3);
/* Enforce a reasonable minimum size, as above. */