h_sign.c 266 B

123456789101112131415161718
  1. #include "f2c.h"
  2. #ifdef __cplusplus
  3. extern "C" {
  4. #endif
  5. #ifdef KR_headers
  6. shortint h_sign(a,b) shortint *a, *b;
  7. #else
  8. shortint h_sign(shortint *a, shortint *b)
  9. #endif
  10. {
  11. shortint x;
  12. x = (*a >= 0 ? *a : - *a);
  13. return( *b >= 0 ? x : -x);
  14. }
  15. #ifdef __cplusplus
  16. }
  17. #endif