Little fix for IO

This commit is contained in:
Guilhem Lavaux 2022-02-03 08:53:27 +01:00
parent aa2a1dedd8
commit 25f6d6bd2a
2 changed files with 2 additions and 1 deletions

View file

@ -11,7 +11,7 @@
#include "defaults.h" #include "defaults.h"
/* getopt options */ /* getopt options */
const char *optstr = "dqu:p:P:W0"; const char *optstr = "dqu:p:P:W0i:";
/* allocate polygons as a global array */ /* allocate polygons as a global array */
polygon *poly_global[NPOLYSMAX]; polygon *poly_global[NPOLYSMAX];

View file

@ -167,6 +167,7 @@ int wr_bin_poly(char *filename, format *fmt, int npolys, polygon *polys[/*npolys
fwrite(polys[ipoly]->rp, sizeof(vec), ph.np, file); fwrite(polys[ipoly]->rp, sizeof(vec), ph.np, file);
fwrite(polys[ipoly]->cm, sizeof(long double), ph.np, file); fwrite(polys[ipoly]->cm, sizeof(long double), ph.np, file);
} }
npoly = npolys;
/* warn about polygons with incorrect area */ /* warn about polygons with incorrect area */
if (nbadarea > 0) { if (nbadarea > 0) {