Changeset 86 for trunk/src/get_conf.c
- Timestamp:
- 11/21/08 11:27:21 (14 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/get_conf.c
r84 r86 434 434 unsigned short counter = 0; 435 435 unsigned short n0; 436 #if defined(MULTISAMPLING) 437 unsigned short n1; 438 #endif 436 439 unsigned short buffer; 437 440 int i = 0; 438 char ASStrTab[MAX_AS][ 7];441 char ASStrTab[MAX_AS][256]; 439 442 440 443 if (!(asFile = fopen(filename, "r"))) { … … 446 449 ASTabPtr[i].sampling = 0; 447 450 } 448 while (fgets(line, 7, asFile) != 0)451 while (fgets(line, 256, asFile) != 0) 449 452 { 450 453 strcpy(ASStrTab[counter], line); … … 457 460 } 458 461 } 459 qsort(ASStrTab, counter, 7, compASStr);462 qsort(ASStrTab, counter, 256, compASStr); 460 463 for(i=0;i<counter;i++) 461 464 { 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 462 474 sscanf(ASStrTab[i],"%hu\n", 463 475 &n0); … … 465 477 ASTabPtr[i].as = *((unsigned short*)&buffer); 466 478 ASTabPtr[i].sampling = 0; 479 #endif 467 480 } 468 481 if( fclose(asFile) == 0) {