| Line |  | 
|---|
| 1 | #include "diabolo.h" | 
|---|
| 2 | #include "fichier.h" | 
|---|
| 3 |  | 
|---|
| 4 | #include "tm.h" | 
|---|
| 5 |  | 
|---|
| 6 |  | 
|---|
| 7 | //************************************************************************************* | 
|---|
| 8 | // | 
|---|
| 9 | #ifdef _archeops        //---------   pour  Archeops    ------------------------------  *** | 
|---|
| 10 |  | 
|---|
| 11 |  | 
|---|
| 12 | void exec_lit_fichier_ARCH(int fen,int item,double valeur,...) | 
|---|
| 13 | { | 
|---|
| 14 | block_type_modele  bkt; | 
|---|
| 15 | static long pos; | 
|---|
| 16 | int fich,type; | 
|---|
| 17 |  | 
|---|
| 18 | fich=(int)infos(fen)->util; | 
|---|
| 19 |  | 
|---|
| 20 | switch(item) | 
|---|
| 21 | { | 
|---|
| 22 | case ouverture  :       printf("\nlecture du fichier %s  \n",titre(fich)); | 
|---|
| 23 | { | 
|---|
| 24 | char cc[12]; | 
|---|
| 25 | litF(fich,12,cc); | 
|---|
| 26 | 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]); | 
|---|
| 27 | } | 
|---|
| 28 | pos=0; | 
|---|
| 29 | select(fen); | 
|---|
| 30 | break; | 
|---|
| 31 |  | 
|---|
| 32 | case fermeture  :       printf("fermeture du fichier  \n\n"); | 
|---|
| 33 | ferme(fich); | 
|---|
| 34 | break; | 
|---|
| 35 |  | 
|---|
| 36 | case tache_de_fond : | 
|---|
| 37 |  | 
|---|
| 38 | { | 
|---|
| 39 | int u; | 
|---|
| 40 | int nn,nb,ll; | 
|---|
| 41 | def_nom_block | 
|---|
| 42 |  | 
|---|
| 43 | nn=0; | 
|---|
| 44 | do      { | 
|---|
| 45 |  | 
|---|
| 46 | if (  (pos+12) >  longueur(fich) ) | 
|---|
| 47 | { | 
|---|
| 48 | printf("fin du fichier \n"); | 
|---|
| 49 | ferme(fen);nn=-1;nb=0; | 
|---|
| 50 | } | 
|---|
| 51 | else    { | 
|---|
| 52 |  | 
|---|
| 53 | position(fich,pos); | 
|---|
| 54 | litF(fich,sizeof(block_type_modele),&bkt); | 
|---|
| 55 | type=type_block(&bkt); | 
|---|
| 56 | ll=longueur_block(&bkt); | 
|---|
| 57 | if( (ll<16) ou (ll>50000) ) {pos+=4;printf(" erreur longueur ");nn=-1;nb=0;} | 
|---|
| 58 | else    { | 
|---|
| 59 | pos+=ll; | 
|---|
| 60 | printf("block %d  :  %s \n",numero_block(&bkt),nom_block[type]); | 
|---|
| 61 | if(!nn) nn=numero_block(&bkt); | 
|---|
| 62 | u=tt->tm.pos_ecrit; | 
|---|
| 63 | tt->tm.btm[u].tmtrx=bkt; | 
|---|
| 64 | u++; if(u>=longueur_table_tm) u=0; | 
|---|
| 65 | tt->tm.pos_ecrit=u; | 
|---|
| 66 | nb=numero_block(&bkt); | 
|---|
| 67 | } | 
|---|
| 68 | } | 
|---|
| 69 | } | 
|---|
| 70 | while(nb==nn); | 
|---|
| 71 | } | 
|---|
| 72 |  | 
|---|
| 73 | break; | 
|---|
| 74 | default :       break; | 
|---|
| 75 | } | 
|---|
| 76 | } | 
|---|
| 77 |  | 
|---|
| 78 |  | 
|---|
| 79 |  | 
|---|
| 80 | #endif | 
|---|
| 81 | // | 
|---|
| 82 | //***************************************************************************************** | 
|---|
| 83 |  | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.