if (~(otype = ask ('print to', 'choice', 'file|printer')))
return;
if (otype == 'printer') {
- name = '/tmp/dottyout.ps';
+ if (~getenv ('TMPDIR'))
+ name = concat (getenv ('HOME'), '/.dottyout.ps');
+ else
+ name = concat (getenv ('TMPDIR'), '/.dottyout.ps', random (10000));
if (getenv ('LEFTYWINSYS') ~= 'mswin' & ~pr)
if (~(pr = ask ('printer command', 'string', 'lpr')))
return;
vt.canvas = canvas;
destroywidget (pscanvas);
if (otype == 'printer' & getenv ('LEFTYWINSYS') ~= 'mswin')
- system (concat (pr, ' /tmp/dottyout.ps; rm /tmp/dottyout.ps'));
+ system (concat (pr, ' ', name, '; rm ',name));
};
int Iecho (int argc, lvar_t *argv) {
int i;
+ rtno = NULL;
for (i = 0; i < argc; i++) {
switch (Tgettype (argv[i].o)) {
case T_STRING: printf ("%s", Tgetstring (argv[i].o)); break;