The R Project SVN R

Rev

Rev 82700 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7728 ripley 1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
87312 ripley 3
 *  Copyright (C) 2000-2024 The R Core Team.
7728 ripley 4
 *
71657 plummer 5
 *  This header file is free software; you can redistribute it and/or modify
12778 pd 6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
7728 ripley 8
 *  (at your option) any later version.
9
 *
71657 plummer 10
 *  This file is part of R. R is distributed under the terms of the
11
 *  GNU General Public License, either Version 2, June 1991 or Version 3,
12
 *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
13
 *  
7728 ripley 14
 *  This program is distributed in the hope that it will be useful,
15
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12778 pd 17
 *  GNU Lesser General Public License for more details.
7728 ripley 18
 *
12778 pd 19
 *  You should have received a copy of the GNU Lesser General Public License
42308 ripley 20
 *  along with this program; if not, a copy is available at
68949 ripley 21
 *  https://www.R-project.org/Licenses/
7728 ripley 22
 */
23
 
24
#ifndef R_R_H
25
#define R_R_H
26
 
27
#ifndef USING_R
51839 ripley 28
# define USING_R
7728 ripley 29
#endif
30
 
70618 ligges 31
/* same as Rmath.h: needed for cospi etc */
71371 ripley 32
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
33
# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
34
#endif
80763 ripley 35
/*
71298 ripley 36
   DO_NOT_USE_CXX_HEADERS is legacy, left as a last resort.
70320 ripley 37
*/
71371 ripley 38
#if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS)
39
# include <cstdlib>
40
# include <cstdio>
41
# include <cmath>
42
#else
43
# include <stdlib.h> /* Not used by R itself, but widely assumed in packages */
44
# include <stdio.h>  /* Used by ca 200 packages, but not in R itself */
45
# include <math.h>
46
#endif 
69977 ripley 47
/* 
71267 ripley 48
   math.h is also included by R_ext/Arith.h, except in C++ code
49
   stddef.h (or cstddef) is included by R_ext/Memory.h
50
   string.h (or cstring) is included by R_ext/RS.h
69977 ripley 51
*/
71371 ripley 52
#if defined(__sun)
69977 ripley 53
/* Solaris' stdlib.h includes a header which defines these (and more) */
71371 ripley 54
# undef CS
55
# undef DO
56
# undef DS
57
# undef ES
58
# undef FS
59
# undef GS
60
# undef SO
61
# undef SS
42402 ripley 62
#endif
7728 ripley 63
 
71473 ripley 64
#ifdef NO_C_HEADERS
65
# warning "use of NO_C_HEADERS is defunct and will be ignored"
66
#endif
67
 
11497 hornik 68
#include <Rconfig.h>
19500 hornik 69
#include <R_ext/Arith.h>      /* R_FINITE, ISNAN, ... */
70
#include <R_ext/Boolean.h>    /* Rboolean type */
71
#include <R_ext/Complex.h>    /* Rcomplex type */
87312 ripley 72
#include <R_ext/Constants.h>  /* M_PI; DOUBLE_EPS, etc */
19500 hornik 73
#include <R_ext/Error.h>      /* error and warning */
74
#include <R_ext/Memory.h>     /* R_alloc and S_alloc */
75
#include <R_ext/Print.h>      /* Rprintf etc */
76
#include <R_ext/Random.h>     /* RNG interface */
77
#include <R_ext/Utils.h>      /* sort routines et al */
51845 ripley 78
#include <R_ext/RS.h>
82429 ripley 79
/* for R_Calloc, R_Realloc, R_Free, Memcpy, F77_xxxx */
7728 ripley 80
 
81
 
42412 ripley 82
#ifdef __cplusplus
83
extern "C" {
84
#endif
85
 
37376 ripley 86
void R_FlushConsole(void);
87
/* always declared, but only usable under Win32 and Aqua */
88
void R_ProcessEvents(void);
64106 murdoch 89
#ifdef Win32
90
void R_WaitEvent(void);
91
#endif
37376 ripley 92
 
7728 ripley 93
#ifdef __cplusplus
94
}
95
#endif
96
 
97
#endif /* !R_R_H */