Ignore:
Timestamp:
Nov 25, 1999, 3:05:04 PM (26 years ago)
Author:
ansari
Message:

archediab 29

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Poubelle/archediab.old/archediab.sources/c/fichier_relit_ARCH.c

    r637 r651  
    2121        {
    2222        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                                        }
    2328                                pos=0;
     29                                select(fen);
    2430                                break;
    2531
     
    3036        case tache_de_fond :
    3137
    32                         if (  (pos+12) >  longueur(fich) )
    33                                 {
    34                                 printf("fin du fichier \n");
    35                                 ferme(fen);
     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                                        }
    3669                                }
    37 
    38                         else
    39                                 {
    40                                 int u;
    41                                 def_nom_block
    42                                
    43                                 position(fich,pos);
    44                                 litF(fich,sizeof(block_type_modele),&bkt);
    45                                 type=type_block(&bkt);
    46                                 pos+=longueur_block(&bkt);
    47                                 printf("block %d  :  %s \n",numero_block(&bkt),nom_block[type]);
    48                                
    49                                 u=tt->tm.pos_ecrit;
    50                                 tt->tm.btm[u].tmtrx=bkt;
    51                                 u++; if(u>=longueur_table_tm) u=0;
    52                                 tt->tm.pos_ecrit=u;
    53                                 }
     70                        while(nb==nn);
     71                        }
    5472
    5573                        break;
Note: See TracChangeset for help on using the changeset viewer.