1 /* RCS $Id: switchar.c,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $
7 -- Get the current value of the command line switch char. Only useful
8 -- in a DOS environment, otherwise we #define it to be '-'.
11 -- Dennis Vadura, dvadura@dmake.wticorp.com
14 -- http://dmake.wticorp.com/
17 -- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
19 -- This program is NOT free software; you can redistribute it and/or
20 -- modify it under the terms of the Software License Agreement Provided
21 -- in the file <distribution-root>/readme/license.txt.
24 -- Use cvs log to obtain detailed change logs.
35 Try the environment first. If you don't find SWITCHAR there, then use
36 the DOS call. The call is undocumented, and doesn't work for DOS versions
37 4.0 and up, so the check of the environment will fix that. */
39 #if defined(__MSDOS__) || defined(M_I86)
41 static char *_env_switchar
= NIL(char);
43 if( _env_switchar
!= NIL(char) ||
44 (_env_switchar
= (char *)getenv("SWITCHAR")) != NIL(char) )
45 return(*_env_switchar
);
47 rg
.h
.ah
= 0x37; /* switch char request */
48 rg
.h
.al
= 0; /* get (not set) */