comparison include/SDL_getenv.h @ 1277:088b806d877e

*** empty log message ***
author Sam Lantinga <slouken@libsdl.org>
date Fri, 27 Jan 2006 08:47:15 +0000
parents f098b247299d
children c9b51268668f
comparison
equal deleted inserted replaced
1276:ca3718c215af 1277:088b806d877e
1 /*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2004 Sam Lantinga
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the Free
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
19 Sam Lantinga
20 slouken@libsdl.org
21 */
22
23 #ifdef SAVE_RCSID
24 static char rcsid =
25 "@(#) $Id$";
26 #endif
27
28 #ifndef _SDL_getenv_h
29 #define _SDL_getenv_h
30
31 #include "begin_code.h"
32 /* Set up for C function definitions, even when using C++ */
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
1 36
2 /* Not all environments have a working getenv()/putenv() */ 37 /* Not all environments have a working getenv()/putenv() */
3 38
4 #if defined(macintosh) || defined(WIN32) || defined(_WIN32_WCE) 39 #if defined(macintosh) || defined(WIN32) || defined(_WIN32_WCE)
5 #define NEED_SDL_GETENV 40 #define NEED_SDL_GETENV
6 #endif 41 #endif
7 42
8 #ifdef NEED_SDL_GETENV 43 #ifdef NEED_SDL_GETENV
9 44
10 #include "begin_code.h"
11 /* Set up for C function definitions, even when using C++ */
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 /* Put a variable of the form "name=value" into the environment */ 45 /* Put a variable of the form "name=value" into the environment */
17 extern DECLSPEC int SDLCALL SDL_putenv(const char *variable); 46 extern DECLSPEC int SDLCALL SDL_putenv(const char *variable);
18 #define putenv(X) SDL_putenv(X) 47 #define putenv(X) SDL_putenv(X)
19 48
20 /* Retrieve a variable named "name" from the environment */ 49 /* Retrieve a variable named "name" from the environment */
21 extern DECLSPEC char * SDLCALL SDL_getenv(const char *name); 50 extern DECLSPEC char * SDLCALL SDL_getenv(const char *name);
22 #define getenv(X) SDL_getenv(X) 51 #define getenv(X) SDL_getenv(X)
23 52
53 #endif /* NEED_GETENV */
54
24 /* Ends C function definitions when using C++ */ 55 /* Ends C function definitions when using C++ */
25 #ifdef __cplusplus 56 #ifdef __cplusplus
26 } 57 }
27 #endif 58 #endif
28 #include "close_code.h" 59 #include "close_code.h"
29 60
30 #endif /* NEED_GETENV */ 61 #endif /* _SDL_getenv_h */