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

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

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

revision 2.2 by kusanagi, Fri Dec 3 22:08:10 2004 UTC revision 4.0 by kusanagi, Sun Mar 6 04:33:02 2005 UTC
# Line 3  Line 3 
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   */   */
# Line 19  Line 26 
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    

Legend:
Removed from v.2.2  
changed lines
  Added in v.4.0

  ViewVC Help
Powered by ViewVC 1.1.23