--- ray/src/util/pictool.c 2015/08/12 23:07:59 2.1 +++ ray/src/util/pictool.c 2019/07/19 17:37:56 2.6 @@ -1,7 +1,10 @@ +#ifndef lint +static const char RCSid[] = "$Id: pictool.c,v 2.6 2019/07/19 17:37:56 greg Exp $"; +#endif #include "pictool.h" #include "g3sphere.h" #include -#include +#include "rtio.h" #define index strchr @@ -84,6 +87,9 @@ void pict_free(pict* p) } static int exp_headline(char* s,void* exparg) { double* exposure; + if(strstr(s, EXPOSSTR) != NULL ) { + fprintf(stderr,"EXP AND tab\n"); + } exposure = (double*) exparg; if (isexpos(s)) { @@ -210,6 +216,15 @@ gethinfo( /* get view from header */ void *v ) { + if(strstr(s, EXPOSSTR) != NULL && strstr(s, "\t") != NULL) { + + fprintf(stderr,"error: header contains invalid exposure entry!!!!\n"); + fprintf(stderr,"check exposure and correct header setting !\n"); + + + fprintf(stderr,"stopping !!!!\n"); + exit(1); + } if (isview(s) && sscanview(((struct hinfo*)v)->hv, s) > 0) { ((struct hinfo*)v)->ok++; } else if (isexpos(s)) { @@ -674,8 +689,7 @@ int pict_locate(pict* p,FVECT pt,int* x,int* y) return 0; } - viewloc(pp,&(p->view),pt); - if (pp[2] < 0) + if (viewloc(pp,&(p->view),pt) <= 0) return 0; loc2pix(res,&(p->resol),pp[0],pp[1]); *x = res[0];