The R Project SVN R

Rev

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

Rev 5458 Rev 6676
Line 92... Line 92...
92
/*  mkSYMSXP - return a symsxp with the string  */
92
/*  mkSYMSXP - return a symsxp with the string  */
93
/*             name inserted in the name field  */
93
/*             name inserted in the name field  */
94
 
94
 
95
static int ddVal(SEXP name)
95
static int ddVal(SEXP name)
96
{
96
{
97
    char buf[128], *endp, *val;
97
    char *buf, *endp;
98
    int rval;
98
    int rval;
99
 
99
 
100
    strcpy(buf, CHAR(name));
100
    buf = CHAR(name);
101
    if( !strncmp(buf,"..",2) && strlen(buf) > 2 ) {
101
    if( !strncmp(buf,"..",2) && strlen(buf) > 2 ) {
102
        val = buf; val++; val++;
102
        buf += 2;
103
	rval = strtol(val, &endp, 10);
103
	rval = strtol(buf, &endp, 10);
104
        if( *endp != '\0')
104
        if( *endp != '\0')
105
		return 0;
105
		return 0;
106
	else
106
	else
107
		return rval;
107
		return rval;
108
    }
108
    }