fprintf(stderr,"SQL %s R",ssh_string);
for (i=0; i<sqlite3_column_count(ssh); i++) {
fputc('\t',stderr);
- fputs((char*)sqlite3_column_text(ssh,i),stderr);
+ const char *txt= (const char*)sqlite3_column_text(ssh,i);
+ fputs(txt ? txt : "<null>", stderr);
}
fputs("\n",stderr);
}
static void add_leg_c(int startrow, int leg, double value) {
if (startrow<=0) return;
+ assert(value > 0);
add_constraint(startrow+leg, value);
}
if (islands[already_d] == di)
/* visited this island already since we left s, uninteresting */
goto next_d;
+
if (d>s && di==si)
/* route has returned to si, no need to think more about s */
goto next_s;
IslandPair *ip= ipair_get(islands[s], islands[d]);
TradesBlock *block= ip->trades;
int tradestodo= ip->ntrades;
+ if (!tradestodo)
+ goto next_d;
+
int inblock= 0;
int col= lpx_add_cols(lp,ip->ntrades);