The R Project SVN R

Rev

Rev 71676 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 71676 Rev 72049
Line 1... Line 1...
1
/*
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
4
 *  Copyright (C) 1998--2016  The R Core Team.
4
 *  Copyright (C) 1998--2017  The R Core Team.
5
 *
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 2 of the License, or
8
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  (at your option) any later version.
9
 *  (at your option) any later version.
Line 22... Line 22...
22
   e.g. GUIs such as GNOME and Cocoa.  It is only used on Unix-alikes.
22
   e.g. GUIs such as GNOME and Cocoa.  It is only used on Unix-alikes.
23
   All entries here should be documented in doc/manual/R-exts.texi.
23
   All entries here should be documented in doc/manual/R-exts.texi.
24
 
24
 
25
   It should not be included by package sources unless they are
25
   It should not be included by package sources unless they are
26
   providing such a front-end.
26
   providing such a front-end.
-
 
27
 
-
 
28
   If CSTACK_DEFNS is defined, also define HAVE_UINTPTR_T (if true)
-
 
29
   before including this, perhaps by including Rconfig.h from C code
-
 
30
   (for C++ you need to test the C++ compiler in use).
27
*/
31
*/
28
 
32
 
29
#ifndef RINTERFACE_H_
33
#ifndef RINTERFACE_H_
30
#define RINTERFACE_H_
34
#define RINTERFACE_H_
31
 
35
 
32
#include <R_ext/Boolean.h>
36
#include <R_ext/Boolean.h>
33
#include <R_ext/RStartup.h>
-
 
34
 
37
 
35
#ifdef __cplusplus
38
#ifdef __cplusplus
-
 
39
/* we do not support DO_NOT_USE_CXX_HEADERS in this file */
36
# include <cstdio>
40
# include <cstdio>
37
extern "C" {
41
extern "C" {
38
#else
42
#else
39
# include <stdio.h>
43
# include <stdio.h>
40
#endif
44
#endif
Line 97... Line 101...
97
 
101
 
98
/* in ../unix/system.c */
102
/* in ../unix/system.c */
99
extern int R_running_as_main_program;
103
extern int R_running_as_main_program;
100
 
104
 
101
#ifdef CSTACK_DEFNS
105
#ifdef CSTACK_DEFNS
102
/* duplicating Defn.h */
106
/* duplicating older Defn.h.
-
 
107
   Note: this is never used when including Rinterface.h from R itself
-
 
108
*/
103
#if !defined(HAVE_UINTPTR_T) && !defined(uintptr_t)
109
#if !defined(HAVE_UINTPTR_T) && !defined(uintptr_t)
104
 typedef unsigned long uintptr_t;
110
 typedef unsigned long uintptr_t;
-
 
111
#else
-
 
112
# ifndef __cplusplus
-
 
113
#  include <stdint.h>
-
 
114
# elif __cplusplus >= 201103L
-
 
115
#  include <cstdint>
-
 
116
# endif
105
#endif
117
#endif
106
 
118
 
107
extern uintptr_t R_CStackLimit;	/* C stack limit */
119
extern uintptr_t R_CStackLimit;	/* C stack limit */
108
extern uintptr_t R_CStackStart;	/* Initial stack address */
120
extern uintptr_t R_CStackStart;	/* Initial stack address */
109
#endif
121
#endif
110
 
122
 
111
/* formerly in src/unix/devUI.h */
123
/* formerly in src/unix/devUI.h */
112
 
124
 
113
#ifdef R_INTERFACE_PTRS
125
#ifdef R_INTERFACE_PTRS
114
#include <Rinternals.h>
126
#include <Rinternals.h> // for SEXP
-
 
127
#include <R_ext/RStartup.h> // for SA_TYPE
115
 
128
 
116
#ifdef __SYSTEM__
129
#ifdef __SYSTEM__
117
# define extern
130
# define extern
118
#endif
131
#endif
119
 
132