1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
34 const char* GetDefStandList()
37 char* pEnv
= getenv("STAR_STANDLST");
40 int nLen
= strlen( pEnv
);
41 pRet
= ( char *) malloc( nLen
+ 1 );
42 (void) strcpy( pRet
, pEnv
);
46 int nLen
= strlen( _DEF_STAND_LIST
);
47 pRet
= ( char *) malloc( nLen
+ 1 );
48 (void) strcpy( pRet
, _DEF_STAND_LIST
);
54 const char* GetIniRoot()
57 char* pEnv
= getenv("STAR_INIROOT");
60 int nLen
= strlen( pEnv
);
61 pRet
= ( char *) malloc( nLen
+ 1 );
62 (void) strcpy( pRet
, pEnv
);
66 int nLen
= strlen( _INIROOT
);
67 pRet
= ( char *) malloc( nLen
+ 1 );
68 (void) strcpy( pRet
, _INIROOT
);
73 const char* GetIniRootOld()
76 char* pEnv
= getenv("STAR_INIROOTOLD");
79 int nLen
= strlen( pEnv
);
80 pRet
= ( char *) malloc( nLen
+ 1 );
81 (void) strcpy( pRet
, pEnv
);
85 int nLen
= strlen( _INIROOT_OLD
);
86 pRet
= ( char *) malloc( nLen
+ 1 );
87 (void) strcpy( pRet
, _INIROOT_OLD
);
92 const char* GetSSolarIni()
95 char* pEnv
= getenv("STAR_SSOLARINI");
98 int nLen
= strlen( pEnv
);
99 pRet
= ( char *) malloc( nLen
+ 1 );
100 (void) strcpy( pRet
, pEnv
);
104 int nLen
= strlen( _DEF_SSOLARINI
);
105 pRet
= ( char *) malloc( nLen
+ 1 );
106 (void) strcpy( pRet
, _DEF_SSOLARINI
);
112 const char* GetSSCommon()
115 char* pEnv
= getenv("STAR_SSCOMMON");
118 int nLen
= strlen( pEnv
);
119 pRet
= ( char *) malloc( nLen
+ 1 );
120 (void) strcpy( pRet
, pEnv
);
124 int nLen
= strlen( _DEF_SSCOMMON
);
125 pRet
= ( char *) malloc( nLen
+ 1 );
126 (void) strcpy( pRet
, _DEF_SSCOMMON
);
132 const char* GetBServerRoot()
135 char* pEnv
= getenv("STAR_BSERVERROOT");
138 int nLen
= strlen( pEnv
);
139 pRet
= ( char *) malloc( nLen
+ 1 );
140 (void) strcpy( pRet
, pEnv
);
144 int nLen
= strlen( B_SERVER_ROOT
);
145 pRet
= ( char *) malloc( nLen
+ 1 );
146 (void) strcpy( pRet
, B_SERVER_ROOT
);
151 const char* GetEnv( const char *pVar
)
153 char *pRet
= getenv( pVar
);
159 const char* GetEnv( const char *pVar
, const char *pDefault
)
161 char *pRet
= getenv( pVar
);