From 1486e8dd7b232862df8bf67a5bf4a1d65f1a3a30 Mon Sep 17 00:00:00 2001 From: leitner Date: Fri, 14 Oct 2005 15:37:19 +0000 Subject: [PATCH] add taia_half --- CHANGES | 1 + taia/taia_half.c | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 taia/taia_half.c diff --git a/CHANGES b/CHANGES index 289d75d..ba07a6b 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,7 @@ This is just to get gatling to work, I may remove it again after that. implement Nikola's idea to remove limit number of strings in errmsg + add taia_half 0.24: fix scan_to_sa (Tim Lorenz) diff --git a/taia/taia_half.c b/taia/taia_half.c new file mode 100644 index 0000000..189bd0c --- /dev/null +++ b/taia/taia_half.c @@ -0,0 +1,11 @@ +#include "taia.h" + +/* XXX: breaks tai encapsulation */ + +void taia_half(tai6464* t,const tai6464* u) { + t->atto = u->atto >> 1; + if (u->nano & 1) t->atto += 500000000UL; + t->nano = u->nano >> 1; + if (u->sec.x & 1) t->nano += 500000000UL; + t->sec.x = u->sec.x >> 1; +}