The R Project SVN R

Rev

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

Rev 78127 Rev 78564
Line 1344... Line 1344...
1344
SEXP attribute_hidden do_Externalgr(SEXP call, SEXP op, SEXP args, SEXP env)
1344
SEXP attribute_hidden do_Externalgr(SEXP call, SEXP op, SEXP args, SEXP env)
1345
{
1345
{
1346
    SEXP retval;
1346
    SEXP retval;
1347
    pGEDevDesc dd = GEcurrentDevice();
1347
    pGEDevDesc dd = GEcurrentDevice();
1348
    Rboolean record = dd->recordGraphics;
1348
    Rboolean record = dd->recordGraphics;
-
 
1349
#ifdef R_GE_DEBUG
-
 
1350
    if (getenv("R_GE_DEBUG_record")) {
-
 
1351
        printf("do_Externalgr: record = FALSE\n");
-
 
1352
    }
-
 
1353
#endif
1349
    dd->recordGraphics = FALSE;
1354
    dd->recordGraphics = FALSE;
1350
    PROTECT(retval = do_External(call, op, args, env));
1355
    PROTECT(retval = do_External(call, op, args, env));
-
 
1356
#ifdef R_GE_DEBUG
-
 
1357
    if (getenv("R_GE_DEBUG_record")) {
-
 
1358
        printf("do_Externalgr: record = %d\n", record);
-
 
1359
    }
-
 
1360
#endif
1351
    dd->recordGraphics = record;
1361
    dd->recordGraphics = record;
1352
    if (GErecording(call, dd)) { // which is record && call != R_NilValue
1362
    if (GErecording(call, dd)) { // which is record && call != R_NilValue
1353
	if (!GEcheckState(dd))
1363
	if (!GEcheckState(dd))
1354
	    errorcall(call, _("invalid graphics state"));
1364
	    errorcall(call, _("invalid graphics state"));
1355
	/* args is escaping, so make sure it is reference counting. */
1365
	/* args is escaping, so make sure it is reference counting. */
Line 1365... Line 1375...
1365
SEXP attribute_hidden do_dotcallgr(SEXP call, SEXP op, SEXP args, SEXP env)
1375
SEXP attribute_hidden do_dotcallgr(SEXP call, SEXP op, SEXP args, SEXP env)
1366
{
1376
{
1367
    SEXP retval;
1377
    SEXP retval;
1368
    pGEDevDesc dd = GEcurrentDevice();
1378
    pGEDevDesc dd = GEcurrentDevice();
1369
    Rboolean record = dd->recordGraphics;
1379
    Rboolean record = dd->recordGraphics;
-
 
1380
#ifdef R_GE_DEBUG
-
 
1381
    if (getenv("R_GE_DEBUG_record")) {
-
 
1382
        printf("do_dotcallgr: record = FALSE\n");
-
 
1383
    }
-
 
1384
#endif
1370
    dd->recordGraphics = FALSE;
1385
    dd->recordGraphics = FALSE;
1371
    PROTECT(retval = do_dotcall(call, op, args, env));
1386
    PROTECT(retval = do_dotcall(call, op, args, env));
-
 
1387
#ifdef R_GE_DEBUG
-
 
1388
    if (getenv("R_GE_DEBUG_record")) {
-
 
1389
        printf("do_dotcallgr: record = %d\n", record);
-
 
1390
    }
-
 
1391
#endif
1372
    dd->recordGraphics = record;
1392
    dd->recordGraphics = record;
1373
    if (GErecording(call, dd)) {
1393
    if (GErecording(call, dd)) {
1374
	if (!GEcheckState(dd))
1394
	if (!GEcheckState(dd))
1375
	    errorcall(call, _("invalid graphics state"));
1395
	    errorcall(call, _("invalid graphics state"));
1376
	/* args is escaping, so make sure it is reference counting. */
1396
	/* args is escaping, so make sure it is reference counting. */