Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / include / S.h @ 2486

History | View | Annotate | Download (2.1 kB)

1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
4
 *  Copyright (C) 1997--2003 The R Core Team.
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU Lesser General Public License as published by
8
 *  the Free Software Foundation; either version 2.1 of the License, or
9
 *  (at your option) any later version.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU Lesser General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU Lesser General Public License
17
 *  along with this program; if not, a copy is available at
18
 *  http://www.r-project.org/Licenses/
19
 *
20
 *  Much of this is from Doug Bates.
21
 */
22

    
23
#ifndef R_S_H
24
#define R_S_H
25

    
26
#ifndef USING_R
27
# define USING_R
28
/* is this a good idea? - conflicts with many versions of f2c.h */
29
# define longint int
30
#endif
31

    
32
#ifdef __cplusplus
33
extern "C" {
34
#endif
35

    
36
#include <stddef.h>
37
#include <stdlib.h>
38
#include <stdio.h>
39
#include <limits.h>
40
#include <float.h>
41
# include <math.h>
42

    
43
#include <Rconfig.h>
44
#include <R_ext/Constants.h>
45
#include <R_ext/Memory.h>        /* S_alloc */
46

    
47
/* subset of those in Random.h */
48
extern void seed_in(long *);
49
extern void seed_out(long *);
50
extern double unif_rand(void);
51
extern double norm_rand(void);
52

    
53
/* Macros for S/R Compatibility */
54

    
55
#include <R_ext/RS.h>
56
/* for PROBLEM ... Calloc, Realloc, Free, Memcpy, F77_xxxx */
57

    
58
/* S4 uses macros equivalent to */
59
#define Salloc(n,t) (t*)S_alloc(n, sizeof(t))
60
#define Srealloc(p,n,old,t) (t*)S_realloc(p,n,old,sizeof(t))
61

    
62
/* S's complex is different, and is a define to S_complex now */
63
typedef struct {
64
        double re;
65
        double im;
66
} S_complex;
67

    
68
#ifdef S_OLD_COMPLEX
69
# define complex S_complex
70
#endif
71

    
72
#ifndef NO_CALL_R
73
/* Not quite full compatibility: beware! */
74
/* void        call_R(char*, long, void**, char**, long*, char**, long, char**);*/
75
#define call_S call_R
76
#endif
77

    
78

    
79
#ifdef __cplusplus
80
}
81
#endif
82

    
83
#endif /* !R_S_H */