From 9925112da98bdbc8a22a49c21304797383650ff6 Mon Sep 17 00:00:00 2001 From: biouman <> Date: Sun, 20 May 2001 00:38:11 +0000 Subject: *** empty log message *** --- lib/interne.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'lib/interne.c') 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; -- cgit v1.2.3