/* PUT.H -- STDERR output routines, no malloc */

// calls _dos_write, returns number of bytes actually writen
unsigned doswrite(int handle, char far *s, unsigned len);

// displays ASCIIZ string on STDERR
unsigned put_str(char far *s);

// displays character on STDERR
unsigned put_chr(int c);

// displays number (width, radix) on STDERR
unsigned put_num(unsigned long u, unsigned wid, unsigned radix);

// PUT includes alternate version of printf: goes to STDERR,
// doesn't use malloc. Same prototype as <stdio.h>

// get string from STDERR, returns actual length
unsigned get_str(char far *s, unsigned len);

#define putstr(s)       { put_str(s); put_str("\r\n"); }
#define put_hex(u)      put_num(u, 4, 16)
#define put_long(ul)    put_num(ul, 9, 10)
