Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / dmake / os2 / switchar.c
blob458030993d578814c24dc6f25cb4521b674c57e0
1 /* RCS $Id: switchar.c,v 1.1.1.1 2000-09-22 15:33:30 hr Exp $
2 --
3 -- SYNOPSIS
4 -- switch char query.
5 --
6 -- DESCRIPTION
7 -- Get the current value of the command line switch char. Only useful
8 -- in a DOS environment, otherwise we #define it to be '-'.
9 --
10 -- AUTHOR
11 -- Dennis Vadura, dvadura@dmake.wticorp.com
13 -- WWW
14 -- http://dmake.wticorp.com/
16 -- COPYRIGHT
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.
23 -- LOG
24 -- Use cvs log to obtain detailed change logs.
26 #include <stdlib.h>
27 #include <stdio.h>
28 #include "stdmacs.h"
30 getswitchar()/*
31 ===============
32 Try the environment first. If you don't find SWITCHAR there, then use
33 the DOS call. The call is undocumented, and doesn't work for DOS versions
34 4.0 and up, so the check of the environment will fix that. */
36 static char *_env_switchar = NIL(char);
38 if( _env_switchar != NIL(char) ||
39 (_env_switchar = (char *)getenv("SWITCHAR")) != NIL(char) )
40 return(*_env_switchar);
42 return ('/');