home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 2.ddi / RTLINSRC.ZIP / _PRINTF.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  3.3 KB  |  102 lines

  1. /*------------------------------------------------------------------------
  2.  * filename - _printf.h
  3.  *
  4.  *      definitions for formatted printing functions
  5.  *-----------------------------------------------------------------------*/
  6.  
  7. /*[]------------------------------------------------------------[]*/
  8. /*|                                                              |*/
  9. /*|     C/C++ Run Time Library - Version 4.0                     |*/
  10. /*|                                                              |*/
  11. /*|                                                              |*/
  12. /*|     Copyright (c) 1987, 1991 by Borland International        |*/
  13. /*|     All Rights Reserved.                                     |*/
  14. /*|                                                              |*/
  15. /*[]------------------------------------------------------------[]*/
  16.  
  17.  
  18. #ifndef __PRINTF_H
  19. #define __PRINTF_H
  20.  
  21. #if !defined(__STDARG_H)
  22. #include <stdarg.h>
  23. #endif
  24.  
  25. #define __XCVTDIG__  40   /* xcvt() maximum digits supported    */
  26. #define __XCVTMAX__  47   /* bytes for longest xcvt() string    */
  27. #define __LTOAMAX__  32   /* bytes for radix 2 longtoa() string */
  28. #define __CVTMAX__   48   /* MAX of the above, + 1 for \0       */
  29.  
  30. typedef unsigned pascal near putnF (const void *ptr, unsigned n, void *fp);
  31.  
  32. /*
  33.     Defining the symbol FLOATS_32_BIT enables recognition of
  34.     32 bit floats on the stack by using the 'h' size modifier.
  35.     YOU, must FORCE the float to be pushed as a 32 bit number
  36.     though!  The compiler normally widens floats to 64 bit doubles.
  37.  
  38.     example:
  39.             union {
  40.                 float f;
  41.                 long l
  42.                 } u;
  43.             printf("%hg\n", u.l);
  44.  
  45.     This feature can be DISABLED by default for strict ANSI compatability.
  46. */
  47. #define FLOATS_32_BIT       1
  48.  
  49. /*
  50.     Floating point parameter types to formatting functions.
  51.     The numbers are the offset of the fraction in the data type.
  52. */
  53. #define F_4byteFloat    2
  54. #define F_8byteFloat    6
  55. #define F_10byteFloat   8
  56.  
  57. /* These must NEVER be the same as an unnormalized 87' exponent! */
  58.  
  59. #define NAN_number  32766   /* xcvt() -> as NAN exponent    */
  60. #define INF_number  32767   /* xcvt() -> as INF exponent    */
  61.  
  62.  
  63. #ifdef __cplusplus
  64. extern "C" {
  65. #endif
  66.  
  67. #ifdef __OS2__
  68. int pascal near __vprinter(putnF *__putter, void *__outP, const char *__formatP, va_list __argP );
  69. #else
  70. int pascal near __vprinter(putnF near *__putter, void *__outP, const char *__formatP, void _ss *__argP );
  71. #endif
  72.  
  73. char *pascal near __longtoa(long __value, 
  74.                             char *__S, 
  75.                             int __radix, 
  76.                             char __maybeSigned, 
  77.                             char __hexStyle
  78.                            );
  79.  
  80. void pascal near __realcvt(void *__valueP, 
  81.                            int __ndec, 
  82.                            char *__strP, 
  83.                            char __formCh, 
  84.                            char __altFormat, 
  85.                            int __type
  86.                           );
  87.  
  88. char * pascal near __utoa(unsigned __value, char *__buf);
  89.  
  90. int pascal near __xcvt(void *__valP, 
  91.                        int __digits, 
  92.                        int *__signP, 
  93.                        char *__strP, 
  94.                        int __ftype
  95.                       );
  96.  
  97. #ifdef __cplusplus
  98. }
  99. #endif
  100.  
  101. #endif
  102.