From dba2b9d10454c05283ca5d102eeaf88fb84cc604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Wed, 19 Sep 2018 22:02:20 +0300 Subject: [PATCH] Fix hexlattice ewald kin option Former-commit-id: 306c547053b53c594029142095ff3649380e7ab0 --- qpms/apps/hexlattice_ewald.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qpms/apps/hexlattice_ewald.c b/qpms/apps/hexlattice_ewald.c index 6b5a7a8..f60f70f 100644 --- a/qpms/apps/hexlattice_ewald.c +++ b/qpms/apps/hexlattice_ewald.c @@ -3,6 +3,7 @@ // c99 -o ew -Wall -I ../.. -O2 -ggdb -DLATTICESUMS32 hexlattice_ewald.c ../translations.c ../ewald.c ../ewaldsf.c ../gaunt.c ../lattices2d.c -lgsl -lm -lblas #include #include +#include #include #include #include @@ -68,7 +69,7 @@ int main (int argc, char **argv) { size_t kcount = 0; size_t klist_capacity = MAXKCOUNT; cart2_t *klist = malloc(sizeof(cart2_t) * klist_capacity); - while (fscanf(f, "%lf %lf", &(klist[kcount].x), &(klist[kcount].y)) == 2) { + while (scanf("%lf %lf", &(klist[kcount].x), &(klist[kcount].y)) == 2) { ++kcount; if(kcount >= klist_capacity) { klist_capacity *= 2; @@ -204,7 +205,7 @@ int main (int argc, char **argv) { if(err) fclose(err); #ifdef KSTDIN - free(klist) + free(klist); #endif triangular_lattice_gen_free(Klg);