RAPI
R.h
Go to the documentation of this file.
00001 /*
00002  *  R : A Computer Language for Statistical Data Analysis
00003  *  Copyright (C) 2000-2016 The R Core Team.
00004  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU Lesser General Public License as published by
00007  *  the Free Software Foundation; either version 2.1 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU Lesser General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU Lesser General Public License
00016  *  along with this program; if not, a copy is available at
00017  *  https://www.R-project.org/Licenses/
00018  */
00019 
00020 #ifndef R_R_H
00021 #define R_R_H
00022 
00023 #ifndef USING_R
00024 # define USING_R
00025 #endif
00026 
00027 #ifndef NO_C_HEADERS
00028 /* same as Rmath.h: needed for cospi etc */
00029 # ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
00030 #  define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
00031 # endif
00032 /* The C++ headers in Solaris Studio are strict C++98, and many 
00033    packages fail because of not using e.g. std::round 
00034    or using C99 functions such as snprintf. 
00035 */
00036 # ifdef __SUNPRO_CC
00037 #  define DO_NOT_USE_CXX_HEADERS
00038 # endif
00039 # if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS)
00040 #  include <cstdlib>
00041 #  include <cstdio>
00042 #  include <climits>
00043 #  include <cmath>
00044 # else
00045 #  include <stdlib.h> /* Not used by R itself, but widely assumed in packages */
00046 #  include <stdio.h>  /* Used by ca 200 packages, but not in R itself */
00047 #  include <limits.h> /* for INT_MAX */
00048 #  include <math.h>
00049 # endif 
00050 /* 
00051    math.h   is also included by R_ext/Arith.h, except in C++ code
00052    stddef.h is included by R_ext/Memory.h
00053    string.h is included by R_ext/RS.h
00054    All guarded by NO_C_HEADERS.
00055 */
00056 # if defined(__sun)
00057 /* Solaris' stdlib.h includes a header which defines these (and more) */
00058 #  undef DO
00059 #  undef DS
00060 #  undef SO
00061 #  undef SS
00062 # endif
00063 #endif
00064 
00065 #include <Rconfig.h>
00066 #include <R_ext/Arith.h>      /* R_FINITE, ISNAN, ... */
00067 #include <R_ext/Boolean.h>    /* Rboolean type */
00068 #include <R_ext/Complex.h>    /* Rcomplex type */
00069 #include <R_ext/Constants.h>  /* PI, DOUBLE_EPS, etc */
00070 #include <R_ext/Error.h>      /* error and warning */
00071 #include <R_ext/Memory.h>     /* R_alloc and S_alloc */
00072 #include <R_ext/Print.h>      /* Rprintf etc */
00073 #include <R_ext/Random.h>     /* RNG interface */
00074 #include <R_ext/Utils.h>      /* sort routines et al */
00075 #include <R_ext/RS.h>
00076 /* for PROBLEM ... Calloc, Realloc, Free, Memcpy, F77_xxxx */
00077 
00078 
00079 typedef double Sfloat;
00080 typedef int Sint;
00081 #define SINT_MAX INT_MAX
00082 #define SINT_MIN INT_MIN
00083 
00084 #ifdef __cplusplus
00085 extern "C" {
00086 #endif
00087 
00088 void R_FlushConsole(void);
00089 /* always declared, but only usable under Win32 and Aqua */
00090 void R_ProcessEvents(void);
00091 #ifdef Win32
00092 void R_WaitEvent(void);
00093 #endif
00094 
00095 #ifdef __cplusplus
00096 }
00097 #endif
00098 
00099 #endif /* !R_R_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines