The R Project SVN R

Rev

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

Rev 7003 Rev 7133
Line 47... Line 47...
47
 
47
 
48
#ifdef __MAIN__
48
#ifdef __MAIN__
49
#define extern
49
#define extern
50
#endif
50
#endif
51
#include "R_ext/Arith.h"
51
#include "R_ext/Arith.h"
52
 
-
 
-
 
52
#define Rwrap(x) x
53
 
53
 
54
/*  Fundamental Data Types:  These are largely Lisp  */
54
/*  Fundamental Data Types:  These are largely Lisp  */
55
/*  influenced structures, with the exception of LGLSXP,  */
55
/*  influenced structures, with the exception of LGLSXP,  */
56
/*  INTSXP, REALSXP, CPLXSXP and STRSXP which are the  */
56
/*  INTSXP, REALSXP, CPLXSXP and STRSXP which are the  */
57
/*  element types for S-like data objects.  */
57
/*  element types for S-like data objects.  */
Line 243... Line 243...
243
 
243
 
244
/*--- FUNCTIONS ------------------------------------------------------ */
244
/*--- FUNCTIONS ------------------------------------------------------ */
245
 
245
 
246
/* Type Coercions of all kinds */
246
/* Type Coercions of all kinds */
247
 
247
 
248
SEXP coerceVector(SEXP, SEXPTYPE);
248
SEXP Rwrap(coerceVector)(SEXP, SEXPTYPE);
249
SEXP coerceList(SEXP, SEXPTYPE);
249
SEXP Rwrap(coerceList)(SEXP, SEXPTYPE);
250
void CoercionWarning(int);/* warning code */
250
void Rwrap(CoercionWarning)(int);/* warning code */
251
SEXP PairToVectorList(SEXP x);
251
SEXP Rwrap(PairToVectorList)(SEXP x);
252
SEXP VectorToPairList(SEXP x);
252
SEXP Rwrap(VectorToPairList)(SEXP x);
253
 
253
 
254
int LogicalFromInteger(int, int*);
254
int Rwrap(LogicalFromInteger)(int, int*);
255
int LogicalFromReal(double, int*);
255
int Rwrap(LogicalFromReal)(double, int*);
256
int LogicalFromComplex(Rcomplex, int*);
256
int Rwrap(LogicalFromComplex)(Rcomplex, int*);
257
int LogicalFromString(SEXP, int*);
257
int Rwrap(LogicalFromString)(SEXP, int*);
258
int IntegerFromLogical(int, int*);
258
int Rwrap(IntegerFromLogical)(int, int*);
259
int IntegerFromReal(double, int*);
259
int Rwrap(IntegerFromReal)(double, int*);
260
int IntegerFromComplex(Rcomplex, int*);
260
int Rwrap(IntegerFromComplex)(Rcomplex, int*);
261
int IntegerFromString(SEXP, int*);
261
int Rwrap(IntegerFromString)(SEXP, int*);
262
double RealFromLogical(int, int*);
262
double Rwrap(RealFromLogical)(int, int*);
263
double RealFromInteger(int, int*);
263
double Rwrap(RealFromInteger)(int, int*);
264
double RealFromComplex(Rcomplex, int*);
264
double Rwrap(RealFromComplex)(Rcomplex, int*);
265
double RealFromString(SEXP, int*);
265
double Rwrap(RealFromString)(SEXP, int*);
266
Rcomplex ComplexFromLogical(int, int*);
266
Rcomplex Rwrap(ComplexFromLogical)(int, int*);
267
Rcomplex ComplexFromInteger(int, int*);
267
Rcomplex Rwrap(ComplexFromInteger)(int, int*);
268
Rcomplex ComplexFromReal(double, int*);
268
Rcomplex Rwrap(ComplexFromReal)(double, int*);
269
Rcomplex ComplexFromString(SEXP, int*);
269
Rcomplex Rwrap(ComplexFromString)(SEXP, int*);
270
SEXP StringFromLogical(int, int*);
270
SEXP Rwrap(StringFromLogical)(int, int*);
271
SEXP StringFromInteger(int, int*);
271
SEXP Rwrap(StringFromInteger)(int, int*);
272
SEXP StringFromReal(double, int*);
272
SEXP Rwrap(StringFromReal)(double, int*);
273
SEXP StringFromComplex(Rcomplex, int*);
273
SEXP Rwrap(StringFromComplex)(Rcomplex, int*);
274
SEXP EnsureString(SEXP);
274
SEXP Rwrap(EnsureString)(SEXP);
275
 
275
 
276
 
276
 
277
/* Other Internally Used Functions */
277
/* Other Internally Used Functions */
278
 
278
 
279
SEXP allocArray(SEXPTYPE, SEXP);
279
SEXP Rwrap(allocArray)(SEXPTYPE, SEXP);
280
SEXP allocMatrix(SEXPTYPE, int, int);
280
SEXP Rwrap(allocMatrix)(SEXPTYPE, int, int);
281
SEXP allocSExp(SEXPTYPE);
281
SEXP Rwrap(allocSExp)(SEXPTYPE);
282
SEXP allocString(int);
282
SEXP Rwrap(allocString)(int);
283
SEXP allocVector(SEXPTYPE, int);
283
SEXP Rwrap(allocVector)(SEXPTYPE, int);
284
SEXP allocList(int);
284
SEXP Rwrap(allocList)(int);
285
SEXP append(SEXP, SEXP);
285
SEXP Rwrap(append)(SEXP, SEXP);
286
SEXP applyClosure(SEXP, SEXP, SEXP, SEXP, SEXP);
286
SEXP Rwrap(applyClosure)(SEXP, SEXP, SEXP, SEXP, SEXP);
287
SEXP asChar(SEXP);
287
SEXP Rwrap(asChar)(SEXP);
288
Rcomplex asComplex(SEXP);
288
Rcomplex Rwrap(asComplex)(SEXP);
289
int asInteger(SEXP);
289
int Rwrap(asInteger)(SEXP);
290
int asLogical(SEXP);
290
int Rwrap(asLogical)(SEXP);
291
double asReal(SEXP);
291
double Rwrap(asReal)(SEXP);
292
SEXP arraySubscript(int, SEXP, SEXP);
292
SEXP Rwrap(arraySubscript)(int, SEXP, SEXP);
293
int conformable(SEXP, SEXP);
293
int Rwrap(conformable)(SEXP, SEXP);
294
SEXP cons(SEXP, SEXP);
294
SEXP Rwrap(cons)(SEXP, SEXP);
295
void copyListMatrix(SEXP, SEXP, int);
295
void Rwrap(copyListMatrix)(SEXP, SEXP, int);
296
void copyMatrix(SEXP, SEXP, int);
296
void Rwrap(copyMatrix)(SEXP, SEXP, int);
297
void copyMostAttrib(SEXP, SEXP);
297
void Rwrap(copyMostAttrib)(SEXP, SEXP);
298
void copyVector(SEXP, SEXP);
298
void Rwrap(copyVector)(SEXP, SEXP);
299
SEXP CreateTag(SEXP);
299
SEXP Rwrap(CreateTag)(SEXP);
300
void CustomPrintValue(SEXP,SEXP);
300
void Rwrap(CustomPrintValue)(SEXP,SEXP);
301
void defineVar(SEXP, SEXP, SEXP);
301
void Rwrap(defineVar)(SEXP, SEXP, SEXP);
302
SEXP dimgets(SEXP, SEXP);
302
SEXP Rwrap(dimgets)(SEXP, SEXP);
303
SEXP dimnamesgets(SEXP, SEXP);
303
SEXP Rwrap(dimnamesgets)(SEXP, SEXP);
304
SEXP duplicate(SEXP);
304
SEXP Rwrap(duplicate)(SEXP);
305
SEXP elt(SEXP, int);
305
SEXP Rwrap(elt)(SEXP, int);
306
SEXP emptyEnv(void);
306
SEXP Rwrap(emptyEnv)(void);
307
void errorcall(SEXP, char*, ...);
307
void Rwrap(errorcall)(SEXP, char*, ...);
308
void ErrorMessage(SEXP, int, ...);
308
void Rwrap(ErrorMessage)(SEXP, int, ...);
309
SEXP eval(SEXP, SEXP);
309
SEXP Rwrap(eval)(SEXP, SEXP);
310
SEXP EvalArgs(SEXP, SEXP, int);
310
SEXP Rwrap(EvalArgs)(SEXP, SEXP, int);
311
SEXP evalList(SEXP, SEXP);
311
SEXP Rwrap(evalList)(SEXP, SEXP);
312
SEXP evalListKeepMissing(SEXP, SEXP);
312
SEXP Rwrap(evalListKeepMissing)(SEXP, SEXP);
313
/* SEXP extendEnv(SEXP, SEXP, SEXP); */
313
/* SEXP extendEnv(SEXP, SEXP, SEXP); */
314
SEXP findVar(SEXP, SEXP);
314
SEXP Rwrap(findVar)(SEXP, SEXP);
315
SEXP findFun(SEXP, SEXP);
315
SEXP Rwrap(findFun)(SEXP, SEXP);
316
SEXP getAttrib(SEXP, SEXP);
316
SEXP Rwrap(getAttrib)(SEXP, SEXP);
317
void GetMatrixDimnames(SEXP, SEXP*, SEXP*, char**, char**);
317
void Rwrap(GetMatrixDimnames)(SEXP, SEXP*, SEXP*, char**, char**);
318
SEXP GetArrayDimnames(SEXP);
318
SEXP Rwrap(GetArrayDimnames)(SEXP);
319
SEXP GetColNames(SEXP);
319
SEXP Rwrap(GetColNames)(SEXP);
320
SEXP GetOption(SEXP, SEXP);
320
SEXP Rwrap(GetOption)(SEXP, SEXP);
321
int GetOptionDigits(SEXP);
321
int Rwrap(GetOptionDigits)(SEXP);
322
int GetOptionWidth(SEXP);
322
int Rwrap(GetOptionWidth)(SEXP);
323
SEXP GetPar(char*, SEXP);
323
SEXP Rwrap(GetPar)(char*, SEXP);
324
SEXP GetRowNames(SEXP);
324
SEXP Rwrap(GetRowNames)(SEXP);
325
void gsetVar(SEXP, SEXP, SEXP);
325
void Rwrap(gsetVar)(SEXP, SEXP, SEXP);
326
int inherits(SEXP, char*);
326
int Rwrap(inherits)(SEXP, char*);
327
SEXP install(char*);
327
SEXP Rwrap(install)(char*);
328
int isArray(SEXP);
328
int Rwrap(isArray)(SEXP);
329
int isComplex(SEXP);
329
int Rwrap(isComplex)(SEXP);
330
int isEnvironment(SEXP);
330
int Rwrap(isEnvironment)(SEXP);
331
int isExpression(SEXP);
331
int Rwrap(isExpression)(SEXP);
332
int isExpressionObject(SEXP);
332
int Rwrap(isExpressionObject)(SEXP);
333
int isFactor(SEXP);
333
int Rwrap(isFactor)(SEXP);
334
int isFrame(SEXP);
334
int Rwrap(isFrame)(SEXP);
335
int isFunction(SEXP);
335
int Rwrap(isFunction)(SEXP);
336
int isInteger(SEXP);
336
int Rwrap(isInteger)(SEXP);
337
int isLanguage(SEXP);
337
int Rwrap(isLanguage)(SEXP);
338
int isList(SEXP);
338
int Rwrap(isList)(SEXP);
339
int isLogical(SEXP);
339
int Rwrap(isLogical)(SEXP);
340
int isMatrix(SEXP);
340
int Rwrap(isMatrix)(SEXP);
341
int isNewList(SEXP);
341
int Rwrap(isNewList)(SEXP);
342
int isNull(SEXP);
342
int Rwrap(isNull)(SEXP);
343
int isNumeric(SEXP);
343
int Rwrap(isNumeric)(SEXP);
344
int isObject(SEXP);
344
int Rwrap(isObject)(SEXP);
345
int isOrdered(SEXP);
345
int Rwrap(isOrdered)(SEXP);
346
int isPairList(SEXP);
346
int Rwrap(isPairList)(SEXP);
347
int isReal(SEXP);
347
int Rwrap(isReal)(SEXP);
348
int isString(SEXP);
348
int Rwrap(isString)(SEXP);
349
int isSymbol(SEXP);
349
int Rwrap(isSymbol)(SEXP);
350
int isTs(SEXP);
350
int Rwrap(isTs)(SEXP);
351
int isUnordered(SEXP);
351
int Rwrap(isUnordered)(SEXP);
352
int isUserBinop(SEXP);
352
int Rwrap(isUserBinop)(SEXP);
353
int isValidString(SEXP);
353
int Rwrap(isValidString)(SEXP);
354
int isValidStringF(SEXP);
354
int Rwrap(isValidStringF)(SEXP);
355
int isVector(SEXP);
355
int Rwrap(isVector)(SEXP);
356
int isVectorizable(SEXP);
356
int Rwrap(isVectorizable)(SEXP);
357
int isVectorAtomic(SEXP);
357
int Rwrap(isVectorAtomic)(SEXP);
358
int isVectorList(SEXP);
358
int Rwrap(isVectorList)(SEXP);
359
SEXP ItemName(SEXP, int);
359
SEXP Rwrap(ItemName)(SEXP, int);
360
SEXP lang1(SEXP);
360
SEXP Rwrap(lang1)(SEXP);
361
SEXP lang2(SEXP, SEXP);
361
SEXP Rwrap(lang2)(SEXP, SEXP);
362
SEXP lang3(SEXP, SEXP, SEXP);
362
SEXP Rwrap(lang3)(SEXP, SEXP, SEXP);
363
SEXP lang4(SEXP, SEXP, SEXP, SEXP);
363
SEXP Rwrap(lang4)(SEXP, SEXP, SEXP, SEXP);
364
SEXP lastElt(SEXP);
364
SEXP Rwrap(lastElt)(SEXP);
365
SEXP lcons(SEXP, SEXP);
365
SEXP Rwrap(lcons)(SEXP, SEXP);
366
int length(SEXP);
366
int Rwrap(length)(SEXP);
367
SEXP list1(SEXP);
367
SEXP Rwrap(list1)(SEXP);
368
SEXP list2(SEXP, SEXP);
368
SEXP Rwrap(list2)(SEXP, SEXP);
369
SEXP list3(SEXP, SEXP, SEXP);
369
SEXP Rwrap(list3)(SEXP, SEXP, SEXP);
370
SEXP list4(SEXP, SEXP, SEXP, SEXP);
370
SEXP Rwrap(list4)(SEXP, SEXP, SEXP, SEXP);
371
SEXP listAppend(SEXP, SEXP);
371
SEXP Rwrap(listAppend)(SEXP, SEXP);
372
SEXP makeSubscript(SEXP, SEXP, int *);
372
SEXP Rwrap(makeSubscript)(SEXP, SEXP, int *);
373
SEXP matchArg(SEXP, SEXP*);
373
SEXP Rwrap(matchArg)(SEXP, SEXP*);
374
SEXP matchArgs(SEXP, SEXP);
374
SEXP Rwrap(matchArgs)(SEXP, SEXP);
375
SEXP matchPar(char*, SEXP*);
375
SEXP Rwrap(matchPar)(char*, SEXP*);
376
SEXP mkChar(const char*);
376
SEXP Rwrap(mkChar)(const char*);
377
SEXP mkString(const char*);
377
SEXP Rwrap(mkString)(const char*);
378
SEXP namesgets(SEXP, SEXP);
378
SEXP Rwrap(namesgets)(SEXP, SEXP);
379
int ncols(SEXP);
379
int Rwrap(ncols)(SEXP);
380
int nrows(SEXP);
380
int Rwrap(nrows)(SEXP);
381
int nlevels(SEXP);
381
int Rwrap(nlevels)(SEXP);
382
int NonNullStringMatch(SEXP, SEXP);
382
int Rwrap(NonNullStringMatch)(SEXP, SEXP);
383
SEXP nthcdr(SEXP, int);
383
SEXP Rwrap(nthcdr)(SEXP, int);
384
int pmatch(SEXP, SEXP, int);
384
int Rwrap(pmatch)(SEXP, SEXP, int);
385
void PrintDefaults(SEXP);
385
void Rwrap(PrintDefaults)(SEXP);
386
void PrintValue(SEXP);
386
void Rwrap(PrintValue)(SEXP);
387
void PrintValueEnv(SEXP, SEXP);
387
void Rwrap(PrintValueEnv)(SEXP, SEXP);
388
void PrintValueRec(SEXP, SEXP);
388
void Rwrap(PrintValueRec)(SEXP, SEXP);
389
SEXP protect(SEXP);
389
SEXP Rwrap(protect)(SEXP);
390
SEXP rownamesgets(SEXP,SEXP);
390
SEXP Rwrap(rownamesgets)(SEXP,SEXP);
391
SEXP ScalarLogical(int);
391
SEXP Rwrap(ScalarLogical)(int);
392
SEXP ScalarInteger(int);
392
SEXP Rwrap(ScalarInteger)(int);
393
SEXP ScalarReal(double);
393
SEXP Rwrap(ScalarReal)(double);
394
SEXP ScalarComplex(Rcomplex);
394
SEXP Rwrap(ScalarComplex)(Rcomplex);
395
SEXP ScalarString(SEXP);
395
SEXP Rwrap(ScalarString)(SEXP);
396
SEXP setAttrib(SEXP, SEXP, SEXP);
396
SEXP Rwrap(setAttrib)(SEXP, SEXP, SEXP);
397
void setSVector(SEXP*, int, SEXP);
397
void Rwrap(setSVector)(SEXP*, int, SEXP);
398
void setVar(SEXP, SEXP, SEXP);
398
void Rwrap(setVar)(SEXP, SEXP, SEXP);
399
int StringBlank(SEXP);
399
int Rwrap(StringBlank)(SEXP);
400
SEXP substitute(SEXP,SEXP);
400
SEXP Rwrap(substitute)(SEXP,SEXP);
401
void unprotect(int);
401
void Rwrap(unprotect)(int);
402
void unprotect_ptr(SEXP);
402
void Rwrap(unprotect_ptr)(SEXP);
403
 
403
 
404
#ifdef __MAIN__
404
#ifdef __MAIN__
405
#undef extern
405
#undef extern
406
#endif
406
#endif
407
 
407