67 #define NEW_CONDITION_HANDLING
69 #ifdef HAVE_VISIBILITY_ATTRIBUTE
70 # define attribute_visible __attribute__ ((visibility ("default")))
71 # define attribute_hidden __attribute__ ((visibility ("hidden")))
73 # define attribute_visible
74 # define attribute_hidden
81 # define extern0 extern attribute_hidden
84 #define MAXELTSIZE 8192
87 #include <R_ext/Complex.h>
93 void Rf_CoercionWarning(
int);
94 int Rf_LogicalFromInteger(
int,
int*);
95 int Rf_LogicalFromReal(
double,
int*);
96 int Rf_LogicalFromComplex(Rcomplex,
int*);
97 int Rf_IntegerFromLogical(
int,
int*);
98 int Rf_IntegerFromReal(
double,
int*);
99 int Rf_IntegerFromComplex(Rcomplex,
int*);
100 double Rf_RealFromLogical(
int,
int*);
101 double Rf_RealFromInteger(
int,
int*);
102 double Rf_RealFromComplex(Rcomplex,
int*);
103 Rcomplex Rf_ComplexFromLogical(
int,
int*);
104 Rcomplex Rf_ComplexFromInteger(
int,
int*);
105 Rcomplex Rf_ComplexFromReal(
double,
int*);
111 #define CALLED_FROM_DEFN_H 1
114 #undef CALLED_FROM_DEFN_H
115 extern0
SEXP R_CommentSymbol;
116 extern0
SEXP R_DotEnvSymbol;
117 extern0
SEXP R_ExactSymbol;
118 extern0
SEXP R_RecursiveSymbol;
119 extern0
SEXP R_SrcfileSymbol;
120 extern0
SEXP R_WholeSrcrefSymbol;
121 extern0
SEXP R_SrcrefSymbol;
122 extern0
SEXP R_TmpvalSymbol;
123 extern0
SEXP R_UseNamesSymbol;
124 extern0
SEXP R_DoubleColonSymbol;
125 extern0
SEXP R_TripleColonSymbol;
126 extern0
SEXP R_ConnIdSymbol;
127 extern0
SEXP R_DevicesSymbol;
129 extern0
SEXP R_dot_Generic;
130 extern0
SEXP R_dot_Methods;
131 extern0
SEXP R_dot_Group;
132 extern0
SEXP R_dot_Class;
133 extern0
SEXP R_dot_GenericCallEnv;
134 extern0
SEXP R_dot_GenericDefEnv;
137 #define BYTES_MASK (1<<1)
138 #define HASHASH_MASK 1
142 void SET_BYTES(
SEXP x);
147 #ifdef USE_ATTRIB_FIELD_FOR_CHARSXP_CACHE_CHAINS
148 # define CXHEAD(x) (x)
149 # define CXTAIL(x) ATTRIB(x)
152 # define CXHEAD(x) CAR(x)
153 # define CXTAIL(x) CDR(x)
157 #include "Internal.h"
159 #include "Errormsg.h"
165 extern void R_ProcessEvents(
void);
173 # include <psignal.h>
181 # define OSTYPE "unix"
186 # define OSTYPE "windows"
190 #ifdef HAVE_F77_UNDERSCORE
191 # define F77_SYMBOL(x) x ## _
192 # define F77_QSYMBOL(x) #x "_"
194 # define F77_SYMBOL(x) x
195 # define F77_QSYMBOL(x) #x
201 #ifdef HAVE_INTTYPES_H
202 # include <inttypes.h>
213 #if defined HAVE_DECL_SIZE_MAX && HAVE_DECL_SIZE_MAX
214 typedef size_t R_size_t;
216 # define R_SIZE_T_MAX std::numeric_limits<size_t>::max()
218 # define R_SIZE_T_MAX SIZE_MAX
221 # error SIZE_MAX is required for C99
225 #define Mega 1048576.
226 #define Giga 1073741824.
235 #define R_PPSSIZE 50000L
238 #define R_NSIZE 350000L
241 #define R_VSIZE 16000000L
254 #if !defined(strdup) && defined(HAVE_DECL_STRDUP) && !HAVE_DECL_STRDUP
255 extern char *strdup(
const char *s1);
257 #if !defined(strncascmp) && defined(HAVE_DECL_STRNCASECMP) && !HAVE_DECL_STRNCASECMP
258 extern int strncasecmp(
const char *s1,
const char *s2,
size_t n);
262 #if defined(HAVE_PUTENV) && !defined(putenv) && defined(HAVE_DECL_PUTENV) && !HAVE_DECL_PUTENV
263 extern int putenv(
char *
string);
273 #if !defined(PATH_MAX)
274 # if defined(HAVE_SYS_PARAM_H)
275 # include <sys/param.h>
277 # if !defined(PATH_MAX)
278 # if defined(MAXPATHLEN)
280 # define PATH_MAX MAXPATHLEN
281 # elif defined(Win32)
286 # define PATH_MAX 260
289 # define PATH_MAX 5000
294 #ifdef HAVE_POSIX_SETJMP
295 # define SIGJMP_BUF sigjmp_buf
296 # define SIGSETJMP(x,s) sigsetjmp(x,s)
297 # define SIGLONGJMP(x,i) siglongjmp(x,i)
298 # define JMP_BUF sigjmp_buf
299 # define SETJMP(x) sigsetjmp(x,0)
300 # define LONGJMP(x,i) siglongjmp(x,i)
302 # define SIGJMP_BUF jmp_buf
303 # define SIGSETJMP(x,s) setjmp(x)
304 # define SIGLONGJMP(x,i) longjmp(x,i)
305 # define JMP_BUF jmp_buf
306 # define SETJMP(x) setjmp(x)
307 # define LONGJMP(x,i) longjmp(x,i)
329 inline size_t BYTE2VEC(
int n)
331 return (n > 0) ? (n - 1)/
sizeof(VECREC) + 1 : 0;
334 inline size_t INT2VEC(
int n)
336 return (n > 0) ? (n*
sizeof(int) - 1)/
sizeof(VECREC) + 1 : 0;
339 inline size_t FLOAT2VEC(
int n)
341 return (n > 0) ? (n*
sizeof(double) - 1)/
sizeof(VECREC) + 1 : 0;
344 inline size_t COMPLEX2VEC(
int n)
346 return (n > 0) ? (n*
sizeof(Rcomplex) - 1)/
sizeof(VECREC) + 1 : 0;
349 inline size_t PTR2VEC(
int n)
351 return (n > 0) ? (n*
sizeof(
SEXP) - 1)/
sizeof(VECREC) + 1 : 0;
356 #define ACTIVE_BINDING_MASK (1<<15)
357 #define BINDING_LOCK_MASK (1<<14)
358 #define SPECIAL_BINDING_MASK (ACTIVE_BINDING_MASK | BINDING_LOCK_MASK)
364 #endif // __cplusplus
367 #define streql(s, t) (!strcmp((s), (t)))
398 #include <R_ext/libextern.h>
405 #define extern0 extern attribute_hidden
411 LibExtern
char *R_Home;
414 extern0 R_size_t R_VSize INI_as(R_VSIZE);
415 extern0
SEXP R_NHeap;
416 extern0
SEXP R_FreeSEXP;
417 LibExtern
int R_Is_Running;
421 extern0
int R_BrowseLines INI_as(0);
423 extern0 Rboolean R_KeepSource INI_as(FALSE);
424 extern0
int R_WarnLength INI_as(1000);
425 extern0
int R_nwarnings INI_as(50);
426 extern uintptr_t R_CStackLimit INI_as((uintptr_t)-1);
427 extern uintptr_t R_CStackStart INI_as((uintptr_t)-1);
428 extern0
int R_CStackDir INI_as(1);
431 LibExtern Rboolean R_Interactive INI_as(TRUE);
432 extern0 Rboolean R_Quiet INI_as(FALSE);
433 extern Rboolean R_Slave INI_as(FALSE);
434 extern0 Rboolean R_Verbose INI_as(FALSE);
438 extern FILE* R_Consolefile INI_as(NULL);
439 extern FILE* R_Outputfile INI_as(NULL);
440 extern0
int R_ErrorCon INI_as(2);
441 LibExtern
char *R_TempDir INI_as(NULL);
442 extern0
char *Sys_TempDir INI_as(NULL);
444 extern0
char R_StdinEnc[31] INI_as(
"");
447 extern0
int R_ParseError INI_as(0);
448 extern0
int R_ParseErrorCol;
449 extern0
SEXP R_ParseErrorFile;
450 #define PARSE_ERROR_SIZE 256
451 extern0
char R_ParseErrorMsg[PARSE_ERROR_SIZE] INI_as(
"");
452 #define PARSE_CONTEXT_SIZE 256
453 extern0
char R_ParseContext[PARSE_CONTEXT_SIZE] INI_as(
"");
454 extern0
int R_ParseContextLast INI_as(0);
455 extern0
int R_ParseContextLine;
458 extern int R_DirtyImage INI_as(0);
461 LibExtern
char *R_HistoryFile;
462 LibExtern
int R_HistorySize;
463 LibExtern
int R_RestoreHistory;
464 extern void R_setupHistory(
void);
467 extern0
int R_CollectWarnings INI_as(0);
471 extern0
int R_ShowErrorMessages INI_as(1);
476 extern0 Rboolean R_warn_partial_match_dollar INI_as(FALSE);
477 extern0 Rboolean R_warn_partial_match_attr INI_as(FALSE);
478 extern0 Rboolean R_ShowWarnCalls INI_as(FALSE);
479 extern0 Rboolean R_ShowErrorCalls INI_as(FALSE);
480 extern0
int R_NShowCalls INI_as(50);
482 LibExtern Rboolean utf8locale INI_as(FALSE);
483 LibExtern Rboolean mbcslocale INI_as(FALSE);
484 extern0 Rboolean latin1locale INI_as(FALSE);
486 LibExtern
unsigned int localeCP INI_as(1252);
487 extern0 Rboolean WinUTF8out INI_as(FALSE);
488 extern0
void WinCheckUTF8(
void);
491 extern0
char OutDec INI_as(
'.');
492 extern0 Rboolean R_DisableNLinBrowser INI_as(FALSE);
495 extern int Rf_initEmbeddedR(
int argc,
char **argv);
499 extern const char *R_GUIType INI_as(
"unknown");
500 extern Rboolean R_isForkedChild INI_as(FALSE);
502 extern double cpuLimit INI_as(-1.0);
503 extern double cpuLimit2 INI_as(-1.0);
504 extern double cpuLimitValue INI_as(-1.0);
505 extern double elapsedLimit INI_as(-1.0);
506 extern double elapsedLimit2 INI_as(-1.0);
507 extern double elapsedLimitValue INI_as(-1.0);
509 void resetTimeLimits(
void);
511 extern0
int R_jit_enabled INI_as(0);
512 extern0
int R_compile_pkgs INI_as(0);
514 extern void R_init_jit_enabled(
void);
515 LibExtern
int R_num_math_threads INI_as(1);
516 LibExtern
int R_max_num_math_threads INI_as(1);
520 R_stdGen_ptr_t R_get_standardGeneric_ptr(
void);
521 R_stdGen_ptr_t R_set_standardGeneric_ptr(R_stdGen_ptr_t, SEXP);
522 LibExtern SEXP R_MethodsNamespace;
523 SEXP R_deferred_default_method(
void);
524 SEXP R_set_prim_method(SEXP fname, SEXP op, SEXP code_vec, SEXP fundef,
526 SEXP do_set_prim_method(SEXP op,
const char *code_string, SEXP fundef,
528 void R_set_quick_method_check(R_stdGen_ptr_t);
529 SEXP R_primitive_methods(SEXP op);
530 SEXP R_primitive_generic(SEXP op);
533 extern0
int R_dec_min_exponent INI_as(-308);
537 int ibeta, it, irnd, ngrd, machep, negep, iexp, minexp, maxexp;
538 double eps, epsneg, xmin, xmax;
541 LibExtern AccuracyInfo R_AccuracyInfo;
543 extern0
unsigned int max_contour_segments INI_as(25000);
545 extern0 Rboolean known_to_be_latin1 INI_as(FALSE);
546 extern0 Rboolean known_to_be_utf8 INI_as(FALSE);
555 #define checkArity(a,b) Rf_checkArityCall(a,b,call)
566 # define allocCharsxp Rf_allocCharsxp
567 # define begincontext Rf_begincontext
568 # define check1arg Rf_check1arg
569 # define CleanEd Rf_CleanEd
570 # define CoercionWarning Rf_CoercionWarning
571 # define ComplexFromInteger Rf_ComplexFromInteger
572 # define ComplexFromLogical Rf_ComplexFromLogical
573 # define ComplexFromReal Rf_ComplexFromReal
574 # define ComplexFromString Rf_ComplexFromString
575 # define copyListMatrix Rf_copyListMatrix
576 # define copyMostAttribNoTs Rf_copyMostAttribNoTs
577 # define CustomPrintValue Rf_CustomPrintValue
578 # define DataFrameClass Rf_DataFrameClass
579 # define ddfindVar Rf_ddfindVar
580 # define deparse1 Rf_deparse1
581 # define deparse1line Rf_deparse1line
582 # define deparse1s Rf_deparse1s
583 # define DispatchGroup Rf_DispatchGroup
584 # define DispatchOrEval Rf_DispatchOrEval
585 # define dynamicfindVar Rf_dynamicfindVar
586 # define EncodeRaw Rf_EncodeRaw
587 # define EncodeString Rf_EncodeString
588 # define EnsureString Rf_EnsureString
589 # define envlength Rf_envlength
590 # define ErrorMessage Rf_ErrorMessage
591 # define evalListKeepMissing Rf_evalListKeepMissing
592 # define factorsConform Rf_factorsConform
593 # define findcontext Rf_findcontext
594 # define findVar1 Rf_findVar1
595 # define FrameClassFix Rf_FrameClassFix
596 # define framedepth Rf_framedepth
597 # define frameSubscript Rf_frameSubscript
598 # define get1index Rf_get1index
599 # define getVar Rf_getVar
600 # define getVarInFrame Rf_getVarInFrame
601 # define InitArithmetic Rf_InitArithmetic
602 # define InitColors Rf_InitColors
603 # define InitConnections Rf_InitConnections
604 # define InitEd Rf_InitEd
605 # define InitFunctionHashing Rf_InitFunctionHashing
606 # define InitGlobalEnv Rf_InitGlobalEnv
607 # define InitGraphics Rf_InitGraphics
608 # define InitMemory Rf_InitMemory
609 # define InitNames Rf_InitNames
610 # define InitOptions Rf_InitOptions
611 # define InitStringHash Rf_InitStringHash
612 # define InitTempDir Rf_InitTempDir
613 # define initStack Rf_initStack
614 # define IntegerFromComplex Rf_IntegerFromComplex
615 # define IntegerFromLogical Rf_IntegerFromLogical
616 # define IntegerFromReal Rf_IntegerFromReal
617 # define IntegerFromString Rf_IntegerFromString
618 # define internalTypeCheck Rf_internalTypeCheck
619 # define isValidName Rf_isValidName
620 # define ItemName Rf_ItemName
621 # define jump_to_toplevel Rf_jump_to_toplevel
622 # define KillAllDevices Rf_KillAllDevices
623 # define levelsgets Rf_levelsgets
624 # define LogicalFromComplex Rf_LogicalFromComplex
625 # define LogicalFromInteger Rf_LogicalFromInteger
626 # define LogicalFromReal Rf_LogicalFromReal
627 # define LogicalFromString Rf_LogicalFromString
628 # define mainloop Rf_mainloop
629 # define makeSubscript Rf_makeSubscript
630 # define markKnown Rf_markKnown
631 # define mat2indsub Rf_mat2indsub
632 # define matchArg Rf_matchArg
633 # define matchArgExact Rf_matchArgExact
634 # define matchArgs Rf_matchArgs
635 # define matchPar Rf_matchPar
636 # define Mbrtowc Rf_mbrtowc
637 # define mbtoucs Rf_mbtoucs
638 # define mkCLOSXP Rf_mkCLOSXP
639 # define mkFalse Rf_mkFalse
640 # define mkPROMISE Rf_mkPROMISE
641 # define mkQUOTE Rf_mkQUOTE
642 # define mkTrue Rf_mkTrue
643 # define NewEnvironment Rf_NewEnvironment
644 # define OneIndex Rf_OneIndex
645 # define onintr Rf_onintr
646 # define onsigusr1 Rf_onsigusr1
647 # define onsigusr2 Rf_onsigusr2
648 # define parse Rf_parse
649 # define PrintDefaults Rf_PrintDefaults
650 # define PrintGreeting Rf_PrintGreeting
651 # define PrintValueEnv Rf_PrintValueEnv
652 # define PrintValueRec Rf_PrintValueRec
653 # define PrintVersion Rf_PrintVersion
654 # define PrintVersion_part_1 Rf_PrintVersion_part_1
655 # define PrintVersionString Rf_PrintVersionString
656 # define PrintWarnings Rf_PrintWarnings
657 # define promiseArgs Rf_promiseArgs
658 # define RealFromComplex Rf_RealFromComplex
659 # define RealFromInteger Rf_RealFromInteger
660 # define RealFromLogical Rf_RealFromLogical
661 # define RealFromString Rf_RealFromString
662 # define Seql Rf_Seql
663 # define Scollate Rf_Scollate
664 # define sortVector Rf_sortVector
665 # define SrcrefPrompt Rf_SrcrefPrompt
666 # define ssort Rf_ssort
667 # define StringFromComplex Rf_StringFromComplex
668 # define StringFromInteger Rf_StringFromInteger
669 # define StringFromLogical Rf_StringFromLogical
670 # define StringFromReal Rf_StringFromReal
671 # define strIsASCII Rf_strIsASCII
672 # define strmat2intmat Rf_strmat2intmat
673 # define substituteList Rf_substituteList
674 # define tsConform Rf_tsConform
675 # define tspgets Rf_tspgets
676 # define type2symbol Rf_type2symbol
677 # define unbindVar Rf_unbindVar
678 # define usemethod Rf_usemethod
679 # define ucstomb Rf_ucstomb
680 # define ucstoutf8 Rf_ucstoutf8
681 # define utf8toucs Rf_utf8toucs
682 # define utf8towcs Rf_utf8towcs
683 # define vectorIndex Rf_vectorIndex
684 # define vectorSubscript Rf_vectorSubscript
685 # define warningcall Rf_warningcall
686 # define WarningMessage Rf_WarningMessage
687 # define wcstoutf8 Rf_wcstoutf8
688 # define wtransChar Rf_wtransChar
699 #define CONSOLE_BUFFER_SIZE 4096
700 int R_ReadConsole(
const char *,
unsigned char *,
int,
int);
701 void R_WriteConsole(
const char *,
int);
702 void R_WriteConsoleEx(
const char *,
int,
int);
703 void R_ResetConsole(
void);
704 void R_FlushConsole(
void);
705 void R_ClearerrConsole(
void);
707 int R_ShowFiles(
int,
const char **,
const char **,
const char *,
708 Rboolean,
const char *);
709 int R_EditFiles(
int,
const char **,
const char **,
const char *);
710 int R_ChooseFile(
int,
char *,
int);
711 char *R_HomeDir(
void);
712 Rboolean R_FileExists(
const char *);
713 Rboolean R_HiddenFile(
const char *);
714 double R_FileMtime(
const char *);
725 #define KEEPINTEGER 1
726 #define QUOTEEXPRESSIONS 2
727 #define SHOWATTRIBUTES 4
729 #define WARNINCOMPLETE 16
730 #define DELAYPROMISES 32
734 #define SIMPLEDEPARSE 0
735 #define DEFAULTDEPARSE 65
736 #define FORSOURCING 95
739 int Rf_LogicalFromString(SEXP,
int*);
740 int Rf_IntegerFromString(SEXP,
int*);
741 double Rf_RealFromString(SEXP,
int*);
742 Rcomplex Rf_ComplexFromString(SEXP,
int*);
743 SEXP Rf_StringFromLogical(
int,
int*);
744 SEXP Rf_StringFromInteger(
int,
int*);
745 SEXP Rf_StringFromReal(
double,
int*);
746 SEXP Rf_StringFromComplex(Rcomplex,
int*);
747 SEXP Rf_EnsureString(SEXP);
751 SEXP Rf_allocCharsxp(R_len_t);
752 SEXP Rf_append(SEXP, SEXP);
753 void Rf_check1arg(SEXP, SEXP,
const char *);
754 void Rf_checkArityCall(SEXP, SEXP, SEXP);
755 void R_check_locale(
void);
756 void Rf_CleanEd(
void);
757 void Rf_copyListMatrix(SEXP, SEXP, Rboolean);
758 void Rf_copyMostAttribNoTs(SEXP, SEXP);
759 double currentTime(
void);
760 void Rf_CustomPrintValue(SEXP, SEXP);
761 void Rf_DataFrameClass(SEXP);
763 SEXP Rf_deparse1(SEXP,Rboolean,
int);
764 SEXP Rf_deparse1line(SEXP,Rboolean);
765 SEXP Rf_deparse1s(SEXP call);
766 int Rf_DispatchOrEval(SEXP, SEXP,
const char *, SEXP, SEXP, SEXP*,
int,
int);
767 int Rf_DispatchGroup(
const char *, SEXP,SEXP,SEXP,SEXP,SEXP*);
768 SEXP duplicated(SEXP, Rboolean);
769 SEXP duplicated3(SEXP, SEXP, Rboolean);
770 int any_duplicated(SEXP, Rboolean);
771 int any_duplicated3(SEXP, SEXP, Rboolean);
772 int Rf_envlength(SEXP);
773 SEXP Rf_evalListKeepMissing(SEXP, SEXP);
774 int Rf_factorsConform(SEXP, SEXP);
775 SEXP Rf_findVar1(SEXP, SEXP,
SEXPTYPE,
int);
776 void Rf_FrameClassFix(SEXP);
777 SEXP Rf_frameSubscript(
int, SEXP, SEXP);
778 int Rf_get1index(SEXP, SEXP,
int,
int,
int, SEXP);
779 SEXP Rf_getVar(SEXP, SEXP);
780 SEXP Rf_getVarInFrame(SEXP, SEXP);
781 void Rf_InitArithmetic(
void);
782 void Rf_InitColors(
void);
783 void Rf_InitConnections(
void);
784 void Rf_InitEd(
void);
785 void Rf_InitFunctionHashing(
void);
786 void Rf_InitGlobalEnv(
void);
787 Rboolean R_current_trace_state(
void);
788 Rboolean R_has_methods(SEXP);
789 void R_InitialData(
void);
793 std::pair<bool, SEXP> R_possible_dispatch(
SEXP,
SEXP,
SEXP,
SEXP, Rboolean);
797 void Rf_InitGraphics(
void);
798 void Rf_InitMemory(
void);
799 void Rf_InitNames(
void);
800 void Rf_InitOptions(
void);
801 void Rf_InitStringHash(
void);
802 void Init_R_Variables(
SEXP);
803 void Rf_InitTempDir(
void);
804 void Rf_initStack(
void);
806 Rboolean isMethodsDispatchOn(
void);
807 int Rf_isValidName(
const char *);
808 void Rf_KillAllDevices(
void);
810 void Rf_mainloop(
void);
812 SEXP Rf_markKnown(
const char *,
SEXP);
817 SEXP Rf_matchPar(
const char *,
SEXP*);
824 void Rf_onintr(
void);
825 RETSIGTYPE Rf_onsigusr1(
int);
826 RETSIGTYPE Rf_onsigusr2(
int);
828 SEXP Rf_parse(FILE*,
int);
829 void Rf_PrintDefaults(
void);
830 void Rf_PrintGreeting(
void);
833 void Rf_PrintVersion(
char *);
834 void Rf_PrintVersionString(
char *);
835 void Rf_PrintWarnings(
void);
836 void PrintVersion_part_1(
char *);
837 void process_site_Renviron(
void);
838 void process_system_Renviron(
void);
839 void process_user_Renviron(
void);
841 void Rcons_vprintf(
const char *, va_list);
844 char *R_LibraryFileName(
const char *,
char *,
size_t);
845 SEXP R_LoadFromFile(FILE*,
int);
847 extern int R_Newhashpjw(
const char *);
848 FILE* R_OpenLibraryFile(
const char *);
849 SEXP R_Primitive(
const char *);
850 void R_RestoreGlobalEnv(
void);
851 void R_RestoreGlobalEnvFromFile(
const char *, Rboolean);
852 void R_SaveGlobalEnv(
void);
853 void R_SaveGlobalEnvToFile(
const char *);
854 void R_SaveToFile(
SEXP, FILE*,
int);
855 void R_SaveToFileV(
SEXP, FILE*,
int,
int);
856 Rboolean R_seemsOldStyleS4Object(
SEXP object);
857 int R_SetOptionWarn(
int);
858 int R_SetOptionWidth(
int);
859 void R_Suicide(
const char *);
860 void R_getProcTime(
double *
data);
862 void Rf_sortVector(
SEXP, Rboolean);
863 void Rf_SrcrefPrompt(
const char *,
SEXP);
873 #ifdef ALLOW_OLD_SAVE
874 void unmarkPhase(
void);
886 void Rf_ErrorMessage(
SEXP,
int, ...);
887 void Rf_WarningMessage(
SEXP, R_WARNING, ...);
888 SEXP R_GetTraceback(
int);
890 R_size_t R_GetMaxVSize(
void);
891 void R_SetMaxVSize(R_size_t);
892 R_size_t R_GetMaxNSize(
void);
893 void R_SetMaxNSize(R_size_t);
894 R_size_t R_Decode2Long(
char *p,
int *ierr);
895 void R_SetPPSize(R_size_t);
898 #define R_MaxDevices 64
908 int Rstrlen(
SEXP,
int);
909 const char *Rf_EncodeRaw(Rbyte);
910 const char *Rf_EncodeString(
SEXP,
int,
int, Rprt_adj);
911 const char *EncodeReal2(
double,
int,
int,
int);
915 void orderVector1(
int *indx,
int n,
SEXP key, Rboolean nalast,
916 Rboolean decreasing,
SEXP rho);
927 void UNIMPLEMENTED_TYPE(
const char *s,
SEXP x);
928 void UNIMPLEMENTED_TYPEt(
const char *s,
SEXPTYPE t);
929 Rboolean Rf_strIsASCII(
const char *str);
930 int utf8clen(
char c);
932 typedef unsigned short ucs2_t;
933 size_t mbcsToUcs2(
const char *in, ucs2_t *out,
int nout,
int enc);
937 size_t Rf_utf8toucs(
wchar_t *wc,
const char *s);
938 size_t Rf_utf8towcs(
wchar_t *wc,
const char *s,
size_t n);
939 size_t Rf_ucstomb(
char *s,
const unsigned int wc);
940 size_t Rf_ucstoutf8(
char *s,
const unsigned int wc);
941 size_t Rf_mbtoucs(
unsigned int *wc,
const char *s,
size_t n);
942 size_t Rf_wcstoutf8(
char *s,
const wchar_t *wc,
size_t n);
944 const wchar_t *Rf_wtransChar(
SEXP x);
946 #define mbs_init(x) memset(x, 0, sizeof(mbstate_t))
947 size_t Rf_mbrtowc(
wchar_t *wc,
const char *s,
size_t n, mbstate_t *ps);
948 Rboolean mbcsValid(
const char *str);
949 Rboolean utf8Valid(
const char *str);
950 char *Rf_strchr(
const char *s,
int c);
951 char *Rf_strrchr(
const char *s,
int c);
954 void R_fixslash(
char *s);
955 void R_fixbackslash(
char *s);
956 wchar_t *filenameToWchar(
const SEXP fn,
const Rboolean expand);
958 #if defined(SUPPORT_UTF8_WIN32)
959 #define mbrtowc(a,b,c,d) Rmbrtowc(a,b)
960 #define wcrtomb(a,b,c) Rwcrtomb(a,b)
961 #define mbstowcs(a,b,c) Rmbstowcs(a,b,c)
962 #define wcstombs(a,b,c) Rwcstombs(a,b,c)
963 size_t Rmbrtowc(
wchar_t *wc,
const char *s);
964 size_t Rwcrtomb(
char *s,
const wchar_t wc);
965 size_t Rmbstowcs(
wchar_t *wc,
const char *s,
size_t n);
966 size_t Rwcstombs(
char *s,
const wchar_t *wc,
size_t n);
970 FILE *RC_fopen(
const SEXP fn,
const char *mode,
const Rboolean expand);
974 double R_strtod4(
const char *str,
char **endptr,
char dec, Rboolean
NA);
975 double R_strtod(
const char *str,
char **endptr);
976 double R_atof(
const char *str);
979 void set_rl_word_breaks(
const char *str);
982 extern const char *locale2charset(
const char *);
989 #define _(String) libintl_gettext (String)
992 #define _(String) gettext (String)
994 #define gettext_noop(String) String
995 #define N_(String) gettext_noop (String)
997 #define _(String) (String)
998 #define N_(String) String
999 #define ngettext(String, StringP, N) (N > 1 ? StringP: String)
1004 #define BEGIN_SUSPEND_INTERRUPTS do { \
1005 Rboolean __oldsusp__ = R_interrupts_suspended; \
1006 R_interrupts_suspended = TRUE;
1007 #define END_SUSPEND_INTERRUPTS R_interrupts_suspended = __oldsusp__; \
1008 if (R_interrupts_pending && ! R_interrupts_suspended) \
1015 # define alloca(x) __builtin_alloca((x))
1017 # ifdef HAVE_ALLOCA_H
1018 # include <alloca.h>
1020 # if !HAVE_DECL_ALLOCA
1021 extern void *alloca(
size_t);
1031 Rboolean R_access_X11(
void);
1033 double R_getClockIncrement();
1034 SEXP do_gpregexpr(
SEXP pat,
SEXP vec,
int igcase_opt,
int useBytes);
1036 int global,
int igcase_opt,
int useBytes);
1037 const wchar_t *wtransChar(
SEXP x);