The R Project SVN R

Rev

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

Rev 61692 Rev 61698
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)
518
	    warningcall(call,
520
		warningcall(call,
519
		      _("Incorrect number of arguments (%d), expecting %d for '%s'"),
521
			    _("Incorrect number of arguments (%d), expecting %d for '%s'"),
520
		      nargs, symbol.symbol.external->numArgs, buf);
522
			    nargs, symbol.symbol.external->numArgs, buf);
-
 
523
	    else
-
 
524
		errorcall(call,
-
 
525
			  _("Incorrect number of arguments (%d), expecting %d for '%s'"),
-
 
526
			  nargs, symbol.symbol.external->numArgs, buf);
-
 
527
 
-
 
528
	}
521
    }
529
    }
522
 
530
 
523
    if (PRIMVAL(op) == 1) {
531
    if (PRIMVAL(op) == 1) {
524
	R_ExternalRoutine2 fun = (R_ExternalRoutine2) ofun;
532
	R_ExternalRoutine2 fun = (R_ExternalRoutine2) ofun;
525
	retval = fun(call, op, args, env);
533
	retval = fun(call, op, args, env);