@@ -4425,9 +4425,6 @@ int main(int argc, const char *argv[], const char *envp[])
4425
4425
setenv ("COMCOM_VER" , version , 1 );
4426
4426
setenv ("ERRORLEVEL" , "0" , 1 );
4427
4427
4428
- if ((v = getenv ("COMCOM_MOUSE" )) && v [0 ] == '1' )
4429
- mouse_en = mouse_init ();
4430
-
4431
4428
// process arguments
4432
4429
for (a = 1 ; a < argc ; a ++ )
4433
4430
{
@@ -4464,11 +4461,28 @@ int main(int argc, const char *argv[], const char *envp[])
4464
4461
stepping = 1 ;
4465
4462
}
4466
4463
4467
- if (stricmp (argv [a ], "/M" ) == 0 && ! mouse_en )
4464
+ if (strnicmp (argv [a ], "/M" , 2 ) == 0 )
4468
4465
{
4469
- mouse_en = mouse_init ();
4470
- if (mouse_en )
4471
- setenv ("COMCOM_MOUSE" , "1" , 1 );
4466
+ int opt = 1 ;
4467
+ char copt [2 ];
4468
+ if (isdigit (argv [a ][2 ]))
4469
+ opt = argv [a ][2 ] - '0' ;
4470
+ copt [0 ] = opt + '0' ;
4471
+ copt [1 ] = '\0' ;
4472
+ unsetenv ("COMCOM_MOUSE" );
4473
+ switch (opt )
4474
+ {
4475
+ case 0 :
4476
+ break ;
4477
+ default :
4478
+ mouse_en = mouse_init ();
4479
+ if (mouse_en )
4480
+ {
4481
+ mouseopt_extctl = (opt == 2 );
4482
+ setenv ("COMCOM_MOUSE" , copt , 1 );
4483
+ }
4484
+ break ;
4485
+ }
4472
4486
}
4473
4487
4474
4488
// check for command in arguments
@@ -4514,6 +4528,13 @@ int main(int argc, const char *argv[], const char *envp[])
4514
4528
#endif
4515
4529
}
4516
4530
4531
+ if (!mouse_en && (v = getenv ("COMCOM_MOUSE" )) && v [0 ] >= '1' )
4532
+ {
4533
+ mouse_en = mouse_init ();
4534
+ if (mouse_en && v [0 ] == '2' )
4535
+ mouseopt_extctl = 1 ;
4536
+ }
4537
+
4517
4538
if (shell_permanent && !disable_autoexec )
4518
4539
{
4519
4540
unsigned int drive ;
0 commit comments