| 3 |
* change the buffer from bytes to words to read the calorimeter |
* change the buffer from bytes to words to read the calorimeter |
| 4 |
* |
* |
| 5 |
***************************************************************/ |
***************************************************************/ |
| 6 |
|
// |
| 7 |
|
// Version 1.00 (2005-02-23) |
| 8 |
|
// |
| 9 |
|
// Changelog: |
| 10 |
|
// |
| 11 |
|
// calpulse didn't work, fixed hoping wihtout troubles in the other routines |
| 12 |
|
// |
| 13 |
/* |
/* |
| 14 |
* include needed system headers |
* include needed system headers |
| 15 |
*/ |
*/ |
| 26 |
|
|
| 27 |
void fillin_(int *m, int *lunga, int *lleng, int *lung, int *pari, short int *vect, char *vecta) |
void fillin_(int *m, int *lunga, int *lleng, int *lung, int *pari, short int *vect, char *vecta) |
| 28 |
{ |
{ |
| 29 |
int i; |
int i = 1; |
| 30 |
|
int mleng; |
| 31 |
char tempv[*lung]; |
char tempv[*lung]; |
| 32 |
char tempv2[*lung]; |
char tempv2[*lung]; |
| 33 |
memcpy(&tempv, &*vecta+*m-1, *lung-*m+1); |
memcpy(&tempv, &*vecta+*m-1, *lung-*m+1); |
| 34 |
for (i = 1; i < *lung-1; i=i+2){ |
while ( i <= *lung ) { |
| 35 |
tempv2[i-1]=tempv[i]; |
if ( i < *lung+1 ) { |
| 36 |
tempv2[i]=tempv[i-1]; |
tempv2[i-1]=tempv[i]; |
| 37 |
|
tempv2[i]=tempv[i-1]; |
| 38 |
|
}; |
| 39 |
|
i = i + 2; |
| 40 |
}; |
}; |
| 41 |
|
*lleng = 0; |
| 42 |
memcpy(&*vect, &tempv2, (*lunga-*lleng)*2); |
memcpy(&*vect, &tempv2, (*lunga-*lleng)*2); |
| 43 |
} |
} |
| 44 |
|
|