The R Project SVN R

Rev

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

Rev 35189 Rev 35489
Line 66... Line 66...
66
 
66
 
67
    if (length(text) > 0) {
67
    if (length(text) > 0) {
68
	if (num == NA_INTEGER)
68
	if (num == NA_INTEGER)
69
	    num = -1;
69
	    num = -1;
70
	s = R_ParseVector(text, num, &status);
70
	s = R_ParseVector(text, num, &status);
71
	if (status != PARSE_OK)
71
	if (status != PARSE_OK) parseError(call, 0);
72
	    errorcall(call, _("parse error"));
-
 
73
    }
72
    }
74
    else if (ifile >= 3) {/* file != "" */
73
    else if (ifile >= 3) {/* file != "" */
75
	if (num == NA_INTEGER)
74
	if (num == NA_INTEGER)
76
	    num = -1;
75
	    num = -1;
77
	if(!wasopen)
76
	if(!wasopen)
78
	    if(!con->open(con)) error(_("cannot open the connection"));
77
	    if(!con->open(con)) error(_("cannot open the connection"));
79
	s = R_ParseConn(con, num, &status);
78
	s = R_ParseConn(con, num, &status);
80
	if(!wasopen) con->close(con);
79
	if(!wasopen) con->close(con);
81
	if (status != PARSE_OK)
-
 
82
	    errorcall(call, _("syntax error on line %d"), R_ParseError);
80
	if (status != PARSE_OK) parseError(call, R_ParseError);
83
    }
81
    }
84
    else {
82
    else {
85
	if (num == NA_INTEGER)
83
	if (num == NA_INTEGER)
86
	    num = 1;
84
	    num = 1;
87
	s = R_ParseBuffer(&R_ConsoleIob, num, &status, prompt);
85
	s = R_ParseBuffer(&R_ConsoleIob, num, &status, prompt);
88
	if (status != PARSE_OK)
86
	if (status != PARSE_OK) parseError(call, 0);
89
	    errorcall(call, _("parse error"));
-
 
90
    }
87
    }
91
    UNPROTECT(2);
88
    UNPROTECT(2);
92
    return s;
89
    return s;
93
}
90
}
94
 
91