/[PAMELA software]/yoda/techmodel/forroutines/calorimeter/fillin.c
ViewVC logotype

Annotation of /yoda/techmodel/forroutines/calorimeter/fillin.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2.3 - (hide annotations) (download)
Fri Dec 17 12:46:21 2004 UTC (20 years, 1 month ago) by kusanagi
Branch: MAIN
Changes since 2.2: +3 -1 lines
File MIME type: text/plain
*** empty log message ***

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

  ViewVC Help
Powered by ViewVC 1.1.23