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+(2*(*l_buffer))-1>*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 */ |
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; |