Fixed the PCX loader (broken by r176)

Made the calls to Error() more verbose


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@179 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud 2008-09-30 01:58:10 +00:00
parent 58b553b511
commit 1c872fdbe9
3 changed files with 10 additions and 2 deletions

View File

@ -8,5 +8,6 @@
#define UNTESTED printf("%s %d %s à tester !\n",__FILE__,__LINE__,__func__);
void Erreur(int);
void Erreur_fonction(int, const char *, int, const char *);
#define Erreur(n) Erreur_fonction(n, __FILE__,__LINE__,__func__)

View File

@ -3684,7 +3684,10 @@ void Load_PCX(void)
}
}
}
else
{
Erreur_fichier=1;
}
fclose(Fichier);
}

6
main.c
View File

@ -105,10 +105,14 @@ void Afficher_syntaxe(void)
// ---------------------------- Sortie impromptue ----------------------------
void Erreur(int Code)
void Erreur_fonction(int Code, const char *Nom_fichier, int Numero_ligne, const char *Nom_fonction)
{
T_Palette Palette_temporaire;
int Indice;
printf("Code %d\n", Code);
printf("File %s\n", Nom_fichier);
printf("Line %d\n", Numero_ligne);
printf("Function %s\n", Nom_fonction);
if (Code==0)
{