The R Project SVN R

Rev

Rev 43357 | Rev 43847 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 43357 Rev 43767
Line 45... Line 45...
45
 
45
 
46
/* This version blocks all events: a real one needs to call ProcessEvents
46
/* This version blocks all events: a real one needs to call ProcessEvents
47
   frequently. See rterm.c and ../system.c for one approach using
47
   frequently. See rterm.c and ../system.c for one approach using
48
   a separate thread for input.
48
   a separate thread for input.
49
*/
49
*/
50
static int myReadConsole(char *prompt, char *buf, int len, int addtohistory)
50
static int myReadConsole(const char *prompt, char *buf, int len,
-
 
51
			 int addtohistory)
51
{
52
{
52
    fputs(prompt, stdout);
53
    fputs(prompt, stdout);
53
    fflush(stdout);
54
    fflush(stdout);
54
    if(fgets(buf, len, stdin)) return 1;
55
    if(fgets(buf, len, stdin)) return 1;
55
    else return 0;
56
    else return 0;
56
}
57
}
57
 
58
 
58
static void myWriteConsole(char *buf, int len)
59
static void myWriteConsole(const char *buf, int len)
59
{
60
{
60
    printf("%s", buf);
61
    printf("%s", buf);
61
}
62
}
62
 
63
 
63
static void myCallBack()
64
static void myCallBack()
Line 72... Line 73...
72
 
73
 
73
static void my_onintr(int sig)
74
static void my_onintr(int sig)
74
{
75
{
75
    UserBreak = 1;
76
    UserBreak = 1;
76
}
77
}
77
static void wrap_askok(char *info)
78
static void wrap_askok(const char *info)
78
{
79
{
79
    askok(info);
80
    askok(info);
80
}
81
}
81
 
82
 
82
static int wrap_askyesnocancel(char *question)
83
static int wrap_askyesnocancel(const char *question)
83
{
84
{
84
    return askyesnocancel(question);    
85
    return askyesnocancel(question);    
85
}
86
}
86
 
87
 
87
int Rf_initialize_R(int argc, char **argv)
88
int Rf_initialize_R(int argc, char **argv)