add taia_half

This commit is contained in:
leitner 2005-10-14 15:37:19 +00:00
parent 8a93baebee
commit 1486e8dd7b
2 changed files with 12 additions and 0 deletions

View File

@ -8,6 +8,7 @@
This is just to get gatling to work, I may remove it again after This is just to get gatling to work, I may remove it again after
that. that.
implement Nikola's idea to remove limit number of strings in errmsg implement Nikola's idea to remove limit number of strings in errmsg
add taia_half
0.24: 0.24:
fix scan_to_sa (Tim Lorenz) fix scan_to_sa (Tim Lorenz)

11
taia/taia_half.c Normal file
View File

@ -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;
}