The R Project SVN R

Rev

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

Rev 23715 Rev 25313
Line 123... Line 123...
123
 
123
 
124
/* if cod has never been used, set it to current directory */
124
/* if cod has never been used, set it to current directory */
125
    if (!cod[0]) GetCurrentDirectory(MAX_PATH, cod);
125
    if (!cod[0]) GetCurrentDirectory(MAX_PATH, cod);
126
    s = askcdstring(" Change working directory to:", cod);
126
    s = askcdstring(" Change working directory to:", cod);
127
    if (s && (SetCurrentDirectory(s) == FALSE)) {
127
    if (s && (SetCurrentDirectory(s) == FALSE)) {
-
 
128
	snprintf(msg, MAX_PATH + 40,
128
	sprintf(msg, "Unable to set '%s' as working directory", s);
129
		 "Unable to set '%s' as working directory", s);
129
	askok(msg);
130
	askok(msg);
130
    }
131
    }
131
    /* in every case reset cod (to new directory if all went ok
132
    /* in every case reset cod (to new directory if all went ok
132
       or to old since user may have edited it */
133
       or to old since user may have edited it */
133
    GetCurrentDirectory(MAX_PATH, cod);
134
    GetCurrentDirectory(MAX_PATH, cod);
Line 576... Line 577...
576
	if (d->hit < YES) /* cancelled */ return "";
577
	if (d->hit < YES) /* cancelled */ return "";
577
	if (d->text) user = new_string(gettext(d->text));
578
	if (d->text) user = new_string(gettext(d->text));
578
	else return "";
579
	else return "";
579
	if (d->pass) pass = new_string(gettext(d->pass));
580
	if (d->pass) pass = new_string(gettext(d->pass));
580
	else return "";
581
	else return "";
581
	sprintf(buf, "%s:%s", user, pass);
582
	snprintf(buf, 1000, "%s:%s", user, pass);
582
	return buf;
583
	return buf;
583
    }
584
    }
584
    return ""; /* -Wall */
585
    return ""; /* -Wall */
585
}
586
}