RAPI
R_ext/RStartup.h
Go to the documentation of this file.
00001 /*
00002  *  R : A Computer Language for Statistical Data Analysis
00003  *  Copyright (C) 1999-2010  The R Core Team
00004  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, a copy is available at
00017  *  https://www.R-project.org/Licenses/
00018  */
00019 
00020 /*
00021   C functions to be called from alternative front-ends.
00022 
00023   Part of the API for such front-ends but not for packages.
00024 */
00025 
00026 #ifndef R_EXT_RSTARTUP_H_
00027 #define R_EXT_RSTARTUP_H_
00028 
00029 #include <R_ext/Boolean.h>  /* TRUE/FALSE */
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034 
00035 #ifdef Win32
00036 typedef int (*blah1) (const char *, char *, int, int);
00037 typedef void (*blah2) (const char *, int);
00038 typedef void (*blah3) (void);
00039 typedef void (*blah4) (const char *);
00040 /* Return value here is expected to be 1 for Yes, -1 for No and 0 for Cancel:
00041    symbolic constants in graphapp.h */
00042 typedef int (*blah5) (const char *);
00043 typedef void (*blah6) (int);
00044 typedef void (*blah7) (const char *, int, int);
00045 typedef enum {RGui, RTerm, LinkDLL} UImode;
00046 #endif
00047 
00048 /* Startup Actions */
00049 typedef enum {
00050     SA_NORESTORE,/* = 0 */
00051     SA_RESTORE,
00052     SA_DEFAULT,/* was === SA_RESTORE */
00053     SA_NOSAVE,
00054     SA_SAVE,
00055     SA_SAVEASK,
00056     SA_SUICIDE
00057 } SA_TYPE;
00058 
00059 typedef struct
00060 {
00061     Rboolean R_Quiet;
00062     Rboolean R_Slave;
00063     Rboolean R_Interactive;
00064     Rboolean R_Verbose;
00065     Rboolean LoadSiteFile;
00066     Rboolean LoadInitFile;
00067     Rboolean DebugInitFile;
00068     SA_TYPE RestoreAction;
00069     SA_TYPE SaveAction;
00070     size_t vsize;
00071     size_t nsize;
00072     size_t max_vsize;
00073     size_t max_nsize;
00074     size_t ppsize;
00075     int NoRenviron;
00076 
00077 #ifdef Win32
00078     char *rhome;               /* R_HOME */
00079     char *home;                /* HOME  */
00080     blah1 ReadConsole;
00081     blah2 WriteConsole;
00082     blah3 CallBack;
00083     blah4 ShowMessage;
00084     blah5 YesNoCancel;
00085     blah6 Busy;
00086     UImode CharacterMode;
00087     blah7 WriteConsoleEx; /* used only if WriteConsole is NULL */
00088 #endif
00089 } structRstart;
00090 
00091 typedef structRstart *Rstart;
00092 
00093 void R_DefParams(Rstart Rp);
00094 void R_SetParams(Rstart Rp);
00095 void R_SetWin32(Rstart);
00096 void R_SizeFromEnv(Rstart Rp);
00097 void R_common_command_line(int * pac, char ** argv, Rstart Rp);
00098 
00099 void R_set_command_line_arguments(int argc, char **argv);
00100 
00101 void setup_Rmainloop(void); // also in Rembedded.h
00102 
00103 #ifdef __cplusplus
00104 }
00105 #endif
00106 
00107 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines