summaryrefslogtreecommitdiffstats
path: root/lib/libF77/h_sign.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libF77/h_sign.c')
-rw-r--r--lib/libF77/h_sign.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/libF77/h_sign.c b/lib/libF77/h_sign.c
new file mode 100644
index 0000000..7b06c15
--- /dev/null
+++ b/lib/libF77/h_sign.c
@@ -0,0 +1,12 @@
+#include "f2c.h"
+
+#ifdef KR_headers
+shortint h_sign(a,b) shortint *a, *b;
+#else
+shortint h_sign(shortint *a, shortint *b)
+#endif
+{
+shortint x;
+x = (*a >= 0 ? *a : - *a);
+return( *b >= 0 ? x : -x);
+}
OpenPOWER on IntegriCloud