The R Project SVN R

Rev

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

Rev 35580 Rev 35691
Line 75... Line 75...
75
do_commandArgs(SEXP call, SEXP op, SEXP args, SEXP env)
75
do_commandArgs(SEXP call, SEXP op, SEXP args, SEXP env)
76
{
76
{
77
    int i;
77
    int i;
78
    SEXP vals;
78
    SEXP vals;
79
 
79
 
-
 
80
    /* need protection as mkChar allocates */
80
    vals = allocVector(STRSXP, NumCommandLineArgs);
81
    vals = PROTECT(allocVector(STRSXP, NumCommandLineArgs));
81
    for(i = 0; i < NumCommandLineArgs; i++)
82
    for(i = 0; i < NumCommandLineArgs; i++)
82
	SET_STRING_ELT(vals, i, mkChar(CommandLineArgs[i]));
83
	SET_STRING_ELT(vals, i, mkChar(CommandLineArgs[i]));
-
 
84
    UNPROTECT(1);
83
    return(vals);
85
    return vals;
84
}
86
}
85
 
87
 
86
void
88
void
87
R_common_command_line(int *pac, char **argv, Rstart Rp)
89
R_common_command_line(int *pac, char **argv, Rstart Rp)
88
{
90
{