#include "fxlib.h" #include #include #include #include #define FILESIZE() (Bfile_GetFileSize(fichier)+1) #define FREE(pointeur) free(pointeur);\ pointeur=NULL; #define MESURE 0 #define TYPE 1 #define HAUTEUR 2 #define TEMPS 3 #define DUREE 4 #define POINTE 5 #define NOTE 1 #define NOTE_X partition[numero_note][2]*9 #define NOTE_Y -partition[numero_note][3]*3 #define RONDE 0 #define BLANCHE 1 #define NOIRE 2 #define CROCHE 3 //int intro(void); //int testmalloc(void); //char decoupage_ligne(char *ligne); //char *substr(char texte[],long debut,long fin); //void nouvelle_note(Note *note,long parametre_note,int type_parametre_note); int AddIn_main(int isAppli, unsigned short OptionNum) { unsigned int key; Bdisp_AllClr_DDVRAM(); intro(); while(1) { GetKey(&key); } return 1; } char *substr(char texte[],long debut,long fin) { long compteur=0; char *retour=NULL; retour=malloc((fin-debut+1)*sizeof(char)); for(compteur=debut;compteur<=fin;compteur++) retour[compteur-debut]=texte[compteur]; retour[compteur-debut+1]='\0'; return retour; } char decoupage_ligne(long ***partition,char texte[],int *nombre_malloc) { int compteur=0; int nombre_ligne=0; int parametre_note=0; char affichage[21]; int debut=0; for(compteur=0;compteur<=strlen(texte);compteur++) { if(texte[compteur]=='\n') { // sprintf(affichage,"%ld",compteur); // PrintMini(compteur,15,affichage,0); nombre_ligne++; } } *partition=malloc(sizeof(long*)*nombre_ligne); for(compteur=0;compteur