#include <stdio.h>
#include <stdlib.h>


void e_hors_memoire(int d){
    fprintf(stderr,"Adresse hors memoire %d !\n",d);
    exit(1);}

void e_pile_vide(void){
    fprintf(stderr,"La pile est vide !\n");
    exit(1);}

void e_pile_pleine(void){
    fprintf(stderr,"La pile est pleine !\n");
    exit(1);}

void e_division_zero(void){
    fprintf(stderr,"Division par zero !\n");
    exit(1);}

void imprimer(int x){
    fprintf(stdout,"%d\n",x);}

static int memoire[1000];

void store(int d,int x){
    if((0<=d)&&(d<sizeof(memoire)/sizeof(int))){
        memoire[d]=x;}else{
        fprintf(stderr,"Adresse hors memoire %d !\n",d);
        exit(1);}}

int retrieve(int d){
    if((0<=d)&&(d<sizeof(memoire)/sizeof(int))){
        return(memoire[d]);}else{
        e_hors_memoire(d);}}

//// THE END of npc.lib.c ////
ViewGit