Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
4.0 KiB

  1. #ifndef FLOATS_INCLUDED
  2. #define FLOATS_INCLUDED
  3. #include "bastypes.h"
  4. #if HWR_SYSTEM == HWR_WINDOWS || HWR_SYSTEM == HWR_DOS || HWR_SYSTEM == HWR_ANSI || HWR_SYSTEM == HWR_EPOC32 /* substitute floating */
  5. /* point operations */
  6. #define HWRfl_add(a,b,c) ((*(c))=((a)+(b))) /* */
  7. #define HWRfl_sub(a,b,c) ((*(c))=((a)-(b))) /* */
  8. #define HWRfl_mul(a,b,c) ((*(c))=((a)*(b))) /* */
  9. #define HWRfl_div(a,b,c) ((*(c))=((a)/(b))) /* */
  10. #define HWRfl_assign(a,b) ((*(a))=(b)) /* */
  11. #define HWRfl_gt(a,b) ((a)>(b)) /* */
  12. #define HWRfl_ge(a,b) ((a)>=(b)) /* */
  13. #define HWRfl_lt(a,b) ((a)<(b)) /* */
  14. #define HWRfl_le(a,b) ((a)<=(b)) /* */
  15. #define HWRfl_eq(a,b) ((a)==(b)) /* */
  16. #define HWRfl_ne(a,b) ((a)!=(b)) /* */
  17. #define HWRitof(a,b) ((*(b))=((_DOUBLE)(a)))/* */
  18. #define HWRltof(a,b) ((*(b))=((_DOUBLE)(a)))/* */
  19. #define HWRftoi(a) ((_SHORT)(a)) /* */
  20. #define HWRftol(a) ((_LONG)(a)) /* */
  21. /* */
  22. #else /* */
  23. /* */
  24. _VOID HWRfl_add(_DOUBLE add1,_DOUBLE add2,p_DOUBLE res);/* */
  25. /* */
  26. _VOID HWRfl_sub(_DOUBLE sub1,_DOUBLE sub2,p_DOUBLE res);/* */
  27. /* */
  28. _VOID HWRfl_mul(_DOUBLE mul1,_DOUBLE mul2,p_DOUBLE res);/* */
  29. /* */
  30. _VOID HWRfl_div(_DOUBLE div1,_DOUBLE div2,p_DOUBLE res);/* */
  31. /* */
  32. _VOID HWRfl_assign(p_DOUBLE res,_DOUBLE ass); /* */
  33. /* */
  34. _BOOL HWRfl_gt(_DOUBLE op1,_DOUBLE op2); /* */
  35. /* */
  36. _BOOL HWRfl_ge(_DOUBLE op1,_DOUBLE op2); /* */
  37. /* */
  38. _BOOL HWRfl_lt(_DOUBLE op1,_DOUBLE op2); /* */
  39. /* */
  40. _BOOL HWRfl_le(_DOUBLE op1,_DOUBLE op2); /* */
  41. /* */
  42. _BOOL HWRfl_eq(_DOUBLE op1,_DOUBLE op2); /* */
  43. /* */
  44. _BOOL HWRfl_ne(_DOUBLE op1,_DOUBLE op2); /* */
  45. /* */
  46. _VOID HWRitof(_SHORT op1,p_DOUBLE res); /* */
  47. /* */
  48. _VOID HWRltof(_LONG op1,p_DOUBLE res); /* */
  49. /* */
  50. _SHORT HWRftoi(_DOUBLE op1); /* */
  51. /* */
  52. _LONG HWRftol(_DOUBLE op1); /* */
  53. /* */
  54. #endif /* floating point operations */
  55. #endif /* FLOATS_INCLUDED */