#include <term.h>
-MODULE_ID("$Id: lib_print.c,v 1.9 1998/02/11 12:13:53 tom Exp $")
+MODULE_ID("$Id: lib_print.c,v 1.11 1999/02/27 19:59:05 tom Exp $")
int mcprint(char *data, int len)
/* ship binary character data to the printer via mc4/mc5/mc5p */
size_t onsize, offsize, res;
errno = 0;
- if (!prtr_non && (!prtr_on || !prtr_off))
+ if (!cur_term || (!prtr_non && (!prtr_on || !prtr_off)))
{
errno = ENODEV;
return(ERR);
offsize = strlen(prtr_off);
}
- if ((mybuf = malloc(onsize + len + offsize + 1)) == (char *)NULL)
+ if ((mybuf = typeMalloc(char, onsize + len + offsize + 1)) == (char *)0)
{
errno = ENOMEM;
return(ERR);