diff options
Diffstat (limited to 'lib/memoire.c')
-rw-r--r-- | lib/memoire.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/lib/memoire.c b/lib/memoire.c index 264009c..ae79d18 100644 --- a/lib/memoire.c +++ b/lib/memoire.c @@ -13,7 +13,7 @@ char temp[BUFSIZ]; -Uint32 * memoire_principale; +Uint32 *memoire_principale; /*****************************************/ @@ -23,11 +23,13 @@ Uint32 * memoire_principale; /*****************************************/ -void InitMemoire(void) { +void InitMemoire(void) +{ memoire_principale = (Uint32 *) Emalloc(TAILLE_MEMOIRE * sizeof(Uint32)); } -void FreeMemoire(void) { +void FreeMemoire(void) +{ free(memoire_principale); } @@ -35,7 +37,7 @@ void FreeMemoire(void) { Uint32 LD(Uint32 offset) { Uint32 i; - + switch (offset) { case 0xffffff00: initterm(); @@ -61,25 +63,29 @@ Uint32 LD(Uint32 offset) return i; } -static void copychaine(Uint32 * t, char * s) { +static void copychaine(Uint32 * t, char *s) +{ while (*s) { *(t++) = *(s++); } } -static void litchaine(char * s, Uint32 * t) { +static void litchaine(char *s, Uint32 * t) +{ while (*t) { *(s++) = *(t++); } } -static void Affiche(Uint32 * t) { +static void Affiche(Uint32 * t) +{ while (*t) { fprintf(stdout, "%c", (*t++)); } } -static void AfficheBinaire(Uint32 valeur) { +static void AfficheBinaire(Uint32 valeur) +{ if (valeur) { AfficheBinaire(valeur >> 1); fprintf(stdout, "%i", valeur & 1); |