The R Project SVN R

Rev

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

Rev 83755 Rev 84419
Line 37... Line 37...
37
	    "  --arch n   for n=i386, x64, 32 or 64\n",
37
	    "  --arch n   for n=i386, x64, 32 or 64\n",
38
	    "  any other arguments listed by ");
38
	    "  any other arguments listed by ");
39
    fprintf(stderr, "%s --arch %s --help\n", RCMD, arch);
39
    fprintf(stderr, "%s --arch %s --help\n", RCMD, arch);
40
}
40
}
41
 
41
 
-
 
42
static BOOL WINAPI CtrlHandler(DWORD type)
-
 
43
{
-
 
44
    /* ignore Ctrl-C; R handles Ctrl+Break the same way (see psignal) */
-
 
45
    return (type == CTRL_C_EVENT || type == CTRL_BREAK_EVENT);
-
 
46
}
-
 
47
 
42
#define CMD_LEN 10000
48
#define CMD_LEN 10000
43
int main (int argc, char **argv)
49
int main (int argc, char **argv)
44
{
50
{
45
    int cmdarg = 1;
51
    int cmdarg = 1;
46
    int interactive = 0;
52
    int interactive = 0;
Line 100... Line 106...
100
    }
106
    }
101
    strcat(cmd, "\"");
107
    strcat(cmd, "\"");
102
 
108
 
103
    if (interactive)
109
    if (interactive)
104
	/* Ignore Ctrl-C so that Rterm.exe can handle it */
110
	/* Ignore Ctrl-C so that Rterm.exe can handle it */
-
 
111
	/*   don't SetConsoleCtrlHandler(NULL, TRUE) to preserve
-
 
112
	     the current setting of the inheritable attribute */
105
	SetConsoleCtrlHandler(NULL, TRUE);   
113
	SetConsoleCtrlHandler(CtrlHandler, TRUE);
106
    
114
    
107
    exit(system(cmd));
115
    exit(system(cmd));
108
 }
116
 }