1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: appdef.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
37 const char* GetDefStandList()
40 char* pEnv
= getenv("STAR_STANDLST");
43 int nLen
= strlen( pEnv
);
44 pRet
= ( char *) malloc( nLen
+ 1 );
45 (void) strcpy( pRet
, pEnv
);
49 int nLen
= strlen( _DEF_STAND_LIST
);
50 pRet
= ( char *) malloc( nLen
+ 1 );
51 (void) strcpy( pRet
, _DEF_STAND_LIST
);
57 const char* GetIniRoot()
60 char* pEnv
= getenv("STAR_INIROOT");
63 int nLen
= strlen( pEnv
);
64 pRet
= ( char *) malloc( nLen
+ 1 );
65 (void) strcpy( pRet
, pEnv
);
69 int nLen
= strlen( _INIROOT
);
70 pRet
= ( char *) malloc( nLen
+ 1 );
71 (void) strcpy( pRet
, _INIROOT
);
76 const char* GetIniRootOld()
79 char* pEnv
= getenv("STAR_INIROOTOLD");
82 int nLen
= strlen( pEnv
);
83 pRet
= ( char *) malloc( nLen
+ 1 );
84 (void) strcpy( pRet
, pEnv
);
88 int nLen
= strlen( _INIROOT_OLD
);
89 pRet
= ( char *) malloc( nLen
+ 1 );
90 (void) strcpy( pRet
, _INIROOT_OLD
);
95 const char* GetSSolarIni()
98 char* pEnv
= getenv("STAR_SSOLARINI");
101 int nLen
= strlen( pEnv
);
102 pRet
= ( char *) malloc( nLen
+ 1 );
103 (void) strcpy( pRet
, pEnv
);
107 int nLen
= strlen( _DEF_SSOLARINI
);
108 pRet
= ( char *) malloc( nLen
+ 1 );
109 (void) strcpy( pRet
, _DEF_SSOLARINI
);
115 const char* GetSSCommon()
118 char* pEnv
= getenv("STAR_SSCOMMON");
121 int nLen
= strlen( pEnv
);
122 pRet
= ( char *) malloc( nLen
+ 1 );
123 (void) strcpy( pRet
, pEnv
);
127 int nLen
= strlen( _DEF_SSCOMMON
);
128 pRet
= ( char *) malloc( nLen
+ 1 );
129 (void) strcpy( pRet
, _DEF_SSCOMMON
);
135 const char* GetBServerRoot()
138 char* pEnv
= getenv("STAR_BSERVERROOT");
141 int nLen
= strlen( pEnv
);
142 pRet
= ( char *) malloc( nLen
+ 1 );
143 (void) strcpy( pRet
, pEnv
);
147 int nLen
= strlen( B_SERVER_ROOT
);
148 pRet
= ( char *) malloc( nLen
+ 1 );
149 (void) strcpy( pRet
, B_SERVER_ROOT
);
154 const char* GetEnv( const char *pVar
)
156 char *pRet
= getenv( pVar
);
162 const char* GetEnv( const char *pVar
, const char *pDefault
)
164 char *pRet
= getenv( pVar
);