The R Project SVN R

Rev

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

Rev 61698 Rev 61782
Line 512... Line 512...
512
    args = resolveNativeRoutine(args, &ofun, &symbol, buf, NULL, NULL,
512
    args = resolveNativeRoutine(args, &ofun, &symbol, buf, NULL, NULL,
513
				NULL, call, env);
513
				NULL, call, env);
514
 
514
 
515
    if(symbol.symbol.external && symbol.symbol.external->numArgs > -1) {
515
    if(symbol.symbol.external && symbol.symbol.external->numArgs > -1) {
516
	int nargs = length(args) - 1;
516
	int nargs = length(args) - 1;
517
	if(symbol.symbol.external->numArgs != nargs) {
517
	if(symbol.symbol.external->numArgs != nargs)
518
	    /* some people have used 1 to mean any number, not -1 */
-
 
519
	    if(symbol.symbol.external->numArgs == 1)
-
 
520
		warningcall(call,
-
 
521
			    _("Incorrect number of arguments (%d), expecting %d for '%s'"),
-
 
522
			    nargs, symbol.symbol.external->numArgs, buf);
-
 
523
	    else
-
 
524
		errorcall(call,
518
	    errorcall(call,
525
			  _("Incorrect number of arguments (%d), expecting %d for '%s'"),
519
		      _("Incorrect number of arguments (%d), expecting %d for '%s'"),
526
			  nargs, symbol.symbol.external->numArgs, buf);
520
		      nargs, symbol.symbol.external->numArgs, buf);
527
 
-
 
528
	}
-
 
529
    }
521
    }
530
 
522
 
531
    if (PRIMVAL(op) == 1) {
523
    if (PRIMVAL(op) == 1) {
532
	R_ExternalRoutine2 fun = (R_ExternalRoutine2) ofun;
524
	R_ExternalRoutine2 fun = (R_ExternalRoutine2) ofun;
533
	retval = fun(call, op, args, env);
525
	retval = fun(call, op, args, env);