diff options
author | biouman <> | 2001-05-20 00:38:11 +0000 |
---|---|---|
committer | biouman <> | 2001-05-20 00:38:11 +0000 |
commit | 9925112da98bdbc8a22a49c21304797383650ff6 (patch) | |
tree | 3b4edd0e0729bc2e60ac64c227fda9a2c985a605 /lib/interne.c | |
parent | 9d6740c3b6c83b3493ce2254ddb48a0995bd28b4 (diff) |
*** empty log message ***
Diffstat (limited to 'lib/interne.c')
-rw-r--r-- | lib/interne.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/lib/interne.c b/lib/interne.c index 642ce16..ea532cc 100644 --- a/lib/interne.c +++ b/lib/interne.c @@ -54,23 +54,24 @@ Uint32 ONE(void) { return (1); } /* Met le bit 'position' à zéro */ void ResetBit(Uint32 * i, int position) { + int k; + Uint32 maxi = ZERO(); if (position < 0 || position > 31) exception(1, _("ResetBit: Incorrect Value")); else { - int k; - Uint32 VAL_MAX = ZERO(); + for (k = 0; k < 32; k++) - SetBit(&VAL_MAX, k); - * i &= VAL_MAX - (ONE() << position); + SetBit(&maxi, k); + * i &= maxi - (ONE() << position); } } /* Met le bit 'position' à un */ void SetBit(Uint32 * i, int position) { + Uint32 aux = ONE() << position; if (position < 0 || position > 31) exception(1, _("SetBit: Incorrect Value")); else { - Uint32 aux = ONE() << position; * i |= aux; } } @@ -91,15 +92,6 @@ int Neg(Uint32 a) { return (ValeurBit(a, 31)); } -/* Met le flag d'overflow à zéro */ -void SetOverflow(int * o) { * o = ONE(); } - -/* Met le flag d'overflow à un */ -void ResetOverflow(int * o) { * o = ZERO(); } - -/* Donne la valeur du flag d'overflow */ -int Overflow(int o) { return (o); } - /* Affiche tous les bits d'un mot */ void Uint32toBin(Uint32 i) { int k; |