diff --git a/src/bpt/makeBpt.c b/src/bpt/makeBpt.c index 52b30c7a1..61406c7ca 100644 --- a/src/bpt/makeBpt.c +++ b/src/bpt/makeBpt.c @@ -34,9 +34,11 @@ #include #include #include -#include -#include -#include +#include + +#include "dbBase.h" +#include "ellLib.h" +#include "cvtTable.h" #define MAX_LINE_SIZE 160 #define MAX_BREAKS 100 @@ -91,7 +93,7 @@ int main(argc, argv) char *pbeg; char *pend; float value; - char *pname; + char *pname = NULL; dataList *phead; dataList *pdataList; dataList *pnext; @@ -184,6 +186,9 @@ got_header: pnext = pdataList; } } + if(!pname) { + errExit("create_break failed: no name specified\n"); + } brkCreateInfo.nTable = ndata; pdata = (float *)calloc(brkCreateInfo.nTable,sizeof(float)); pnext = phead; @@ -330,6 +335,8 @@ static int create_break( struct brkCreateInfo *pbci, brkInt *pabrkInt, /* determine next breakpoint interval */ while ((engBeg <= pbci->engHigh) && (ibeg < ntable - 1)) { /* determine next interval to try. Up to 1/10 full range */ + rawEnd = rawBeg; + engEnd = engBeg; iend = ibeg; inc = (int) ((ihigh - ilow) / 10.0); if (inc < 1)