summaryrefslogtreecommitdiff
path: root/lib/interne.c
diff options
context:
space:
mode:
authorbiouman <>2001-04-15 16:57:11 +0000
committerbiouman <>2001-04-15 16:57:11 +0000
commitec47858fe9883186fad904f71d43ec289fa01409 (patch)
treecddf54138fa0b4e11d649d7f5853d54c3f89a467 /lib/interne.c
parent9ff8f76673e167cf3b14b1cd3f401441fd4397ef (diff)
*** empty log message ***
Diffstat (limited to 'lib/interne.c')
-rw-r--r--lib/interne.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/interne.c b/lib/interne.c
index 05c4332..5a563fe 100644
--- a/lib/interne.c
+++ b/lib/interne.c
@@ -1,12 +1,12 @@
#include <stdio.h>
#include "interne.h"
#include "simulator.h"
-
-// mettre des exceptions dans les fcns ci dessous a la place de GestionErreurs
-
-void GestionErreurs(void)
-{
-}
+#include "exceptions.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#else
+#define _(x) x
+#endif
void Reset(Uint32 * i)
{ /* met tous les bits d'un mot à zéro */
@@ -22,7 +22,7 @@ void Set(Uint32 * i)
void ResetBit(Uint32 * i, int position)
{
if (position < 0 || position > 31) {
- GestionErreurs();
+ exception(1,_("ResetBit: Incorrect Value"));
} else {
Uint32 aux = VAL_MAX - (1 << position);
@@ -34,7 +34,7 @@ void ResetBit(Uint32 * i, int position)
void SetBit(Uint32 * i, int position)
{
if (position < 0 || position > 31) {
- GestionErreurs();
+ exception(1,_("SetBit: Incorrect Value"));
} else {
Uint32 aux = 1 << position;
@@ -46,7 +46,7 @@ void SetBit(Uint32 * i, int position)
int ValeurBit(Uint32 nombre, int position)
{
if (position < 0 || position > 31) {
- GestionErreurs();
+ exception(1,_("ValeurBit: Incorrect Value"));
return (-1);
}
return ((nombre >> position) & 1);