Subversion Repositories SvarDOS

Rev

Rev 1597 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1597 Rev 1876
Line 1... Line 1...
1
/* This file is part of the SvarCOM project and is published under the terms
1
/* This file is part of the SvarCOM project and is published under the terms
2
 * of the MIT license.
2
 * of the MIT license.
3
 *
3
 *
4
 * Copyright (C) 2021 Mateusz Viste
4
 * Copyright (C) 2021-2024 Mateusz Viste
5
 *
5
 *
6
 * Permission is hereby granted, free of charge, to any person obtaining a
6
 * Permission is hereby granted, free of charge, to any person obtaining a
7
 * copy of this software and associated documentation files (the "Software"),
7
 * copy of this software and associated documentation files (the "Software"),
8
 * to deal in the Software without restriction, including without limitation
8
 * to deal in the Software without restriction, including without limitation
9
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
Line 39... Line 39...
39
  unsigned short rmodenv = *rmodenv_ptr;
39
  unsigned short rmodenv = *rmodenv_ptr;
40
 
40
 
41
  /* detect "I am the origin shell" situations */
41
  /* detect "I am the origin shell" situations */
42
  if (rmod->flags & FLAG_PERMANENT) return; /* COMMAND.COM /P */
42
  if (rmod->flags & FLAG_PERMANENT) return; /* COMMAND.COM /P */
43
  if ((rmod->origint22 >> 16) == 0xffff) return; /* original int22h seg set to 0xffff (DOS-C / FreeDOS) */
43
  if ((rmod->origint22 >> 16) == 0xffff) return; /* original int22h seg set to 0xffff (DOS-C / FreeDOS) */
44
  if (rmod->origenvseg == 0) return; /* no original environment (MSDOS 5/6) */
-
 
45
 
44
 
46
  /* set my int 22h handler back to its original value */
45
  /* set my int 22h handler back to its original value */
47
  *myint22 = rmod->origint22;
46
  *myint22 = rmod->origint22;
48
 
47
 
49
  /* set my parent back to its original value */
48
  /* set my parent back to its original value */