The R Project SVN R

Rev

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

Rev 30597 Rev 31671
Line 338... Line 338...
338
		 R_NilValue, R_NilValue);
338
		 R_NilValue, R_NilValue);
339
    cntxt.cend = &cleanup_PrintWarnings;
339
    cntxt.cend = &cleanup_PrintWarnings;
340
 
340
 
341
    inPrintWarnings = 1;
341
    inPrintWarnings = 1;
342
    if( R_CollectWarnings == 1 ) {
342
    if( R_CollectWarnings == 1 ) {
343
	REprintf("Warning message: \n");
343
	REprintf("Warning message:\n");
344
	names = CAR(ATTRIB(R_Warnings));
344
	names = CAR(ATTRIB(R_Warnings));
345
	if( VECTOR_ELT(R_Warnings, 0) == R_NilValue )
345
	if( VECTOR_ELT(R_Warnings, 0) == R_NilValue )
346
	   REprintf("%s \n", CHAR(STRING_ELT(names, 0)));
346
	   REprintf("%s \n", CHAR(STRING_ELT(names, 0)));
347
	else
347
	else
348
	   REprintf("%s in: %s \n", CHAR(STRING_ELT(names, 0)),
348
	   REprintf("%s in: %s \n", CHAR(STRING_ELT(names, 0)),
349
		CHAR(STRING_ELT(deparse1(VECTOR_ELT(R_Warnings, 0), 0, SIMPLEDEPARSE), 0)));
349
		CHAR(STRING_ELT(deparse1(VECTOR_ELT(R_Warnings, 0), 0, SIMPLEDEPARSE), 0)));
350
    }
350
    }
351
    else if( R_CollectWarnings <= 10 ) {
351
    else if( R_CollectWarnings <= 10 ) {
352
	REprintf("Warning messages: \n");
352
	REprintf("Warning messages:\n");
353
	names = CAR(ATTRIB(R_Warnings));
353
	names = CAR(ATTRIB(R_Warnings));
354
	for(i=0; i<R_CollectWarnings; i++) {
354
	for(i=0; i<R_CollectWarnings; i++) {
355
	    if( STRING_ELT(R_Warnings, i) == R_NilValue )
355
	    if( STRING_ELT(R_Warnings, i) == R_NilValue )
356
	       REprintf("%d: %s \n",i+1, CHAR(STRING_ELT(names, i)));
356
	       REprintf("%d: %s \n",i+1, CHAR(STRING_ELT(names, i)));
357
	    else
357
	    else