The R Project SVN R

Rev

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

Rev 75247 Rev 76974
Line 109... Line 109...
109
    fn = CAR(args); args = CDR(args);
109
    fn = CAR(args); args = CDR(args);
110
    if (!isString(fn))
110
    if (!isString(fn))
111
	error(_("invalid argument to edit()"));
111
	error(_("invalid argument to edit()"));
112
 
112
 
113
    if (LENGTH(STRING_ELT(fn, 0)) > 0) {
113
    if (LENGTH(STRING_ELT(fn, 0)) > 0) {
114
	const char *ss = translateChar(STRING_ELT(fn, 0));
114
	const char *ss = translateCharFP(STRING_ELT(fn, 0));
115
	filename = R_alloc(strlen(ss), sizeof(char));
115
	filename = R_alloc(strlen(ss), sizeof(char));
116
	strcpy(filename, ss);
116
	strcpy(filename, ss);
117
    }
117
    }
118
    else filename = DefaultFileName;
118
    else filename = DefaultFileName;
119
 
119
 
Line 131... Line 131...
131
    ti = CAR(args);
131
    ti = CAR(args);
132
#endif
132
#endif
133
    args = CDR(args);
133
    args = CDR(args);
134
    ed = CAR(args);
134
    ed = CAR(args);
135
    if (!isString(ed)) errorcall(call, _("argument 'editor' type not valid"));
135
    if (!isString(ed)) errorcall(call, _("argument 'editor' type not valid"));
136
    cmd = translateChar(STRING_ELT(ed, 0));
136
    cmd = translateCharFP(STRING_ELT(ed, 0));
137
    if (strlen(cmd) == 0) errorcall(call, _("argument 'editor' is not set"));
137
    if (strlen(cmd) == 0) errorcall(call, _("argument 'editor' is not set"));
138
    editcmd = R_alloc(strlen(cmd) + strlen(filename) + 6, sizeof(char));
138
    editcmd = R_alloc(strlen(cmd) + strlen(filename) + 6, sizeof(char));
139
#ifdef Win32
139
#ifdef Win32
140
    if (!strcmp(cmd,"internal")) {
140
    if (!strcmp(cmd,"internal")) {
141
	if (!isString(ti))
141
	if (!isString(ti))