/[PAMELA software]/yoda/techmodel/forroutines/tracker/readraw/dunpacker.c
ViewVC logotype

Diff of /yoda/techmodel/forroutines/tracker/readraw/dunpacker.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6.0 by kusanagi, Tue Feb 7 17:11:11 2006 UTC revision 6.1 by kusanagi, Tue Jun 27 10:25:42 2006 UTC
# Line 56  void dunpacker_(int *l_buffer, unsigned Line 56  void dunpacker_(int *l_buffer, unsigned
56  /*     } */  /*     } */
57      int nbytes2=2;      int nbytes2=2;
58      unsigned int word_temp;      unsigned int word_temp;
59      unsigned short word[10000];      unsigned short word[*l_buffer];
60            
61    
62        if( *curpos+*l_buffer>*len ) {
63            printf("dunpacker: Unexpected end of file\n");
64            *error=1;
65            return ;
66        }
67    
68      for(i=0;i<*l_buffer;i++){      for(i=0;i<*l_buffer;i++){
69        getbytes_(&nbytes2,buffer,curpos,&word_temp);        getbytes_(&nbytes2,buffer,curpos,&word_temp);
70        word[i]=word_temp;        word[i]=word_temp;
71        buff[i]=word[i];        buff[i]=word[i];
72      }      }
73            
       
       
     if( *curpos-1>*len ) {  
       printf("dunpacker: Unexpected end of file\n");  
       *error=1;  
       return ;  
     }  
74  /*** unpacking buffer data ***/  /*** unpacking buffer data ***/
75  /************************************************************  /************************************************************
76   *     20/9/2005 modified by david fedele                     */   *     20/9/2005 modified by david fedele                     */
# Line 103  void dunpacker_(int *l_buffer, unsigned Line 103  void dunpacker_(int *l_buffer, unsigned
103  /*========================================================= */  /*========================================================= */
104  /*========================================================= */  /*========================================================= */
105  void unpacking(int nwords, unsigned short *output) {  void unpacking(int nwords, unsigned short *output) {
106      unsigned short out[10000];      unsigned short out[nwords];
107      int k;      int k;
108      unsigned short *oi, *oo, *o1;      unsigned short *oi, *oo, *o1;
109            
110      for( k=0; k<10000; ++k)      for( k=0; k<nwords; ++k)
111          out[k]=0;          out[k]=0;
112      oo=output;      oo=output;
113      oi=out;      oi=out;

Legend:
Removed from v.6.0  
changed lines
  Added in v.6.1

  ViewVC Help
Powered by ViewVC 1.1.23