home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
BDSC
/
BDSC-2
/
LPRINT.CQ
/
LPRINT.C
Wrap
Text File
|
2000-06-30
|
896b
|
47 lines
/*
New functions for BDS C v1.4x: "lprintf" and "lputs"
Written 1/18/81 by Leor Zolman
*/
#include <bdscio.h>
#define LISTDEV 2
/*
Formatted output to the list device. Usage:
lprintf(format, arg1, arg2, ...)
char *format;
Works just like "printf", except the output line is written
to the lineprinter instead of to the console.
*/
lprintf(format)
char *format;
{
char txtlin[MAXLINE];
_spr(txtlin,&format);
lputs(txtlin);
}
/*
Put a line out to the list device. Usage:
lputs(str)
char *str;
Works just like "puts", except the output line goes to the
printer instead of to the console:
*/
lputs(str)
char *str;
{
char c;
while (c = *str++) {
if (c == '\n') putc('\r',LISTDEV);
putc(c,LISTDEV);
}
}