Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / include / R_ext / RStartup.h @ 2486

History | View | Annotate | Download (2.7 kB)

1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1999-2010  The R Core Team
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU General Public License as published by
7
 *  the Free Software Foundation; either version 2 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  http://www.r-project.org/Licenses/
18
 */
19

    
20
/*
21
  C functions to be called from alternative front-ends.
22

23
  Part of the API for such front-ends but not for packages.
24
*/
25

    
26
#ifndef R_EXT_RSTARTUP_H_
27
#define R_EXT_RSTARTUP_H_
28

    
29
#include <R_ext/Boolean.h>        /* TRUE/FALSE */
30

    
31
#ifdef __cplusplus
32
extern "C" {
33
#endif
34

    
35
#ifdef Win32
36
typedef int (*blah1) (const char *, char *, int, int);
37
typedef void (*blah2) (const char *, int);
38
typedef void (*blah3) (void);
39
typedef void (*blah4) (const char *);
40
/* Return value here is expected to be 1 for Yes, -1 for No and 0 for Cancel:
41
   symbolic constants in graphapp.h */
42
typedef int (*blah5) (const char *);
43
typedef void (*blah6) (int);
44
typedef void (*blah7) (const char *, int, int);
45
typedef enum {RGui, RTerm, LinkDLL} UImode;
46
#endif
47

    
48
/* Startup Actions */
49
typedef enum {
50
    SA_NORESTORE,/* = 0 */
51
    SA_RESTORE,
52
    SA_DEFAULT,/* was === SA_RESTORE */
53
    SA_NOSAVE,
54
    SA_SAVE,
55
    SA_SAVEASK,
56
    SA_SUICIDE
57
} SA_TYPE;
58

    
59
typedef struct
60
{
61
    Rboolean R_Quiet;
62
    Rboolean R_Slave;
63
    Rboolean R_Interactive;
64
    Rboolean R_Verbose;
65
    Rboolean LoadSiteFile;
66
    Rboolean LoadInitFile;
67
    Rboolean DebugInitFile;
68
    SA_TYPE RestoreAction;
69
    SA_TYPE SaveAction;
70
    size_t vsize;
71
    size_t nsize;
72
    size_t max_vsize;
73
    size_t max_nsize;
74
    size_t ppsize;
75
    int NoRenviron;
76

    
77
#ifdef Win32
78
    char *rhome;               /* R_HOME */
79
    char *home;                /* HOME  */
80
    blah1 ReadConsole;
81
    blah2 WriteConsole;
82
    blah3 CallBack;
83
    blah4 ShowMessage;
84
    blah5 YesNoCancel;
85
    blah6 Busy;
86
    UImode CharacterMode;
87
    blah7 WriteConsoleEx; /* used only if WriteConsole is NULL */
88
#endif
89
} structRstart;
90

    
91
typedef structRstart *Rstart;
92

    
93
void R_DefParams(Rstart);
94
void R_SetParams(Rstart);
95
void R_SetWin32(Rstart);
96
void R_SizeFromEnv(Rstart);
97
void R_common_command_line(int *, char **, Rstart);
98

    
99
void R_set_command_line_arguments(int argc, char **argv);
100

    
101
void setup_Rmainloop(void); // also in Rembedded.h
102

    
103
#ifdef __cplusplus
104
}
105
#endif
106

    
107
#endif