The R Project SVN R

Rev

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

Rev 50186 Rev 50833
Line 172... Line 172...
172
 
172
 
173
/* "do_parse" - the user interface input/output to files.
173
/* "do_parse" - the user interface input/output to files.
174
 
174
 
175
 The internal R_Parse.. functions are defined in ./gram.y (-> gram.c)
175
 The internal R_Parse.. functions are defined in ./gram.y (-> gram.c)
176
 
176
 
177
 .Internal( parse(file, n, text, prompt, srcfile) )
177
 .Internal( parse(file, n, text, prompt, srcfile, encoding) )
178
 If there is text then that is read and the other arguments are ignored.
178
 If there is text then that is read and the other arguments are ignored.
179
*/
179
*/
180
SEXP attribute_hidden do_parse(SEXP call, SEXP op, SEXP args, SEXP env)
180
SEXP attribute_hidden do_parse(SEXP call, SEXP op, SEXP args, SEXP env)
181
{
181
{
182
    SEXP text, prompt, s, source;
182
    SEXP text, prompt, s, source;
183
    Rconnection con;
183
    Rconnection con;
184
    Rboolean wasopen, old_latin1=known_to_be_latin1,
184
    Rboolean wasopen, old_latin1 = known_to_be_latin1,
185
	old_utf8=known_to_be_utf8, allKnown = TRUE;
185
	old_utf8 = known_to_be_utf8, allKnown = TRUE;
186
    int ifile, num, i;
186
    int ifile, num, i;
187
    const char *encoding;
187
    const char *encoding;
188
    ParseStatus status;
188
    ParseStatus status;
189
 
189
 
190
    checkArity(op, args);
190
    checkArity(op, args);