The R Project SVN R

Rev

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

Rev 42638 Rev 42639
Line 30... Line 30...
30
#include <string.h>
30
#include <string.h>
31
#include <stdlib.h>
31
#include <stdlib.h>
32
#include <ctype.h>
32
#include <ctype.h>
33
#include "run.h"
33
#include "run.h"
34
 
34
 
35
static char RunError[256] = "";
35
static char RunError[501] = "";
36
 
36
 
37
 
37
 
38
static char * expandcmd(const char *cmd)
38
static char * expandcmd(const char *cmd)
39
{
39
{
40
    char *buf;
40
    char *buf;
Line 134... Line 134...
134
 
134
 
135
    sa.nLength = sizeof(sa);
135
    sa.nLength = sizeof(sa);
136
    sa.lpSecurityDescriptor = NULL;
136
    sa.lpSecurityDescriptor = NULL;
137
    sa.bInheritHandle = TRUE;
137
    sa.bInheritHandle = TRUE;
138
 
138
 
139
    if (!(ecmd = expandcmd(cmd))) {
139
    if (!(ecmd = expandcmd(cmd))) /* error message already set */ 
140
	strcpy(RunError, _("Problem with command expansion"));
-
 
141
	return NULL;
140
	return NULL;
142
    }
-
 
143
    hTHIS = GetCurrentProcess();
141
    hTHIS = GetCurrentProcess();
144
    if (finput && finput[0]) {
142
    if (finput && finput[0]) {
145
	hSAVED = GetStdHandle(STD_INPUT_HANDLE) ;
143
	hSAVED = GetStdHandle(STD_INPUT_HANDLE) ;
146
	hIN = CreateFile(finput, GENERIC_READ, 0,
144
	hIN = CreateFile(finput, GENERIC_READ, 0,
147
			 &sa, OPEN_EXISTING, 0, NULL);
145
			 &sa, OPEN_EXISTING, 0, NULL);