The R Project SVN R

Rev

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

Rev Author Line No. Line
4629 ripley 1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
28362 murdoch 4
 *  Copyright (C) 1999-2004   The R Development Core Team.
4629 ripley 5
 *
6
 *  This program is free software; you can redistribute it and/or modify
12778 pd 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
4629 ripley 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
12778 pd 14
 *  GNU Lesser General Public License for more details.
4629 ripley 15
 *
12778 pd 16
 *  You should have received a copy of the GNU Lesser General Public License
4629 ripley 17
 *  along with this program; if not, write to the Free Software
5458 ripley 18
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
4629 ripley 19
 */
4662 pd 20
 
4562 pd 21
#ifndef _R_INTERNALS_H_
22
#define _R_INTERNALS_H_
23
 
19500 hornik 24
#include <R_ext/Arith.h>
25
#include <R_ext/Boolean.h>
26
#include <R_ext/Complex.h>
27
#include <R_ext/Error.h>
28
#include <R_ext/Memory.h>
29
#include <R_ext/PrtUtil.h>
30
#include <R_ext/Utils.h>
4562 pd 31
 
32
#include <errno.h>
33
#include <stdio.h>
19082 ripley 34
/* #include <fcntl.h> This is not ISO C */
4562 pd 35
#include <stdlib.h>
36
#include <stdarg.h>
37
#include <string.h>
38
#include <limits.h>
39
#include <float.h>
40
#include <ctype.h>
41
 
15716 ripley 42
#include <R_ext/libextern.h>
4629 ripley 43
 
28362 murdoch 44
/* type for length of vectors etc */
45
typedef int R_len_t; /* will be long later, LONG64 or ssize_t on Win64 */
46
#define R_LEN_T_MAX INT_MAX
47
 
10718 maechler 48
/* Fundamental Data Types:  These are largely Lisp
49
 * influenced structures, with the exception of LGLSXP,
50
 * INTSXP, REALSXP, CPLXSXP and STRSXP which are the
51
 * element types for S-like data objects.
4562 pd 52
 
10718 maechler 53
 * Note that the gap of 11 and 12 below is because of
54
 * the withdrawal of native "factor" and "ordered" types.
55
 *
56
 *			--> TypeTable[] in ../main/util.c for  typeof()
57
 */
4562 pd 58
 
17728 ripley 59
/*  These exact numeric values are seldom used, but they are, e.g., in
10718 maechler 60
 *  ../main/subassign.c
61
*/
62
#ifndef enum_SEXPTYPE
63
/* NOT YET using enum:
64
 *  1)	The SEXPREC struct below has 'SEXPTYPE type : 5'
65
 *	(making FUNSXP and CLOSXP equivalent in there),
66
 *	giving (-Wall only ?) warnings all over the place
67
 * 2)	Many switch(type) { case ... } statements need a final `default:'
68
 *	added in order to avoid warnings like [e.g. l.170 of ../main/util.c]
69
 *	  "enumeration value `FUNSXP' not handled in switch"
70
 */
4562 pd 71
typedef unsigned int SEXPTYPE;
72
 
73
#define NILSXP	     0	  /* nil = NULL */
74
#define SYMSXP	     1	  /* symbols */
75
#define LISTSXP	     2	  /* lists of dotted pairs */
76
#define CLOSXP	     3	  /* closures */
77
#define ENVSXP	     4	  /* environments */
78
#define PROMSXP	     5	  /* promises: [un]evaluated closure arguments */
79
#define LANGSXP	     6	  /* language constructs (special lists) */
80
#define SPECIALSXP   7	  /* special forms */
81
#define BUILTINSXP   8	  /* builtin non-special forms */
82
#define CHARSXP	     9	  /* "scalar" string type (internal only)*/
83
#define LGLSXP	    10	  /* logical vectors */
84
#define INTSXP	    13	  /* integer vectors */
85
#define REALSXP	    14	  /* real variables */
86
#define CPLXSXP	    15	  /* complex variables */
87
#define STRSXP	    16	  /* string vectors */
88
#define DOTSXP	    17	  /* dot-dot-dot object */
22284 duncan 89
#define ANYSXP	    18	  /* make "any" args work.
26031 maechler 90
			     Used in specifying types for symbol
22284 duncan 91
			     registration to mean anything is okay  */
4562 pd 92
#define VECSXP	    19	  /* generic vectors */
93
#define EXPRSXP	    20	  /* expressions vectors */
11390 luke 94
#define BCODESXP    21    /* byte code */
95
#define EXTPTRSXP   22    /* external pointer */
15928 luke 96
#define WEAKREFSXP  23    /* weak reference */
4562 pd 97
 
5124 ihaka 98
#define FUNSXP      99    /* Closure or Builtin */
99
 
22284 duncan 100
 
10718 maechler 101
#else /* NOT YET */
102
/*------ enum_SEXPTYPE ----- */
103
typedef enum {
104
    NILSXP	= 0,	/* nil = NULL */
105
    SYMSXP	= 1,	/* symbols */
106
    LISTSXP	= 2,	/* lists of dotted pairs */
107
    CLOSXP	= 3,	/* closures */
108
    ENVSXP	= 4,	/* environments */
109
    PROMSXP	= 5,	/* promises: [un]evaluated closure arguments */
110
    LANGSXP	= 6,	/* language constructs (special lists) */
111
    SPECIALSXP	= 7,	/* special forms */
112
    BUILTINSXP	= 8,	/* builtin non-special forms */
113
    CHARSXP	= 9,	/* "scalar" string type (internal only)*/
114
    LGLSXP	= 10,	/* logical vectors */
115
    INTSXP	= 13,	/* integer vectors */
116
    REALSXP	= 14,	/* real variables */
117
    CPLXSXP	= 15,	/* complex variables */
118
    STRSXP	= 16,	/* string vectors */
119
    DOTSXP	= 17,	/* dot-dot-dot object */
120
    ANYSXP	= 18,	/* make "any" args work */
121
    VECSXP	= 19,	/* generic vectors */
122
    EXPRSXP	= 20,	/* expressions vectors */
11390 luke 123
    BCODESXP    = 21,   /* byte code */
124
    EXTPTRSXP   = 22,   /* external pointer */
15928 luke 125
    WEAKREFSXP  = 23,   /* weak reference */
10718 maechler 126
 
127
    FUNSXP	= 99	/* Closure or Builtin */
128
} SEXPTYPE;
129
#endif
130
 
10172 luke 131
#define USE_GENERATIONAL_GC
132
 
133
#ifdef USE_GENERATIONAL_GC
134
# define USE_WRITE_BARRIER
135
#endif
136
 
137
#ifdef USE_RINTERNALS
10869 luke 138
/* Flags */
139
struct sxpinfo_struct {
140
    SEXPTYPE type      :  5;/* ==> (FUNSXP == 99) %% 2^5 == 3 == CLOSXP
141
			     * -> warning: `type' is narrower than values
142
			     *              of its type
143
			     * when SEXPTYPE was an enum */
144
    unsigned int obj   :  1;
145
    unsigned int named :  2;
146
    unsigned int gp    : 16;
147
    unsigned int mark  :  1;
148
    unsigned int debug :  1;
149
    unsigned int trace :  1;
150
    unsigned int fin   :  1;  /* has finalizer installed */
151
    unsigned int gcgen :  1;  /* old generation number */
152
    unsigned int gccls :  3;  /* node class */
10935 maechler 153
}; /*		    Tot: 32 */
4562 pd 154
 
10869 luke 155
struct vecsxp_struct {
28362 murdoch 156
    R_len_t	length;
157
    R_len_t	truelength;
10869 luke 158
};
4562 pd 159
 
10869 luke 160
struct primsxp_struct {
161
    int offset;
162
};
4562 pd 163
 
10869 luke 164
struct symsxp_struct {
165
    struct SEXPREC *pname;
166
    struct SEXPREC *value;
167
    struct SEXPREC *internal;
168
};
169
 
170
struct listsxp_struct {
171
    struct SEXPREC *carval;
172
    struct SEXPREC *cdrval;
173
    struct SEXPREC *tagval;
174
};
175
 
176
struct envsxp_struct {
177
    struct SEXPREC *frame;
178
    struct SEXPREC *enclos;
179
    struct SEXPREC *hashtab;
180
};
181
 
182
struct closxp_struct {
183
    struct SEXPREC *formals;
184
    struct SEXPREC *body;
185
    struct SEXPREC *env;
186
};
187
 
188
struct promsxp_struct {
189
    struct SEXPREC *value;
190
    struct SEXPREC *expr;
191
    struct SEXPREC *env;
192
};
193
 
194
/* Every node must start with a set of sxpinfo flags and an attribute
195
   field. Under the generational collector these are followed by the
196
   fields used to maintain the collector's linked list structures. */
197
#define SEXPREC_HEADER \
198
    struct sxpinfo_struct sxpinfo; \
199
    struct SEXPREC *attrib; \
200
    struct SEXPREC *gengc_next_node, *gengc_prev_node
201
 
202
/* The standard node structure consists of a header followed by the
203
   node data. */
204
typedef struct SEXPREC {
205
    SEXPREC_HEADER;
4562 pd 206
    union {
10869 luke 207
	struct primsxp_struct primsxp;
208
	struct symsxp_struct symsxp;
209
	struct listsxp_struct listsxp;
210
	struct envsxp_struct envsxp;
211
	struct closxp_struct closxp;
212
	struct promsxp_struct promsxp;
4562 pd 213
    } u;
10869 luke 214
} SEXPREC, *SEXP;
215
 
216
/* The generational collector uses a reduced version of SEXPREC as a
217
   header in vector nodes.  The layout MUST be kept consistent with
218
   the SEXPREC definition.  The standard SEXPREC takes up 7 words on
219
   most hardware; this reduced version should take up only 6 words.
220
   In addition to slightly reducing memory use, this can lead to more
221
   favorable data alignment on 32-bit architectures like the Intel
222
   Pentium III where odd word alignment of doubles is allowed but much
223
   less efficient than even word alignment. */
224
typedef struct VECTOR_SEXPREC {
225
    SEXPREC_HEADER;
226
    struct vecsxp_struct vecsxp;
227
} VECTOR_SEXPREC, *VECSEXP;
228
 
229
typedef union { VECTOR_SEXPREC s; double align; } SEXPREC_ALIGN;
4562 pd 230
 
4662 pd 231
/* General Cons Cell Attributes */
232
#define ATTRIB(x)	((x)->attrib)
233
#define OBJECT(x)	((x)->sxpinfo.obj)
234
#define MARK(x)		((x)->sxpinfo.mark)
235
#define TYPEOF(x)	((x)->sxpinfo.type)
236
#define NAMED(x)	((x)->sxpinfo.named)
10172 luke 237
#define SET_OBJECT(x,v)	(((x)->sxpinfo.obj)=(v))
238
#define SET_TYPEOF(x,v)	(((x)->sxpinfo.type)=(v))
239
#define SET_NAMED(x,v)	(((x)->sxpinfo.named)=(v))
4562 pd 240
 
4662 pd 241
 
4562 pd 242
/* Vector Access Macros */
10869 luke 243
#define LENGTH(x)	(((VECSEXP) (x))->vecsxp.length)
244
#define TRUELENGTH(x)	(((VECSEXP) (x))->vecsxp.truelength)
245
#define SETLENGTH(x,v)		((((VECSEXP) (x))->vecsxp.length)=(v))
246
#define SET_TRUELENGTH(x,v)	((((VECSEXP) (x))->vecsxp.truelength)=(v))
10172 luke 247
#define LEVELS(x)	((x)->sxpinfo.gp)
248
#define SETLEVELS(x,v)	(((x)->sxpinfo.gp)=(v))
249
 
10862 luke 250
/* Under the generational allocator the data for vector nodes comes
251
   immediately after the node structure, so the data address is a
252
   known ofset from the node SEXP. */
10172 luke 253
#define DATAPTR(x)	(((SEXPREC_ALIGN *) (x)) + 1)
10862 luke 254
#define CHAR(x)		((char *) DATAPTR(x))
10172 luke 255
#define LOGICAL(x)	((int *) DATAPTR(x))
20981 maechler 256
#define INTEGER(x)	((int *) DATAPTR(x))
10172 luke 257
#define COMPLEX(x)	((Rcomplex *) DATAPTR(x))
258
#define REAL(x)		((double *) DATAPTR(x))
259
#define STRING_ELT(x,i)	((SEXP *) DATAPTR(x))[i]
260
#define VECTOR_ELT(x,i)	((SEXP *) DATAPTR(x))[i]
261
#define STRING_PTR(x)	((SEXP *) DATAPTR(x))
262
#define VECTOR_PTR(x)	((SEXP *) DATAPTR(x))
4562 pd 263
 
10172 luke 264
#ifndef USE_WRITE_BARRIER
265
#define SET_STRING_ELT(x,i,v)	(((x)->u.vecsxp.type.s)[i]=(v))
266
#define SET_VECTOR_ELT(x,i,v)	(((x)->u.vecsxp.type.s)[i]=(v))
267
#endif
268
 
4562 pd 269
/* List Access Macros */
270
/* These also work for ... objects */
271
#define LISTVAL(x)	((x)->u.listsxp)
272
#define TAG(e)		((e)->u.listsxp.tagval)
273
#define CAR(e)		((e)->u.listsxp.carval)
274
#define CDR(e)		((e)->u.listsxp.cdrval)
275
#define CAAR(e)		CAR(CAR(e))
276
#define CDAR(e)		CDR(CAR(e))
277
#define CADR(e)		CAR(CDR(e))
278
#define CDDR(e)		CDR(CDR(e))
279
#define CADDR(e)	CAR(CDR(CDR(e)))
280
#define CADDDR(e)	CAR(CDR(CDR(CDR(e))))
4716 maechler 281
#define CAD4R(e)	CAR(CDR(CDR(CDR(CDR(e)))))
4562 pd 282
#define CONS(a, b)	cons((a), (b))		/* data lists */
283
#define LCONS(a, b)	lcons((a), (b))		/* language lists */
16289 luke 284
#define MISSING_MASK	15 /* reserve 4 bits--only 2 uses now */
285
#define MISSING(x)	((x)->sxpinfo.gp & MISSING_MASK)/* for closure calls */
10172 luke 286
#ifndef USE_WRITE_BARRIER
287
#define SETCAR(x,v)	(CAR(x)=(v))
288
#define SETCADR(x,v)	(CADR(x)=(v))
289
#define SETCADDR(x,v)	(CADDR(x)=(v))
290
#define SETCADDDR(x,v)	(CADDDR(x)=(v))
291
#define SETCAD4R(x,v)	(CAD4R(x)=(v))
292
#define SETCDR(x,y)	do {SEXP X=(x), Y=(y); if(X != R_NilValue) CDR(X)=Y; else error("bad value");} while (0)
293
#endif
16289 luke 294
#define SET_MISSING(x,v) do { \
295
  SEXP __x__ = (x); \
296
  int __v__ = (v); \
297
  int __other_flags__ = __x__->sxpinfo.gp & ~MISSING_MASK; \
298
  __x__->sxpinfo.gp = __other_flags__ | __v__; \
299
} while (0)
4562 pd 300
 
301
/* Closure Access Macros */
302
#define FORMALS(x)	((x)->u.closxp.formals)
303
#define BODY(x)		((x)->u.closxp.body)
304
#define CLOENV(x)	((x)->u.closxp.env)
305
#define DEBUG(x)	((x)->sxpinfo.debug)
306
#define TRACE(x)	((x)->sxpinfo.trace)
10172 luke 307
#define SET_DEBUG(x,v)	(((x)->sxpinfo.debug)=(v))
308
#define SET_TRACE(x,v)	(((x)->sxpinfo.trace)=(v))
4562 pd 309
 
10172 luke 310
/* Primitive Access Macros */
311
#define PRIMOFFSET(x)	((x)->u.primsxp.offset)
312
#define SET_PRIMOFFSET(x,v)	(((x)->u.primsxp.offset)=(v))
313
 
6098 pd 314
/* Symbol Access Macros */
315
#define PRINTNAME(x)	((x)->u.symsxp.pname)
316
#define SYMVALUE(x)	((x)->u.symsxp.value)
317
#define INTERNAL(x)	((x)->u.symsxp.internal)
16286 luke 318
#define DDVAL_MASK	1
319
#define DDVAL(x)	((x)->sxpinfo.gp & DDVAL_MASK) /* for ..1, ..2 etc */
10172 luke 320
#ifndef USE_WRITE_BARRIER
321
#define SET_PRINTNAME(x,v)	(((x)->u.symsxp.pname)=(v))
322
#define SET_SYMVALUE(x,v)	(((x)->u.symsxp.value)=(v))
323
#define SET_INTERNAL(x,v)	(((x)->u.symsxp.internal)=(v))
324
#endif
16286 luke 325
#define SET_DDVAL_BIT(x) (((x)->sxpinfo.gp) |= DDVAL_MASK)
326
#define UNSET_DDVAL_BIT(x) (((x)->sxpinfo.gp) &= ~DDVAL_MASK)
327
#define SET_DDVAL(x,v) ((v) ? SET_DDVAL_BIT(x) : UNSET_DDVAL_BIT(x)) /* for ..1, ..2 etc */
6098 pd 328
 
329
/* Environment Access Macros */
330
#define FRAME(x)	((x)->u.envsxp.frame)
331
#define ENCLOS(x)	((x)->u.envsxp.enclos)
332
#define HASHTAB(x)	((x)->u.envsxp.hashtab)
10172 luke 333
#ifndef USE_WRITE_BARRIER
334
#define SET_FRAME(x,v)		(((x)->u.envsxp.frame)=(v))
335
#define SET_ENCLOS(x,v)		(((x)->u.envsxp.enclos)=(v))
336
#define SET_HASHTAB(x,v)	(((x)->u.envsxp.hashtab)=(v))
337
#endif
10383 luke 338
#define ENVFLAGS(x)	((x)->sxpinfo.gp)	/* for environments */
339
#define SET_ENVFLAGS(x,v)	(((x)->sxpinfo.gp)=(v))
10172 luke 340
#else
341
typedef struct SEXPREC *SEXP;
342
#define CONS(a, b)	cons((a), (b))		/* data lists */
343
#define LCONS(a, b)	lcons((a), (b))		/* language lists */
344
#define CHAR(x)		R_CHAR(x)
345
#endif /* USE_RINTERNALS */
6098 pd 346
 
11390 luke 347
/* External pointer access macros */
348
#define EXTPTR_PTR(x)	CAR(x)
349
#define EXTPTR_PROT(x)	CDR(x)
350
#define EXTPTR_TAG(x)	TAG(x)
351
 
26025 luke 352
#ifdef BYTECODE
353
/* Bytecode access macros */
354
#define BCODE_CODE(x)	CAR(x)
355
#define BCODE_CONSTS(x) CDR(x)
356
#define BCODE_EXPR(x)	TAG(x)
357
#define isByteCode(x)	(TYPEOF(x)==BCODESXP)
26046 luke 358
#else
359
#define isByteCode(x)	FALSE
26025 luke 360
#endif
361
 
4562 pd 362
/* Pointer Protection and Unprotection */
363
#define PROTECT(s)	protect(s)
364
#define UNPROTECT(n)	unprotect(n)
365
#define UNPROTECT_PTR(s)	unprotect_ptr(s)
366
 
10776 luke 367
/* We sometimes need to coerce a protected value and place the new
368
   coerced value under protection.  For these cases PROTECT_WITH_INDEX
369
   saves an index of the protection location that can be used to
370
   replace the protected value using REPROTECT. */
371
typedef int PROTECT_INDEX;
372
#define PROTECT_WITH_INDEX(x,i) R_ProtectWithIndex(x,i)
373
#define REPROTECT(x,i) R_Reprotect(x,i)
374
 
4562 pd 375
/* Evaluation Environment */
15716 ripley 376
LibExtern SEXP	R_GlobalEnv;	    /* The "global" environment */
24734 ripley 377
 
16324 luke 378
LibExtern SEXP	R_BaseNamespace;    /* The (fake) name space for base */
379
LibExtern SEXP	R_NamespaceRegistry;/* Registry for registerd name spaces */
4562 pd 380
 
381
/* Special Values */
15716 ripley 382
LibExtern SEXP	R_NilValue;	    /* The nil object */
383
LibExtern SEXP	R_UnboundValue;	    /* Unbound marker */
384
LibExtern SEXP	R_MissingArg;	    /* Missing argument marker */
14904 luke 385
extern SEXP	R_RestartToken;     /* Marker for restarted function calls */
4562 pd 386
 
387
/* Symbol Table Shortcuts */
15716 ripley 388
LibExtern SEXP	R_Bracket2Symbol;   /* "[[" */
389
LibExtern SEXP	R_BracketSymbol;    /* "[" */
390
LibExtern SEXP	R_BraceSymbol;      /* "{" */
391
LibExtern SEXP	R_TmpvalSymbol;     /* "*tmp*" */
392
LibExtern SEXP	R_ClassSymbol;	    /* "class" */
393
LibExtern SEXP	R_DimNamesSymbol;   /* "dimnames" */
394
LibExtern SEXP	R_DimSymbol;	    /* "dim" */
395
LibExtern SEXP	R_DollarSymbol;	    /* "$" */
396
LibExtern SEXP	R_DotsSymbol;	    /* "..." */
397
LibExtern SEXP	R_DropSymbol;	    /* "drop" */
398
LibExtern SEXP	R_LevelsSymbol;	    /* "levels" */
399
LibExtern SEXP	R_ModeSymbol;	    /* "mode" */
400
LibExtern SEXP	R_NamesSymbol;	    /* "names" */
401
LibExtern SEXP	R_NaRmSymbol;	    /* "na.rm" */
402
LibExtern SEXP	R_RowNamesSymbol;   /* "row.names" */
403
LibExtern SEXP	R_SeedsSymbol;	    /* ".Random.seed" */
404
LibExtern SEXP	R_TspSymbol;	    /* "tsp" */
405
LibExtern SEXP	R_LastvalueSymbol;  /* ".Last.value" */
406
LibExtern SEXP	R_CommentSymbol;    /* "comment" */
407
LibExtern SEXP	R_SourceSymbol;     /* "source" */
408
LibExtern SEXP	R_DotEnvSymbol;     /* ".Environment" */
409
LibExtern SEXP	R_RecursiveSymbol;  /* "recursive" */
410
LibExtern SEXP	R_UseNamesSymbol;   /* "use.names" */
4562 pd 411
 
412
/* Missing Values - others from Arith.h */
7654 ripley 413
#define NA_STRING	R_NaString
15716 ripley 414
LibExtern SEXP	R_NaString;	    /* NA_STRING as a CHARSXP */
415
LibExtern SEXP	R_BlankString;	    /* "" as a CHARSXP */
4562 pd 416
 
417
/*--- FUNCTIONS ------------------------------------------------------ */
418
 
419
/* Type Coercions of all kinds */
420
 
26031 maechler 421
SEXP Rf_ascommon(SEXP, SEXP, SEXPTYPE);
22931 ripley 422
SEXP Rf_coerceVector(SEXP, SEXPTYPE);
423
SEXP Rf_coerceList(SEXP, SEXPTYPE);
424
void Rf_CoercionWarning(int);/* warning code */
425
SEXP Rf_PairToVectorList(SEXP x);
426
SEXP Rf_VectorToPairList(SEXP x);
4562 pd 427
 
22931 ripley 428
int Rf_LogicalFromInteger(int, int*);
429
int Rf_LogicalFromReal(double, int*);
430
int Rf_LogicalFromComplex(Rcomplex, int*);
431
int Rf_LogicalFromString(SEXP, int*);
432
int Rf_IntegerFromLogical(int, int*);
433
int Rf_IntegerFromReal(double, int*);
434
int Rf_IntegerFromComplex(Rcomplex, int*);
435
int Rf_IntegerFromString(SEXP, int*);
436
double Rf_RealFromLogical(int, int*);
437
double Rf_RealFromInteger(int, int*);
438
double Rf_RealFromComplex(Rcomplex, int*);
439
double Rf_RealFromString(SEXP, int*);
440
Rcomplex Rf_ComplexFromLogical(int, int*);
441
Rcomplex Rf_ComplexFromInteger(int, int*);
442
Rcomplex Rf_ComplexFromReal(double, int*);
443
Rcomplex Rf_ComplexFromString(SEXP, int*);
444
SEXP Rf_StringFromLogical(int, int*);
445
SEXP Rf_StringFromInteger(int, int*);
446
SEXP Rf_StringFromReal(double, int*);
447
SEXP Rf_StringFromComplex(Rcomplex, int*);
448
SEXP Rf_EnsureString(SEXP);
4562 pd 449
 
450
 
451
/* Other Internally Used Functions */
452
 
22931 ripley 453
SEXP Rf_allocArray(SEXPTYPE, SEXP);
454
SEXP Rf_allocMatrix(SEXPTYPE, int, int);
455
SEXP Rf_allocSExp(SEXPTYPE);
456
SEXP Rf_allocString(int);
28362 murdoch 457
SEXP Rf_allocVector(SEXPTYPE, R_len_t);
22931 ripley 458
SEXP Rf_allocList(int);
459
SEXP Rf_applyClosure(SEXP, SEXP, SEXP, SEXP, SEXP);
460
SEXP Rf_asChar(SEXP);
461
Rcomplex Rf_asComplex(SEXP);
462
int Rf_asInteger(SEXP);
463
int Rf_asLogical(SEXP);
464
double Rf_asReal(SEXP);
28362 murdoch 465
R_len_t Rf_asVecSize(SEXP);
27365 rgentlem 466
SEXP Rf_arraySubscript(int, SEXP, SEXP, SEXP (*)(SEXP,SEXP),
467
                       SEXP (*)(SEXP, int), SEXP);
22931 ripley 468
SEXP Rf_classgets(SEXP, SEXP);
469
Rboolean Rf_conformable(SEXP, SEXP);
470
SEXP Rf_cons(SEXP, SEXP);
471
void Rf_copyListMatrix(SEXP, SEXP, Rboolean);
472
void Rf_copyMatrix(SEXP, SEXP, Rboolean);
473
void Rf_copyMostAttrib(SEXP, SEXP);
474
void Rf_copyVector(SEXP, SEXP);
475
SEXP Rf_CreateTag(SEXP);
476
void Rf_CustomPrintValue(SEXP,SEXP);
477
void Rf_defineVar(SEXP, SEXP, SEXP);
478
SEXP Rf_dimgets(SEXP, SEXP);
479
SEXP Rf_dimnamesgets(SEXP, SEXP);
480
SEXP Rf_DropDims(SEXP);
481
SEXP Rf_duplicate(SEXP);
482
SEXP Rf_elt(SEXP, int);
483
SEXP Rf_emptyEnv(void);
484
SEXP Rf_eval(SEXP, SEXP);
17021 duncan 485
SEXP R_tryEval(SEXP e, SEXP env, int *ErrorOccurred);
22931 ripley 486
SEXP Rf_EvalArgs(SEXP, SEXP, int);
487
SEXP Rf_evalList(SEXP, SEXP);
488
SEXP Rf_evalListKeepMissing(SEXP, SEXP);
5124 ihaka 489
/* SEXP extendEnv(SEXP, SEXP, SEXP); */
22931 ripley 490
SEXP Rf_findVar(SEXP, SEXP);
491
SEXP Rf_findVarInFrame(SEXP, SEXP);
492
SEXP Rf_findVarInFrame3(SEXP, SEXP, Rboolean);
493
SEXP Rf_findFun(SEXP, SEXP);
494
SEXP Rf_getAttrib(SEXP, SEXP);
495
void Rf_GetMatrixDimnames(SEXP, SEXP*, SEXP*, char**, char**);
496
SEXP Rf_GetArrayDimnames(SEXP);
497
SEXP Rf_GetColNames(SEXP);
498
SEXP Rf_GetOption(SEXP, SEXP);
499
int Rf_GetOptionDigits(SEXP);
500
int Rf_GetOptionWidth(SEXP);
501
SEXP Rf_GetPar(char*, SEXP);
502
SEXP Rf_GetRowNames(SEXP);
503
void Rf_gsetVar(SEXP, SEXP, SEXP);
504
Rboolean Rf_inherits(SEXP, char*);
505
SEXP Rf_install(char const *);
506
Rboolean Rf_isArray(SEXP);
507
Rboolean Rf_isComplex(SEXP);
508
Rboolean Rf_isEnvironment(SEXP);
509
Rboolean Rf_isExpression(SEXP);
510
Rboolean Rf_isExpressionObject(SEXP);
511
Rboolean Rf_isFactor(SEXP);
512
Rboolean Rf_isFrame(SEXP);
513
Rboolean Rf_isFree(SEXP);
514
Rboolean Rf_isFunction(SEXP);
515
Rboolean Rf_isInteger(SEXP);
516
Rboolean Rf_isLanguage(SEXP);
517
Rboolean Rf_isList(SEXP);
518
Rboolean Rf_isLogical(SEXP);
519
Rboolean Rf_isMatrix(SEXP);
520
Rboolean Rf_isNewList(SEXP);
521
Rboolean Rf_isNull(SEXP);
522
Rboolean Rf_isNumeric(SEXP);
523
Rboolean Rf_isObject(SEXP);
524
Rboolean Rf_isOrdered(SEXP);
525
Rboolean Rf_isPairList(SEXP);
526
Rboolean Rf_isPrimitive(SEXP);
527
Rboolean Rf_isReal(SEXP);
528
Rboolean Rf_isString(SEXP);
529
Rboolean Rf_isSymbol(SEXP);
530
Rboolean Rf_isTs(SEXP);
531
Rboolean Rf_isUnordered(SEXP);
532
Rboolean Rf_isUnsorted(SEXP);
533
Rboolean Rf_isUserBinop(SEXP);
534
Rboolean Rf_isValidString(SEXP);
535
Rboolean Rf_isValidStringF(SEXP);
536
Rboolean Rf_isVector(SEXP);
537
Rboolean Rf_isVectorizable(SEXP);
538
Rboolean Rf_isVectorAtomic(SEXP);
539
Rboolean Rf_isVectorList(SEXP);
540
SEXP Rf_ItemName(SEXP, int);
541
SEXP Rf_lang1(SEXP);
542
SEXP Rf_lang2(SEXP, SEXP);
543
SEXP Rf_lang3(SEXP, SEXP, SEXP);
544
SEXP Rf_lang4(SEXP, SEXP, SEXP, SEXP);
545
SEXP Rf_lastElt(SEXP);
546
SEXP Rf_lcons(SEXP, SEXP);
28362 murdoch 547
R_len_t Rf_length(SEXP);
548
SEXP Rf_lengthgets(SEXP, R_len_t);
22931 ripley 549
SEXP Rf_list1(SEXP);
550
SEXP Rf_list2(SEXP, SEXP);
551
SEXP Rf_list3(SEXP, SEXP, SEXP);
552
SEXP Rf_list4(SEXP, SEXP, SEXP, SEXP);
553
SEXP Rf_listAppend(SEXP, SEXP);
28176 rgentlem 554
SEXP R_lsInternal(SEXP, Rboolean);
22931 ripley 555
SEXP Rf_makeSubscript(SEXP, SEXP, int *);
556
SEXP Rf_matchArg(SEXP, SEXP*);
557
SEXP Rf_matchArgs(SEXP, SEXP);
558
SEXP Rf_matchPar(char*, SEXP*);
559
SEXP Rf_mkChar(const char*);
560
SEXP Rf_mkString(const char*);
561
SEXP Rf_namesgets(SEXP, SEXP);
562
int Rf_ncols(SEXP);
563
int Rf_nrows(SEXP);
564
int Rf_nlevels(SEXP);
565
Rboolean Rf_NonNullStringMatch(SEXP, SEXP);
566
SEXP Rf_nthcdr(SEXP, int);
567
Rboolean Rf_psmatch(char *, char *, Rboolean);
568
Rboolean Rf_pmatch(SEXP, SEXP, Rboolean);
569
void Rf_PrintDefaults(SEXP);
570
void Rf_PrintValue(SEXP);
571
void Rf_PrintValueEnv(SEXP, SEXP);
572
void Rf_PrintValueRec(SEXP, SEXP);
573
SEXP Rf_protect(SEXP);
574
SEXP Rf_rownamesgets(SEXP,SEXP);
575
SEXP Rf_ScalarLogical(int);
576
SEXP Rf_ScalarInteger(int);
577
SEXP Rf_ScalarReal(double);
578
SEXP Rf_ScalarComplex(Rcomplex);
579
SEXP Rf_ScalarString(SEXP);
580
SEXP Rf_setAttrib(SEXP, SEXP, SEXP);
581
void Rf_setSVector(SEXP*, int, SEXP);
582
void Rf_setVar(SEXP, SEXP, SEXP);
583
Rboolean Rf_StringBlank(SEXP);
584
SEXP Rf_substitute(SEXP,SEXP);
585
void Rf_unprotect(int);
586
void Rf_unprotect_ptr(SEXP);
27365 rgentlem 587
SEXP Rf_vectorSubscript(int, SEXP, int*, SEXP (*)(SEXP,SEXP),
588
                        SEXP (*)(SEXP, int), SEXP);
15317 rgentlem 589
 
10776 luke 590
void R_ProtectWithIndex(SEXP, PROTECT_INDEX *);
591
void R_Reprotect(SEXP, PROTECT_INDEX);
10935 maechler 592
SEXP R_subassign3_dflt(SEXP, SEXP, SEXP, SEXP);
593
SEXP R_subset3_dflt(SEXP, SEXP);
4562 pd 594
 
9147 maechler 595
				/* return(.) NOT reached : for -Wall */
22931 ripley 596
#define error_return(msg)	{ Rf_error(msg);	   return R_NilValue; }
597
#define errorcall_return(cl,msg){ Rf_errorcall(cl, msg);   return R_NilValue; }
9147 maechler 598
 
4629 ripley 599
#ifdef __MAIN__
600
#undef extern
15716 ripley 601
#undef LibExtern
4562 pd 602
#endif
4629 ripley 603
 
10172 luke 604
/* General Cons Cell Attributes */
605
SEXP (ATTRIB)(SEXP x);
606
int (OBJECT)(SEXP x);
607
int (MARK)(SEXP x);
608
int (TYPEOF)(SEXP x);
609
int (NAMED)(SEXP x);
610
void (SET_ATTRIB)(SEXP x, SEXP v);
611
void (SET_OBJECT)(SEXP x, int v);
612
void (SET_TYPEOF)(SEXP x, int v);
613
void (SET_NAMED)(SEXP x, int v);
614
 
615
/* Vector Access Macros */
616
int (LENGTH)(SEXP x);
617
int (TRUELENGTH)(SEXP x);
618
char *(R_CHAR)(SEXP x);
619
SEXP (STRING_ELT)(SEXP x, int i);
620
void (SETLENGTH)(SEXP x, int v);
621
void (SET_TRUELENGTH)(SEXP x, int v);
622
void (SET_STRING_ELT)(SEXP x, int i, SEXP v);
623
int (LEVELS)(SEXP x);
624
int (SETLEVELS)(SEXP x, int v);
625
SEXP (VECTOR_ELT)(SEXP x, int i);
626
SEXP (SET_VECTOR_ELT)(SEXP x, int i, SEXP v);
627
int *(LOGICAL)(SEXP x);
628
int *(INTEGER)(SEXP x);
629
double *(REAL)(SEXP x);
630
Rcomplex *(COMPLEX)(SEXP x);
631
SEXP *(STRING_PTR)(SEXP x);
632
SEXP *(VECTOR_PTR)(SEXP x);
633
 
634
/* List Access Macros */
635
/* These also work for ... objects */
636
/*#define LISTVAL(x)	((x)->u.listsxp)*/
637
SEXP (TAG)(SEXP e);
638
SEXP (CAR)(SEXP e);
639
SEXP (CDR)(SEXP e);
640
SEXP (CAAR)(SEXP e);
641
SEXP (CDAR)(SEXP e);
642
SEXP (CADR)(SEXP e);
643
SEXP (CDDR)(SEXP e);
644
SEXP (CADDR)(SEXP e);
645
SEXP (CADDDR)(SEXP e);
646
SEXP (CAD4R)(SEXP e);
647
int (MISSING)(SEXP x);
648
void (SET_TAG)(SEXP x, SEXP y);
649
SEXP (SETCAR)(SEXP x, SEXP y);
650
SEXP (SETCDR)(SEXP x, SEXP y);
651
SEXP (SETCADR)(SEXP x, SEXP y);
652
SEXP (SETCADDR)(SEXP x, SEXP y);
653
SEXP (SETCADDDR)(SEXP x, SEXP y);
654
SEXP (SETCAD4R)(SEXP e, SEXP y);
655
void (SET_MISSING)(SEXP x, int v);
656
 
657
/* Closure Access Macros */
658
SEXP (FORMALS)(SEXP x);
659
SEXP (BODY)(SEXP x);
660
SEXP (CLOENV)(SEXP x);
661
int (DEBUG)(SEXP x);
662
int (TRACE)(SEXP x);
663
void (SET_FORMALS)(SEXP x, SEXP v);
664
void (SET_BODY)(SEXP x, SEXP v);
665
void (SET_CLOENV)(SEXP x, SEXP v);
666
void (SET_DEBUG)(SEXP x, int v);
667
void (SET_TRACE)(SEXP x, int v);
668
 
669
/* Primitive Access Macros */
670
int (PRIMOFFSET)(SEXP x);
671
void (SET_PRIMOFFSET)(SEXP x, int v);
672
 
673
 
674
/* Symbol Access Macros */
675
SEXP (PRINTNAME)(SEXP x);
676
SEXP (SYMVALUE)(SEXP x);
677
SEXP (INTERNAL)(SEXP x);
678
int (DDVAL)(SEXP x);
679
void (SET_PRINTNAME)(SEXP x, SEXP v);
680
void (SET_SYMVALUE)(SEXP x, SEXP v);
681
void (SET_INTERNAL)(SEXP x, SEXP v);
682
void (SET_DDVAL)(SEXP x, int v);
683
 
684
/* Environment Access Macros */
685
SEXP (FRAME)(SEXP x);
686
SEXP (ENCLOS)(SEXP x);
687
SEXP (HASHTAB)(SEXP x);
10383 luke 688
int (ENVFLAGS)(SEXP x);
10172 luke 689
void (SET_FRAME)(SEXP x, SEXP v);
690
void (SET_ENCLOS)(SEXP x, SEXP v);
691
void (SET_HASHTAB)(SEXP x, SEXP v);
10383 luke 692
void (SET_ENVFLAGS)(SEXP x, int v);
10172 luke 693
 
694
/* Promise Access Macros */
26020 luke 695
SEXP (PRCODE)(SEXP x);
10172 luke 696
SEXP (PRENV)(SEXP x);
697
SEXP (PRVALUE)(SEXP x);
698
int (PRSEEN)(SEXP x);
699
void (SET_PRENV)(SEXP x, SEXP v);
700
void (SET_PRVALUE)(SEXP x, SEXP v);
701
void (SET_PRSEEN)(SEXP x, int v);
702
 
703
/* Hashing Macros */
704
int (HASHASH)(SEXP x);
705
int (HASHVALUE)(SEXP x);
706
void (SET_HASHASH)(SEXP x, int v);
707
void (SET_HASHVALUE)(SEXP x, int v);
11116 ripley 708
 
11390 luke 709
/* External pointer interface */
710
SEXP R_MakeExternalPtr(void *p, SEXP tag, SEXP prot);
711
void *R_ExternalPtrAddr(SEXP s);
712
SEXP R_ExternalPtrTag(SEXP s);
713
SEXP R_ExternalPtrProtected(SEXP s);
714
void R_ClearExternalPtr(SEXP s);
715
void R_SetExternalPtrAddr(SEXP s, void *p);
716
void R_SetExternalPtrTag(SEXP s, SEXP tag);
717
void R_SetExternalPtrProtected(SEXP s, SEXP p);
718
 
719
/* Finalization interface */
720
typedef void (*R_CFinalizer_t)(SEXP);
721
void R_RegisterFinalizer(SEXP s, SEXP fun);
722
void R_RegisterCFinalizer(SEXP s, R_CFinalizer_t fun);
15884 luke 723
void R_RegisterFinalizerEx(SEXP s, SEXP fun, Rboolean onexit);
724
void R_RegisterCFinalizerEx(SEXP s, R_CFinalizer_t fun, Rboolean onexit);
11390 luke 725
 
15928 luke 726
/* Weak reference interface */
727
SEXP R_MakeWeakRef(SEXP key, SEXP val, SEXP fin, Rboolean onexit);
728
SEXP R_MakeWeakRefC(SEXP key, SEXP val, R_CFinalizer_t fin, Rboolean onexit);
729
SEXP R_WeakRefKey(SEXP w);
730
SEXP R_WeakRefValue(SEXP w);
731
void R_RunWeakRefFinalizer(SEXP w);
732
 
26020 luke 733
#ifdef BYTECODE
734
SEXP R_PromiseExpr(SEXP);
26037 luke 735
SEXP R_ClosureExpr(SEXP);
26020 luke 736
void R_initialize_bcode(void);
737
SEXP R_bcEncode(SEXP);
738
SEXP R_bcDecode(SEXP);
739
#define PREXPR(e) R_PromiseExpr(e)
26037 luke 740
#define BODY_EXPR(e) R_ClosureExpr(e)
26020 luke 741
#else
742
#define PREXPR(e) PRCODE(e)
26037 luke 743
#define BODY_EXPR(e) BODY(e)
26020 luke 744
#endif
745
 
14634 luke 746
/* Protected evaluation */
747
Rboolean R_ToplevelExec(void (*fun)(void *), void *data);
16369 luke 748
 
749
/* Environment and Binding Features */
16376 luke 750
void R_RestoreHashCount(SEXP rho);
16400 luke 751
Rboolean R_IsPackageEnv(SEXP rho);
752
SEXP R_PackageEnvName(SEXP rho);
16409 luke 753
SEXP R_FindPackageEnv(SEXP info);
16400 luke 754
Rboolean R_IsNamespaceEnv(SEXP rho);
23387 luke 755
SEXP R_NamespaceEnvSpec(SEXP rho);
16409 luke 756
SEXP R_FindNamespace(SEXP info);
16369 luke 757
void R_LockEnvironment(SEXP env, Rboolean bindings);
16400 luke 758
Rboolean R_EnvironmentIsLocked(SEXP env);
16369 luke 759
void R_LockBinding(SEXP sym, SEXP env);
760
void R_MakeActiveBinding(SEXP sym, SEXP fun, SEXP env);
16400 luke 761
Rboolean R_BindingIsLocked(SEXP sym, SEXP env);
762
Rboolean R_BindingIsActive(SEXP sym, SEXP env);
16369 luke 763
Rboolean R_HasFancyBindings(SEXP rho);
16472 luke 764
 
16626 luke 765
/* Experimental Changes in Dispatching */
766
void R_SetUseNamespaceDispatch(Rboolean val);
767
 
16472 luke 768
/* Save/Load Interface */
769
#define R_XDR_DOUBLE_SIZE 8
770
#define R_XDR_INTEGER_SIZE 4
20981 maechler 771
 
16472 luke 772
void R_XDREncodeDouble(double d, void *buf);
773
double R_XDRDecodeDouble(void *buf);
774
void R_XDREncodeInteger(int i, void *buf);
775
int R_XDRDecodeInteger(void *buf);
776
 
777
typedef void *R_pstream_data_t;
778
 
779
typedef enum {
780
    R_pstream_any_format,
781
    R_pstream_ascii_format,
782
    R_pstream_binary_format,
783
    R_pstream_xdr_format
784
} R_pstream_format_t;
785
 
786
typedef struct R_outpstream_st *R_outpstream_t;
787
struct R_outpstream_st {
788
    R_pstream_data_t data;
789
    R_pstream_format_t type;
790
    int version;
791
    void (*OutChar)(R_outpstream_t, int);
792
    void (*OutBytes)(R_outpstream_t, void *, int);
793
    SEXP (*OutPersistHookFunc)(SEXP, SEXP);
794
    SEXP OutPersistHookData;
795
};
20981 maechler 796
 
16472 luke 797
typedef struct R_inpstream_st *R_inpstream_t;
798
struct R_inpstream_st {
799
    R_pstream_data_t data;
800
    R_pstream_format_t type;
801
    int (*InChar)(R_inpstream_t);
802
    void (*InBytes)(R_inpstream_t, void *, int);
803
    SEXP (*InPersistHookFunc)(SEXP, SEXP);
804
    SEXP InPersistHookData;
805
};
806
 
807
void R_InitInPStream(R_inpstream_t stream, R_pstream_data_t data,
808
		     R_pstream_format_t type,
809
		     int (*inchar)(R_inpstream_t),
810
		     void (*inbytes)(R_inpstream_t, void *, int),
811
		     SEXP (*phook)(SEXP, SEXP), SEXP pdata);
812
void R_InitOutPStream(R_outpstream_t stream, R_pstream_data_t data,
813
		      R_pstream_format_t type, int version,
814
		      void (*outchar)(R_outpstream_t, int),
815
		      void (*outbytes)(R_outpstream_t, void *, int),
816
		      SEXP (*phook)(SEXP, SEXP), SEXP pdata);
817
 
818
void R_InitFileInPStream(R_inpstream_t stream, FILE *fp,
819
			 R_pstream_format_t type,
820
			 SEXP (*phook)(SEXP, SEXP), SEXP pdata);
821
void R_InitFileOutPStream(R_outpstream_t stream, FILE *fp,
822
			  R_pstream_format_t type, int version,
823
			  SEXP (*phook)(SEXP, SEXP), SEXP pdata);
824
 
825
#ifdef NEED_CONNECTION_PSTREAMS
17728 ripley 826
/* The connection interface is not yet available to packages.  To
16472 luke 827
   allow limited use of connection pointers this defines the opaque
828
   pointer type. */
829
#ifndef HAVE_RCONNECTION_TYPEDEF
830
typedef struct Rconn  *Rconnection;
831
#define HAVE_RCONNECTION_TYPEDEF
832
#endif
833
void R_InitConnOutPStream(R_outpstream_t stream, Rconnection con,
834
			  R_pstream_format_t type, int version,
835
			  SEXP (*phook)(SEXP, SEXP), SEXP pdata);
836
void R_InitConnInPStream(R_inpstream_t stream,  Rconnection con,
837
			 R_pstream_format_t type,
838
			 SEXP (*phook)(SEXP, SEXP), SEXP pdata);
839
#endif
840
 
841
void R_Serialize(SEXP s, R_outpstream_t ops);
842
SEXP R_Unserialize(R_inpstream_t ips);
20088 jmc 843
 
844
/* slot management */
845
SEXP R_do_slot(SEXP obj, SEXP name);
846
SEXP R_do_slot_assign(SEXP obj, SEXP name, SEXP value);
847
 
21853 jmc 848
/* class definition, new objects */
849
SEXP R_do_MAKE_CLASS(char *what);
850
SEXP R_do_new_object(SEXP class_def);
851
 
25927 ripley 852
/* preserve objects across GCs */
853
void R_PreserveObject(SEXP);
854
void R_ReleaseObject(SEXP);
855
 
25983 ripley 856
/* Shutdown actions */
857
void R_dot_Last(void);		/* in main.c */
858
void R_RunExitFinalizers(void);	/* in memory.c */
25927 ripley 859
 
26152 luke 860
/* Recpalcments for popen and system */
861
#ifdef HAVE_POPEN
862
FILE *R_popen(char *, char *);
863
#endif
864
int R_system(char *);
25983 ripley 865
 
26152 luke 866
 
22931 ripley 867
#ifndef R_NO_REMAP
868
#define allocArray		Rf_allocArray
869
#define allocList		Rf_allocList
870
#define allocMatrix		Rf_allocMatrix
871
#define allocSExp		Rf_allocSExp
872
#define allocString		Rf_allocString
873
#define allocVector		Rf_allocVector
874
#define applyClosure		Rf_applyClosure
875
#define arraySubscript		Rf_arraySubscript
876
#define asChar			Rf_asChar
26031 maechler 877
#define ascommon		Rf_ascommon
22931 ripley 878
#define asComplex		Rf_asComplex
879
#define asInteger		Rf_asInteger
880
#define asLogical		Rf_asLogical
881
#define asReal			Rf_asReal
28362 murdoch 882
#define asVecSize		Rf_asVecSize
22931 ripley 883
#define classgets		Rf_classgets
884
#define coerceList		Rf_coerceList
885
#define coerceVector		Rf_coerceVector
886
#define CoercionWarning		Rf_CoercionWarning
887
#define ComplexFromInteger	Rf_ComplexFromInteger
888
#define ComplexFromLogical	Rf_ComplexFromLogical
889
#define ComplexFromReal		Rf_ComplexFromReal
890
#define ComplexFromString	Rf_ComplexFromString
891
#define conformable		Rf_conformable
892
#define cons			Rf_cons
893
#define copyListMatrix		Rf_copyListMatrix
894
#define copyMatrix		Rf_copyMatrix
895
#define copyMostAttrib		Rf_copyMostAttrib
896
#define copyVector		Rf_copyVector
897
#define CreateTag		Rf_CreateTag
898
#define CustomPrintValue	Rf_CustomPrintValue
899
#define defineVar		Rf_defineVar
900
#define dimgets			Rf_dimgets
901
#define dimnamesgets		Rf_dimnamesgets
902
#define DropDims                Rf_DropDims
903
#define duplicate		Rf_duplicate
904
#define elt			Rf_elt
905
#define emptyEnv		Rf_emptyEnv
906
#define EnsureString		Rf_EnsureString
907
#define eval			Rf_eval
908
#define EvalArgs		Rf_EvalArgs
909
#define evalList		Rf_evalList
910
#define evalListKeepMissing	Rf_evalListKeepMissing
911
#define findFun			Rf_findFun
912
#define findVar			Rf_findVar
913
#define findVarInFrame		Rf_findVarInFrame
914
#define findVarInFrame3		Rf_findVarInFrame3
915
#define GetArrayDimnames	Rf_GetArrayDimnames
916
#define getAttrib		Rf_getAttrib
917
#define GetColNames		Rf_GetColNames
918
#define GetMatrixDimnames	Rf_GetMatrixDimnames
919
#define GetOption		Rf_GetOption
920
#define GetOptionDigits		Rf_GetOptionDigits
921
#define GetOptionWidth		Rf_GetOptionWidth
922
#define GetPar			Rf_GetPar
923
#define GetRowNames		Rf_GetRowNames
924
#define gsetVar			Rf_gsetVar
925
#define inherits		Rf_inherits
926
#define install			Rf_install
927
#define IntegerFromComplex	Rf_IntegerFromComplex
928
#define IntegerFromLogical	Rf_IntegerFromLogical
929
#define IntegerFromReal		Rf_IntegerFromReal
930
#define IntegerFromString	Rf_IntegerFromString
931
#define isArray			Rf_isArray
932
#define isComplex		Rf_isComplex
933
#define isEnvironment		Rf_isEnvironment
934
#define isExpression		Rf_isExpression
935
#define isExpressionObject	Rf_isExpressionObject
936
#define isFactor		Rf_isFactor
937
#define isFrame			Rf_isFrame
938
#define isFree			Rf_isFree
939
#define isFunction		Rf_isFunction
940
#define isInteger		Rf_isInteger
941
#define isLanguage		Rf_isLanguage
942
#define isList			Rf_isList
943
#define isLogical		Rf_isLogical
944
#define isMatrix		Rf_isMatrix
945
#define isNewList		Rf_isNewList
946
#define isNull			Rf_isNull
947
#define isNumeric		Rf_isNumeric
948
#define isObject		Rf_isObject
949
#define isOrdered		Rf_isOrdered
950
#define isPairList		Rf_isPairList
951
#define isPrimitive		Rf_isPrimitive
952
#define isReal			Rf_isReal
953
#define isString		Rf_isString
954
#define isSymbol		Rf_isSymbol
955
#define isTs			Rf_isTs
956
#define isUnordered		Rf_isUnordered
957
#define isUnsorted		Rf_isUnsorted
958
#define isUserBinop		Rf_isUserBinop
959
#define isValidString		Rf_isValidString
960
#define isValidStringF		Rf_isValidStringF
961
#define isVector		Rf_isVector
962
#define isVectorAtomic		Rf_isVectorAtomic
963
#define isVectorizable		Rf_isVectorizable
964
#define isVectorList		Rf_isVectorList
965
#define ItemName		Rf_ItemName
966
#define lang1			Rf_lang1
967
#define lang2			Rf_lang2
968
#define lang3			Rf_lang3
969
#define lang4			Rf_lang4
970
#define lastElt			Rf_lastElt
971
#define lcons			Rf_lcons
972
#define length(x)		Rf_length(x)
973
#define lengthgets		Rf_lengthgets
974
#define list1			Rf_list1
975
#define list2			Rf_list2
976
#define list3			Rf_list3
977
#define list4			Rf_list4
978
#define listAppend		Rf_listAppend
979
#define LogicalFromComplex	Rf_LogicalFromComplex
980
#define LogicalFromInteger	Rf_LogicalFromInteger
981
#define LogicalFromReal		Rf_LogicalFromReal
982
#define LogicalFromString	Rf_LogicalFromString
983
#define makeSubscript		Rf_makeSubscript
984
#define matchArg		Rf_matchArg
985
#define matchArgs		Rf_matchArgs
986
#define matchPar		Rf_matchPar
987
#define mkChar			Rf_mkChar
988
#define mkString		Rf_mkString
989
#define namesgets		Rf_namesgets
990
#define ncols			Rf_ncols
991
#define nlevels			Rf_nlevels
992
#define NonNullStringMatch	Rf_NonNullStringMatch
993
#define nrows			Rf_nrows
994
#define nthcdr			Rf_nthcdr
995
#define PairToVectorList	Rf_PairToVectorList
996
#define pmatch			Rf_pmatch
997
#define psmatch			Rf_psmatch
998
#define PrintDefaults		Rf_PrintDefaults
999
#define PrintValue		Rf_PrintValue
1000
#define PrintValueEnv		Rf_PrintValueEnv
1001
#define PrintValueRec		Rf_PrintValueRec
1002
#define protect			Rf_protect
1003
#define RealFromComplex		Rf_RealFromComplex
1004
#define RealFromInteger		Rf_RealFromInteger
1005
#define RealFromLogical		Rf_RealFromLogical
1006
#define RealFromString		Rf_RealFromString
1007
#define rownamesgets		Rf_rownamesgets
1008
#define ScalarComplex		Rf_ScalarComplex
1009
#define ScalarInteger		Rf_ScalarInteger
1010
#define ScalarLogical		Rf_ScalarLogical
1011
#define ScalarReal		Rf_ScalarReal
1012
#define ScalarString		Rf_ScalarString
1013
#define setAttrib		Rf_setAttrib
1014
#define setSVector		Rf_setSVector
1015
#define setVar			Rf_setVar
1016
#define StringBlank		Rf_StringBlank
1017
#define StringFromComplex	Rf_StringFromComplex
1018
#define StringFromInteger	Rf_StringFromInteger
1019
#define StringFromLogical	Rf_StringFromLogical
1020
#define StringFromReal		Rf_StringFromReal
1021
#define substitute		Rf_substitute
1022
#define unprotect		Rf_unprotect
1023
#define unprotect_ptr		Rf_unprotect_ptr
1024
#define VectorToPairList	Rf_VectorToPairList
1025
#define vectorSubscript         Rf_vectorSubscript
1026
#endif
1027
 
11116 ripley 1028
#endif /* _R_INTERNALS_H_ */