The R Project SVN R

Rev

Rev 7002 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7002 Rev 7003
Line 15... Line 15...
15
 *
15
 *
16
 *  You should have received a copy of the GNU General Public License
16
 *  You should have received a copy of the GNU General Public License
17
 *  along with this program; if not, write to the Free Software
17
 *  along with this program; if not, write to the Free Software
18
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
 *
19
 *
20
 *  Much of this is from Doug Bates.
-
 
21
 */
20
 */
22
 
21
 
23
#ifndef R_S_H
22
#ifndef R_S_H
24
#define R_S_H
23
#define R_S_H
25
 
24
 
26
#ifndef USING_R
25
#ifndef USING_R
27
#define USING_R
26
#define USING_R
-
 
27
/* is this a good idea? - conflicts with many versions of f2c.h */
28
#define longint int
28
#define longint int
29
#endif
29
#endif
30
 
30
 
31
#ifdef __cplusplus
31
#ifdef __cplusplus
32
extern "C" {
32
extern "C" {
33
#endif
33
#endif
34
 
34
 
35
#include "Error.h"
-
 
36
#include "Memory.h"
-
 
37
#include "Rconfig.h"
-
 
38
 
-
 
39
#include <stddef.h>
35
#include <stddef.h>
40
#include <stdlib.h>
36
#include <stdlib.h>
41
#include <stdio.h>
37
#include <stdio.h>
42
#include <limits.h>
38
#include <limits.h>
43
#include <float.h>
39
#include <float.h>
Line 45... Line 41...
45
#include <fp.h>
41
#include <fp.h>
46
#else
42
#else
47
#include <math.h>
43
#include <math.h>
48
#endif
44
#endif
49
 
45
 
50
#define call_S call_R
46
#include "R_ext/Scompat.h"
51
 
-
 
52
extern void seed_in(long *);
-
 
53
extern void seed_out(long *);
-
 
54
extern double unif_rand(void);
-
 
55
extern double norm_rand(void);
-
 
56
 
-
 
57
/* Macros for S/R Compatibility */
-
 
58
 
47
 
59
#include "Rdefines.h"
48
#include "Rdefines.h"
-
 
49
/* includes R_ext/Error.h, R_ext/F77.h, R_ext/Memory.h" */
60
 
50
 
61
/* Can't be sure Mathlib.h or math.h is included */
-
 
62
 
-
 
63
#ifndef M_PI
-
 
64
#define M_PI 3.141592653589793238462643383279502884197169399375
-
 
65
#endif
-
 
66
 
-
 
67
#define PI             M_PI
51
#include "R_ext/Constants.h"
68
#define SINGLE_EPS     FLT_EPSILON
-
 
69
#define SINGLE_BASE    FLT_RADIX
-
 
70
#define SINGLE_XMIN    FLT_MIN
-
 
71
#define SINGLE_XMAX    FLT_MAX
-
 
72
#define DOUBLE_DIGITS  DBL_MANT_DIG
-
 
73
#define DOUBLE_EPS     DBL_EPSILON
-
 
74
#define DOUBLE_XMAX    DBL_MAX
-
 
75
#define DOUBLE_XMIN    DBL_MIN
52
#include "R_ext/Random.h"
76
 
-
 
77
/*
-
 
78
extern int F77_SYMBOL(dblepr) (char *label, int *nchar,
-
 
79
			       double *data, int *ndata);
-
 
80
extern int F77_SYMBOL(intpr) (char *label, int *nchar,
-
 
81
			      int *data, int *ndata);
-
 
82
*/
-
 
83
 
53
 
84
#ifdef __cplusplus
54
#ifdef __cplusplus
85
}
55
}
86
#endif
56
#endif
87
 
57