The R Project SVN R

Rev

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

Rev 46826 Rev 46842
Line 2059... Line 2059...
2059
    if (f != FixedFont) del(f);
2059
    if (f != FixedFont) del(f);
2060
    del(lpr);
2060
    del(lpr);
2061
    setcursor(cur);
2061
    setcursor(cur);
2062
}
2062
}
2063
 
2063
 
-
 
2064
FILE *R_wfopen(const wchar_t *filename, const wchar_t *mode);
-
 
2065
 
2064
void consolesavefile(console c, int pager)
2066
void consolesavefile(console c, int pager)
2065
{
2067
{
2066
    ConsoleData p = getdata(c);
2068
    ConsoleData p = getdata(c);
2067
 
2069
 
2068
    char *fn;
2070
    wchar_t *fn;
2069
    cursor cur;
2071
    cursor cur;
2070
    FILE *fp;
2072
    FILE *fp;
2071
    int x0, y0, x1, y1, cl;
2073
    int x0, y0, x1, y1, cl;
2072
    wchar_t *s, buf[1024];
2074
    wchar_t *s, buf[1024];
2073
 
2075
 
2074
    setuserfilter("Text files (*.txt)\0*.txt\0All files (*.*)\0*.*\0\0");
2076
    setuserfilter("Text files (*.txt)\0*.txt\0All files (*.*)\0*.*\0\0");
2075
    if(p->sel)
2077
    if(p->sel)
2076
	fn = askfilesave(G_("Save selection to"), "lastsave.txt");
2078
	fn = askfilesaveW(G_("Save selection to"), "lastsave.txt");
2077
    else
2079
    else
2078
	fn = askfilesave(G_("Save console contents to"), "lastsave.txt");
2080
	fn = askfilesaveW(G_("Save console contents to"), "lastsave.txt");
2079
    show(c);
2081
    show(c);
2080
    if (fn) {
2082
    if (fn) {
2081
	fp = R_fopen(fn, "wt");
2083
	fp = R_wfopen(fn, L"wt");
2082
	if (!fp) return;
2084
	if (!fp) return;
2083
	cur = currentcursor();
2085
	cur = currentcursor();
2084
	setcursor(WatchCursor);
2086
	setcursor(WatchCursor);
2085
 
2087
 
2086
	/* Look for a selection */
2088
	/* Look for a selection */