+// convert function for a msglist
+void convert_msglists(int which_cdb, DBT *in_key, DBT *in_data, DBT *out_key, DBT *out_data) {
+ int i;
+
+ // msglist records are indexed by a single "long" and contains an array of zero or more "long"s
+ // and remember ... "long" is int32_t on the source system
+ int32_t in_roomnum;
+ long out_roomnum;
+ memcpy(&in_roomnum, in_key->data, sizeof(in_roomnum));
+ out_roomnum = (long) in_roomnum;
+
+ if (in_key->size != 4) {
+ printf("\033[31m\033[1m *** SOURCE DATABASE IS NOT 32-BIT *** ABORTING *** \033[0m\n");
+ abort();
+ }
+
+ int num_msgs = in_data->size / sizeof(int32_t);
+ printf("msglist for room %ld (%d messages)\n", out_roomnum, num_msgs);
+
+ int32_t in_msg = 0;
+ long out_msg = 0;
+ for (i=0; i<num_msgs; ++i) {
+ memcpy(&in_msg, (in_data->data + (i * sizeof(int32_t))), sizeof(int32_t));
+ printf("#%d\n", in_msg);
+ }
+
+
+
+}
+
+