The R Project SVN R

Rev

Rev 25686 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25686 Rev 26152
Line 1466... Line 1466...
1466
	warning("printing via file = \"\" is not implemented in this version");
1466
	warning("printing via file = \"\" is not implemented in this version");
1467
	return FALSE;
1467
	return FALSE;
1468
#else
1468
#else
1469
	if(strlen(pd->command) == 0) return FALSE;
1469
	if(strlen(pd->command) == 0) return FALSE;
1470
        errno = 0;
1470
        errno = 0;
1471
	pd->psfp = popen(pd->command, "w");
1471
	pd->psfp = R_popen(pd->command, "w");
1472
	pd->open_type = 1;
1472
	pd->open_type = 1;
1473
        if (!pd->psfp || errno != 0) {
1473
        if (!pd->psfp || errno != 0) {
1474
            warning("cannot open `postscript' pipe to `%s'", pd->command);
1474
            warning("cannot open `postscript' pipe to `%s'", pd->command);
1475
            return FALSE;
1475
            return FALSE;
1476
        }
1476
        }
Line 1479... Line 1479...
1479
#ifndef HAVE_POPEN
1479
#ifndef HAVE_POPEN
1480
	warning("file = \"|cmd\" is not implemented in this version");
1480
	warning("file = \"|cmd\" is not implemented in this version");
1481
	return FALSE;
1481
	return FALSE;
1482
#else
1482
#else
1483
	errno = 0;
1483
	errno = 0;
1484
	pd->psfp = popen(pd->filename + 1, "w");
1484
	pd->psfp = R_popen(pd->filename + 1, "w");
1485
	pd->open_type = 1;
1485
	pd->open_type = 1;
1486
	if (!pd->psfp || errno != 0) {
1486
	if (!pd->psfp || errno != 0) {
1487
	    warning("cannot open `postscript' pipe to `%s'", pd->filename + 1);
1487
	    warning("cannot open `postscript' pipe to `%s'", pd->filename + 1);
1488
	    return FALSE;
1488
	    return FALSE;
1489
	}
1489
	}
Line 1614... Line 1614...
1614
	    strcpy(buff, pd->command);
1614
	    strcpy(buff, pd->command);
1615
	    strcat(buff, " ");
1615
	    strcat(buff, " ");
1616
	    strcat(buff, pd->filename);
1616
	    strcat(buff, pd->filename);
1617
/*	    Rprintf("buff is %s\n", buff); */
1617
/*	    Rprintf("buff is %s\n", buff); */
1618
#ifdef Unix
1618
#ifdef Unix
1619
	    err = system(buff);
1619
	    err = R_system(buff);
1620
#endif
1620
#endif
1621
#ifdef Win32
1621
#ifdef Win32
1622
	    err = runcmd(buff, 0, 0, NULL);
1622
	    err = runcmd(buff, 0, 0, NULL);
1623
#endif
1623
#endif
1624
	    if (err)
1624
	    if (err)