The R Project SVN R

Rev

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

Rev 45017 Rev 45927
Line 207... Line 207...
207
		   const char *dir)
207
		   const char *dir)
208
{
208
{
209
    int i;
209
    int i;
210
    OPENFILENAME ofn;
210
    OPENFILENAME ofn;
211
    char cwd[MAX_PATH] = "";
211
    char cwd[MAX_PATH] = "";
-
 
212
    HWND prev = GetFocus();
212
 
213
 
213
    if (!default_name) default_name = "";
214
    if (!default_name) default_name = "";
214
    strcpy(strbuf, default_name);
215
    strcpy(strbuf, default_name);
215
    GetCurrentDirectory(MAX_PATH, cwd);
216
    GetCurrentDirectory(MAX_PATH, cwd);
216
    if (!strcmp(cod, "")) {
217
    if (!strcmp(cod, "")) {
Line 243... Line 244...
243
    if (GetOpenFileName(&ofn) == 0) {
244
    if (GetOpenFileName(&ofn) == 0) {
244
	GetCurrentDirectory(MAX_PATH, cod);
245
	GetCurrentDirectory(MAX_PATH, cod);
245
	SetCurrentDirectory(cwd);
246
	SetCurrentDirectory(cwd);
246
	strbuf[0] = 0;
247
	strbuf[0] = 0;
247
	strbuf[1] = 0;
248
	strbuf[1] = 0;
248
	return strbuf;
-
 
249
    } else {
249
    } else {
250
	GetCurrentDirectory(MAX_PATH, cod);
250
	GetCurrentDirectory(MAX_PATH, cod);
251
	SetCurrentDirectory(cwd);
251
	SetCurrentDirectory(cwd);
252
	for (i = 0; i <  10; i++) if (peekevent()) doevent();
252
	for (i = 0; i <  10; i++) if (peekevent()) doevent();
253
	return strbuf;
-
 
254
    }
253
    }
-
 
254
    SetFocus(prev);
-
 
255
    return strbuf;
255
}
256
}
256
 
257
 
257
int countFilenames(const char *list)
258
int countFilenames(const char *list)
258
{
259
{
259
    const char *temp;
260
    const char *temp;