diff --git a/Makefile.dep b/Makefile.dep index 4b1c50b7..295dacdf 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -1,7 +1,7 @@ main.o: main.c const.h struct.h global.h loadsave.h graph.h divers.h \ init.h boutons.h moteur.h pages.h files.h sdlscreen.h erreurs.h \ - readini.h saveini.h -init.o: init.c const.h struct.h global.h loadsave.h graph.h \ + readini.h saveini.h linux.h +init.o: init.c const.h struct.h global.h loadsave.h modesvdo.h graph.h \ boutons.h palette.h aide.h operatio.h divers.h erreurs.h graph.o: graph.c sdlscreen.h struct.h const.h graph.h divers.h moteur.h \ boutons.h pages.h global.h loadsave.h erreurs.h @@ -17,19 +17,19 @@ boutons.o: boutons.c const.h struct.h global.h loadsave.h divers.h \ palette.o: palette.c const.h struct.h global.h loadsave.h divers.h \ graph.h moteur.h readline.h boutons.h pages.h aide.o: aide.c const.h struct.h global.h loadsave.h divers.h graph.h \ - moteur.h + moteur.h tables_aide.h operatio.o: operatio.c const.h struct.h global.h loadsave.h divers.h \ moteur.h graph.h operatio.h boutons.h pages.h erreurs.h pages.o: pages.c global.h struct.h const.h loadsave.h pages.h graph.h \ - erreurs.h + erreurs.h linux.h loadsave.o: loadsave.c const.h struct.h global.h loadsave.h graph.h \ - divers.h pages.h op_c.h boutons.h erreurs.h + divers.h pages.h op_c.h boutons.h erreurs.h linux.h readline.o: readline.c const.h struct.h global.h loadsave.h graph.h \ - divers.h erreurs.h -moteur.o: moteur.c const.h struct.h global.h loadsave.h graph.h divers.h \ - special.h boutons.h operatio.h shade.h erreurs.h + divers.h erreurs.h linux.h +moteur.o: moteur.c boutons.h operatio.h shade.h erreurs.h const.h \ + struct.h global.h loadsave.h graph.h divers.h special.h linux.h files.o: files.c const.h struct.h global.h loadsave.h graph.h divers.h \ - erreurs.h + erreurs.h linux.h op_c.o: op_c.c op_c.h struct.h const.h op_asm.h erreurs.h linux.o: linux.c op_asm.o: op_asm.c op_c.h struct.h const.h graph.h diff --git a/files.c b/files.c index 3ddb8d01..f8927724 100644 --- a/files.c +++ b/files.c @@ -14,9 +14,9 @@ #include #include "erreurs.h" +#include "linux.h" #ifdef __linux__ - #include "linux.h" #include #define isHidden(Enreg) ((Enreg)->d_name[0]=='.' && (Enreg)->d_name[1]!='\0') #elif defined(__WATCOMC__) diff --git a/linux.c b/linux.c index 8ce0eee1..3cf0284f 100644 --- a/linux.c +++ b/linux.c @@ -1,3 +1,6 @@ +// Diverses fonctions qui existaient sous dos mais pas sous linux... +#ifdef __linux__ + #include #include #include @@ -29,3 +32,5 @@ void itoa(int source,char* dest, int longueur) { snprintf(dest,longueur,"%d",source); } + +#endif diff --git a/linux.h b/linux.h index 9e9580d9..b1eb77fc 100644 --- a/linux.h +++ b/linux.h @@ -1,4 +1,6 @@ -#pragma once +#ifndef _LINUX_H_ +#define _LINUX_H_ + #ifdef __linux__ void _splitpath(char* Buffer, char* Chemin, char* Nom_Fichier); @@ -15,3 +17,5 @@ void itoa(int source,char* dest, int longueur); /* Integer TO Ascii */ #endif + +#endif diff --git a/main.c b/main.c index 9cb53c8d..9d771ffa 100644 --- a/main.c +++ b/main.c @@ -23,10 +23,9 @@ #include "erreurs.h" #include "readini.h" #include "saveini.h" +#include "linux.h" -#ifdef __linux__ - #include "linux.h" //Fichier avec diverses fonctions qui existaient sous dos mais pas sous linux... -#else +#ifndef __linux__ #include #include #define chdir(dir) SetCurrentDirectory(dir) diff --git a/moteur.c b/moteur.c index 1c3d8004..66c3b246 100644 --- a/moteur.c +++ b/moteur.c @@ -1,6 +1,9 @@ // // Ce fichier contient la gestion du moteur // +#include +#include +#include #include "const.h" #include "struct.h" @@ -8,18 +11,11 @@ #include "graph.h" #include "divers.h" #include "special.h" - -#include -#include -#include #include "boutons.h" #include "operatio.h" #include "shade.h" #include "erreurs.h" - -#ifdef __linux__ - #include "linux.h" -#endif +#include "linux.h" //---------- Annuler les effets des modes de dessin (sauf la grille) --------- diff --git a/pages.c b/pages.c index c3b979bb..dc0fe4c8 100644 --- a/pages.c +++ b/pages.c @@ -10,10 +10,7 @@ #include "pages.h" #include "graph.h" #include "erreurs.h" - -#ifdef __linux__ - #include "linux.h" -#endif +#include "linux.h" /// /// GESTION DES PAGES diff --git a/readline.c b/readline.c index 87b7a031..98ab0e51 100644 --- a/readline.c +++ b/readline.c @@ -14,10 +14,7 @@ #include "divers.h" #include "erreurs.h" #include "const.h" - -#ifdef __linux__ - #include "linux.h" -#endif +#include "linux.h" #define COULEUR_TEXTE CM_Noir #define COULEUR_FOND CM_Clair diff --git a/readline.h b/readline.h index 9d4b2aea..16f1e515 100644 --- a/readline.h +++ b/readline.h @@ -1,9 +1,9 @@ byte Readline(word Pos_X,word Pos_Y,char * Chaine,byte Taille_maxi,byte Type_saisie); -// ParamŠtres: -// Pos_X, Pos_Y : Coordonn‚es de la saisie dans la fenˆtre -// Chaine : ChaŒne recevant la saisie (et contenant ‚ventuellement une valeur initiale) -// Taille_maxi : Nombre de caractŠres logeant dans la zone de saisie -// Type_saisie : 0=ChaŒne, 1=Nombre, 2=Nom de fichier (12 caractŠres) +// Paramètres: +// Pos_X, Pos_Y : Coordonnées de la saisie dans la fenêtre +// Chaine : Chaîne recevant la saisie (et contenant éventuellement une valeur initiale) +// Taille_maxi : Nombre de caractères logeant dans la zone de saisie +// Type_saisie : 0=Chaîne, 1=Nombre, 2=Nom de fichier (255 caractères réels) // Sortie: // 0: Sortie par annulation (Esc.) / 1: sortie par acceptation (Return)