Changeset 86 for trunk/src/get_conf.c

Show
Ignore:
Timestamp:
11/21/08 11:27:21 (14 years ago)
Author:
andreu
Message:

ticket #23

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/get_conf.c

    r84 r86  
    434434  unsigned short counter = 0; 
    435435  unsigned short n0; 
     436#if defined(MULTISAMPLING) 
     437  unsigned short n1; 
     438#endif 
    436439  unsigned short buffer; 
    437440  int i = 0; 
    438   char ASStrTab[MAX_AS][7]; 
     441  char ASStrTab[MAX_AS][256]; 
    439442 
    440443  if (!(asFile = fopen(filename, "r"))) { 
     
    446449    ASTabPtr[i].sampling = 0; 
    447450  } 
    448   while (fgets(line, 7, asFile) != 0) 
     451  while (fgets(line, 256, asFile) != 0) 
    449452    { 
    450453      strcpy(ASStrTab[counter], line); 
     
    457460      } 
    458461    } 
    459   qsort(ASStrTab, counter, 7, compASStr); 
     462  qsort(ASStrTab, counter, 256, compASStr); 
    460463  for(i=0;i<counter;i++) 
    461464    { 
     465#if defined(MULTISAMPLING) 
     466      sscanf(ASStrTab[i],"%hu %hu\n", 
     467             &n0, 
     468             &n1); 
     469      buffer = (unsigned short)n0; 
     470      ASTabPtr[i].as = *((unsigned short*)&buffer); 
     471      buffer = (unsigned short)n1; 
     472      ASTabPtr[i].sampling = *((unsigned short*)&buffer); 
     473#else 
    462474      sscanf(ASStrTab[i],"%hu\n", 
    463475             &n0); 
     
    465477      ASTabPtr[i].as = *((unsigned short*)&buffer); 
    466478      ASTabPtr[i].sampling = 0; 
     479#endif 
    467480    } 
    468481  if( fclose(asFile) == 0) {