The R Project SVN R

Rev

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

Rev 6259 Rev 6994
Line 599... Line 599...
599
 
599
 
600
/* Determine a match between symbol name and string. */
600
/* Determine a match between symbol name and string. */
601
 
601
 
602
static int NameMatch(SEXP expr, char *aString)
602
static int NameMatch(SEXP expr, char *aString)
603
{
603
{
-
 
604
    if (!isSymbol(expr)) return 0;
604
    return !strcmp(CHAR(PRINTNAME(expr)), aString);
605
    return !strcmp(CHAR(PRINTNAME(expr)), aString);
605
}
606
}
606
 
607
 
607
static int StringMatch(SEXP expr, char *aString)
608
static int StringMatch(SEXP expr, char *aString)
608
{
609
{
Line 1230... Line 1231...
1230
};
1231
};
1231
 
1232
 
1232
static int BinAtom(SEXP expr)
1233
static int BinAtom(SEXP expr)
1233
{
1234
{
1234
    int i;
1235
    int i;
-
 
1236
    
1235
    for (i = 0; BinTable[i].code; i++)
1237
    for (i = 0; BinTable[i].code; i++)
1236
	if (NameMatch(expr, BinTable[i].name))
1238
	if (NameMatch(expr, BinTable[i].name))
1237
	    return BinTable[i].code;
1239
	    return BinTable[i].code;
1238
    return 0;
1240
    return 0;
1239
}
1241
}