aboutsummaryrefslogtreecommitdiffstats
path: root/src/zseti.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/zseti.c')
-rw-r--r--src/zseti.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/zseti.c b/src/zseti.c
new file mode 100644
index 0000000..c42ffd6
--- /dev/null
+++ b/src/zseti.c
@@ -0,0 +1,14 @@
+/* See LICENSE file for copyright and license details. */
+#include "internals"
+
+
+void
+zseti(z_t a, long long int b)
+{
+ if (b >= 0) {
+ zsetu(a, (unsigned long long int)b);
+ } else {
+ zsetu(a, (unsigned long long int)-b);
+ SET_SIGNUM(a, -1);
+ }
+}