fermisurfer Git
Revision | bd6acb96d2a4d9086b9a42ec2f6dce39db527f01 (tree) |
---|---|
Time | 2022-08-02 18:34:17 |
Author | Mitsuaki Kawamura <kawamitsuaki@gmai...> |
Commiter | Mitsuaki Kawamura |
BXSF file was not read correctly when there is lank line.
@@ -9,7 +9,7 @@ | ||
9 | 9 | END_INFO |
10 | 10 | BEGIN_BLOCK_BANDGRID_3D |
11 | 11 | band_energies |
12 | - BANDGRID_3D_BANDS | |
12 | + BEGIN_BANDGRID_3D | |
13 | 13 | 3 |
14 | 14 | 17 17 17 |
15 | 15 | 0.000000 0.000000 0.000000 |
@@ -433,9 +433,9 @@ void read_bxsf() | ||
433 | 433 | while (strstr(ctmp, "BEGIN_BLOCK_BANDGRID_3D") == NULL) { |
434 | 434 | cerr = fgets(ctmp, 256, fp); |
435 | 435 | } |
436 | - cerr = fgets(ctmp, 256, fp); | |
437 | - cerr = fgets(ctmp, 256, fp); | |
438 | - | |
436 | + while (strstr(ctmp, "BEGIN_BANDGRID_3D") == NULL) { | |
437 | + cerr = fgets(ctmp, 256, fp); | |
438 | + } | |
439 | 439 | cerr = fgets(ctmp, 256, fp); |
440 | 440 | ierr = sscanf(ctmp, "%d", &nb); |
441 | 441 | *terminal << wxString::Format(wxT(" Number of bands : %d\n"), nb); |
@@ -456,6 +456,9 @@ void read_bxsf() | ||
456 | 456 | |
457 | 457 | for (ib = 0; ib < nb; ib++) { |
458 | 458 | cerr = fgets(ctmp, 256, fp); |
459 | + while (strstr(ctmp, "BAND:") == NULL) { | |
460 | + cerr = fgets(ctmp, 256, fp); | |
461 | + } | |
459 | 462 | *terminal << wxString::Format(wxT(" Reading %s"), ctmp); |
460 | 463 | |
461 | 464 | for (i0 = 0; i0 <= ng0[0]; i0++) { |