include/SDL_getenv.h
author Sam Lantinga <slouken@libsdl.org>
Wed, 01 Feb 2006 06:32:25 +0000
changeset 1312 c9b51268668f
parent 1277 088b806d877e
child 1330 450721ad5436
permissions -rw-r--r--
Updated copyright information and removed rcs id lines (problematic in branch merges)
I batch edited these files, so please let me know if I've accidentally removed anybody's
credit here.
slouken@1277
     1
/*
slouken@1277
     2
    SDL - Simple DirectMedia Layer
slouken@1312
     3
    Copyright (C) 1997-2006 Sam Lantinga
slouken@1277
     4
slouken@1277
     5
    This library is free software; you can redistribute it and/or
slouken@1312
     6
    modify it under the terms of the GNU Lesser General Public
slouken@1277
     7
    License as published by the Free Software Foundation; either
slouken@1312
     8
    version 2.1 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@1312
    13
    Lesser General Public License for more details.
slouken@1277
    14
slouken@1312
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1312
    16
    License along with this library; if not, write to the Free Software
slouken@1312
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@1277
    18
slouken@1277
    19
    Sam Lantinga
slouken@1277
    20
    slouken@libsdl.org
slouken@1277
    21
*/
slouken@1277
    22
slouken@1277
    23
#ifndef _SDL_getenv_h
slouken@1277
    24
#define _SDL_getenv_h
slouken@1277
    25
slouken@1277
    26
#include "begin_code.h"
slouken@1277
    27
/* Set up for C function definitions, even when using C++ */
slouken@1277
    28
#ifdef __cplusplus
slouken@1277
    29
extern "C" {
slouken@1277
    30
#endif
slouken@0
    31
slouken@0
    32
/* Not all environments have a working getenv()/putenv() */
slouken@0
    33
slouken@1268
    34
#if defined(macintosh) || defined(WIN32) || defined(_WIN32_WCE)
slouken@0
    35
#define NEED_SDL_GETENV
slouken@0
    36
#endif
slouken@0
    37
slouken@0
    38
#ifdef NEED_SDL_GETENV
slouken@0
    39
slouken@0
    40
/* Put a variable of the form "name=value" into the environment */
slouken@337
    41
extern DECLSPEC int SDLCALL SDL_putenv(const char *variable);
slouken@0
    42
#define putenv(X)   SDL_putenv(X)
slouken@0
    43
slouken@0
    44
/* Retrieve a variable named "name" from the environment */
slouken@337
    45
extern DECLSPEC char * SDLCALL SDL_getenv(const char *name);
slouken@0
    46
#define getenv(X)     SDL_getenv(X)
slouken@0
    47
slouken@1277
    48
#endif /* NEED_GETENV */
slouken@1277
    49
slouken@0
    50
/* Ends C function definitions when using C++ */
slouken@0
    51
#ifdef __cplusplus
slouken@0
    52
}
slouken@0
    53
#endif
slouken@0
    54
#include "close_code.h"
slouken@0
    55
slouken@1277
    56
#endif /* _SDL_getenv_h */