#include "diabolo.h" #include "fichier.h" #include "tm.h" //************************************************************************************* // #ifdef _archeops //--------- pour Archeops ------------------------------ *** void exec_lit_fichier_ARCH(int fen,int item,double valeur,...) { block_type_modele bkt; static long pos; int fich,type; fich=(int)infos(fen)->util; switch(item) { case ouverture : printf("\nlecture du fichier %s \n",titre(fich)); { char cc[12]; litF(fich,12,cc); printf("debut fich= %x %x %x %x %x %x %x %x \n",cc[0],cc[1],cc[2],cc[3],cc[4],cc[5],cc[6],cc[7]); } pos=0; select(fen); break; case fermeture : printf("fermeture du fichier \n\n"); ferme(fich); break; case tache_de_fond : { int u; int nn,nb,ll; def_nom_block nn=0; do { if ( (pos+12) > longueur(fich) ) { printf("fin du fichier \n"); ferme(fen);nn=-1;nb=0; } else { position(fich,pos); litF(fich,sizeof(block_type_modele),&bkt); type=type_block(&bkt); ll=longueur_block(&bkt); if( (ll<16) ou (ll>50000) ) {pos+=4;printf(" erreur longueur ");nn=-1;nb=0;} else { pos+=ll; printf("block %d : %s \n",numero_block(&bkt),nom_block[type]); if(!nn) nn=numero_block(&bkt); u=tt->tm.pos_ecrit; tt->tm.btm[u].tmtrx=bkt; u++; if(u>=longueur_table_tm) u=0; tt->tm.pos_ecrit=u; nb=numero_block(&bkt); } } } while(nb==nn); } break; default : break; } } #endif // //*****************************************************************************************