2 * vint64ops.h - operations on 'vint64' values
4 * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
5 * The contents of 'html/copyright.html' apply.
6 * ----------------------------------------------------------------------
7 * This is an attempt to get the vint64 calculations stuff centralised.
12 /* signed/unsigned compare. returns 1/0/-1 if lhs >/=/< rhs */
13 extern int icmpv64(const vint64 * lhs, const vint64 * rhs);
14 extern int ucmpv64(const vint64 * lhs, const vint64 * rhs);
17 extern vint64 addv64(const vint64 *lhs, const vint64 *rhs);
18 extern vint64 addv64i32(const vint64 * lhs, int32_t rhs);
19 extern vint64 addv64u32(const vint64 * lhs, uint32_t rhs);
21 extern vint64 subv64(const vint64 *lhs, const vint64 *rhs);
22 extern vint64 subv64i32(const vint64 * lhs, int32_t rhs);
23 extern vint64 subv64u32(const vint64 * lhs, uint32_t rhs);
25 /* parsing. works like strtoul() or strtoull() */
26 extern vint64 strtouv64(const char * begp, char ** endp, int base);
28 #endif /*!defined(VINT64OPS_H)*/