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