From 5aed7634c8993e3366817c4b20fca1aa18eacf21 Mon Sep 17 00:00:00 2001 From: Pixel <> Date: Tue, 17 Apr 2001 04:05:52 +0000 Subject: Indentation plus faible --- lib/interne.c | 58 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'lib/interne.c') diff --git a/lib/interne.c b/lib/interne.c index a8e1db5..9e59944 100644 --- a/lib/interne.c +++ b/lib/interne.c @@ -10,85 +10,85 @@ void Reset(Uint32 * i) { /* met tous les bits d'un mot à zéro */ - *i &= 0; + *i &= 0; } /* Ok */ void Set(Uint32 * i) { /* met le bit de poids faible à 1 */ - *i &= 1; + *i &= 1; } /* Ok */ /* Met le bit 'position' à zéro */ void ResetBit(Uint32 * i, int position) { - if (position < 0 || position > 31) { - exception(1, _("ResetBit: Incorrect Value")); - } else { - Uint32 aux = VAL_MAX - (1 << position); + if (position < 0 || position > 31) { + exception(1, _("ResetBit: Incorrect Value")); + } else { + Uint32 aux = VAL_MAX - (1 << position); - *i &= aux; - } + *i &= aux; + } } /* Ok */ /* Met le bit 'position' à un */ void SetBit(Uint32 * i, int position) { - if (position < 0 || position > 31) { - exception(1, _("SetBit: Incorrect Value")); - } else { - Uint32 aux = 1 << position; + if (position < 0 || position > 31) { + exception(1, _("SetBit: Incorrect Value")); + } else { + Uint32 aux = 1 << position; - *i |= aux; - } + *i |= aux; + } } /* Ok */ /* Donne la valeur du bit 'position' */ int ValeurBit(Uint32 nombre, int position) { - if (position < 0 || position > 31) { - exception(1, _("ValeurBit: Incorrect Value")); - return (-1); - } - return ((nombre >> position) & 1); + if (position < 0 || position > 31) { + exception(1, _("ValeurBit: Incorrect Value")); + return (-1); + } + return ((nombre >> position) & 1); } /* Ok */ /* Affiche tous les bits d'un mot */ void Uint32toBin(Uint32 i) { - int k; + int k; - for (k = 31; k >= 0; k--) - printf("%d", ValeurBit(i, k)); - printf("\n"); + for (k = 31; k >= 0; k--) + printf("%d", ValeurBit(i, k)); + printf("\n"); } /* Ok */ /* Extrait un champ dans un mot */ Uint32 champ(Uint32 nombre, int taille) { - return (nombre & (taille - 1)); + return (nombre & (taille - 1)); } /* Ok */ Uint32 Opcode(Uint32 ins) { - return (champ(ins >> 0, 256)); + return (champ(ins >> 0, 256)); } /* Ok */ Uint32 Extension(Uint32 ins) { - return (champ(ins >> 8, 64)); + return (champ(ins >> 8, 64)); } /* Ok */ Uint32 Champ1(Uint32 ins) { - return (champ(ins >> 14, 64)); + return (champ(ins >> 14, 64)); } /* Ok */ Uint32 Champ2(Uint32 ins) { - return (champ(ins >> 20, 64)); + return (champ(ins >> 20, 64)); } /* Ok */ Uint32 Champ3(Uint32 ins) { - return (champ(ins >> 26, 64)); + return (champ(ins >> 26, 64)); } /* Ok */ -- cgit v1.2.3