| 1 |
kusanagi |
2.1 |
/*************************************************************** |
| 2 |
|
|
* |
| 3 |
|
|
* change the buffer from bytes to words to read the calorimeter |
| 4 |
|
|
* |
| 5 |
|
|
***************************************************************/ |
| 6 |
kusanagi |
2.4 |
// |
| 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 |
kusanagi |
2.1 |
/* |
| 14 |
|
|
* include needed system headers |
| 15 |
|
|
*/ |
| 16 |
|
|
#include <stdio.h> /* include standard i/o library */ |
| 17 |
|
|
#include <stdlib.h> /* include standard library */ |
| 18 |
|
|
#include <string.h> /* include string library */ |
| 19 |
|
|
#include <unistd.h> /* include unix standard library */ |
| 20 |
|
|
#include <sys/types.h> /* */ |
| 21 |
|
|
#include <sys/stat.h> /* */ |
| 22 |
|
|
#include <fcntl.h> /* */ |
| 23 |
|
|
#include <errno.h> /* error simbol definitions */ |
| 24 |
|
|
#include <time.h> /* system time definitions */ |
| 25 |
|
|
#include <math.h> /* math library */ |
| 26 |
|
|
|
| 27 |
|
|
void fillin_(int *m, int *lunga, int *lleng, int *lung, int *pari, short int *vect, char *vecta) |
| 28 |
|
|
{ |
| 29 |
kusanagi |
2.4 |
int i = 1; |
| 30 |
kusanagi |
2.3 |
int mleng; |
| 31 |
kusanagi |
2.1 |
char tempv[*lung]; |
| 32 |
|
|
char tempv2[*lung]; |
| 33 |
kusanagi |
2.2 |
memcpy(&tempv, &*vecta+*m-1, *lung-*m+1); |
| 34 |
kusanagi |
2.4 |
while ( i <= *lung ) { |
| 35 |
|
|
if ( i < *lung+1 ) { |
| 36 |
|
|
tempv2[i-1]=tempv[i]; |
| 37 |
|
|
tempv2[i]=tempv[i-1]; |
| 38 |
|
|
}; |
| 39 |
|
|
i = i + 2; |
| 40 |
kusanagi |
2.1 |
}; |
| 41 |
kusanagi |
2.3 |
*lleng = 0; |
| 42 |
kusanagi |
2.1 |
memcpy(&*vect, &tempv2, (*lunga-*lleng)*2); |
| 43 |
|
|
} |
| 44 |
|
|
|
| 45 |
|
|
|
| 46 |
|
|
|
| 47 |
|
|
|
| 48 |
|
|
|
| 49 |
|
|
|
| 50 |
|
|
|
| 51 |
|
|
|
| 52 |
|
|
|
| 53 |
|
|
|