home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l440 / 2.ddi / CHAP5 / PUT.H < prev    next >
Encoding:
Text File  |  1990-09-26  |  779 b   |  24 lines

  1. /* PUT.H -- STDERR output routines, no malloc */
  2.  
  3. // calls _dos_write, returns number of bytes actually writen
  4. unsigned doswrite(int handle, char far *s, unsigned len);
  5.  
  6. // displays ASCIIZ string on STDERR
  7. unsigned put_str(char far *s);
  8.  
  9. // displays character on STDERR
  10. unsigned put_chr(int c);
  11.  
  12. // displays number (width, radix) on STDERR
  13. unsigned put_num(unsigned long u, unsigned wid, unsigned radix);
  14.  
  15. // PUT includes alternate version of printf: goes to STDERR,
  16. // doesn't use malloc. Same prototype as <stdio.h>
  17.  
  18. // get string from STDERR, returns actual length
  19. unsigned get_str(char far *s, unsigned len);
  20.  
  21. #define putstr(s)       { put_str(s); put_str("\r\n"); }
  22. #define put_hex(u)      put_num(u, 4, 16)
  23. #define put_long(ul)    put_num(ul, 9, 10)
  24.