// export function for a visit record
void export_visit(int which_cdb, DBT *in_key, DBT *in_data) {
struct visit *visit = (struct visit *)in_data->data;
+ int i, len;
+
+ // If there is corrupt data in the "seen" array, cut that out before exporting
+ len = strlen(visit->v_seen);
+ for (i=0; i<len; ++i) {
+ if (!isprint(visit->v_seen[i])) {
+ visit->v_seen[i] = 0;
+ }
+ }
+
+ // If there is corrupt data in the "answered" array, cut that out before exporting
+ len = strlen(visit->v_answered);
+ for (i=0; i<len; ++i) {
+ if (!isprint(visit->v_answered[i])) {
+ visit->v_answered[i] = 0;
+ }
+ }
+
+ // output the record
printf("visit|%ld|%ld|%ld|%ld|%u|%s|%s|%d|\n",
visit->v_roomnum,
visit->v_roomgen,