DF(sql)
+#define SQL_MUST( call ) ({ \
+ /* `call' is an expression returning result, using const char *sqe; \
+ * chk1 and chk2 are blocks using sqe and int sqr; */ \
+ const char *sql_must_call_string= #call; \
+ int sqr; \
+ if (DEBUGP(sql)) fprintf(stderr,"SQL %s", sql_must_call_string); \
+ sqr= (call); \
+ if (DEBUGP(sql)) fprintf(stderr," = %d\n", sqr); \
+ if (sqr) fatal("SQL call failed code %d: %s: %s", \
+ sqr, sqlite3_errmsg(db), sql_must_call_string); \
+ })
+
+#define SQL_STEP(ssh) (sql_step_wrap((ssh), #ssh, __FILE__, __LINE__))
+int sql_step_wrap(sqlite3_stmt *ssh, const char *ssh_string,
+ const char *file, int line);
+
#include "common.h"
-extern struct sqlite *db;
+extern sqlite3 *db;
+extern sqlite3_stmt *ss_ipair;
+void setup(void);
void value_route(int nislands, const int *islands);
+void setup_value(void);
#endif /*RSCOMMON_H*/