# config.mk is generated by ./configure
include config.mk
-all := citserver setup ctdlmigrate sendcommand citmail chkpw chkpwd
+all := citserver setup ctdlmigrate sendcommand citmail chkpw chkpwd ctdl3264
all: $(all)
citserver: server/*.c server/modules/*/*.c config.mk server/*.h
# The `ctdl3264` utility is being kept on hold for now, as it may be resurrected someday.
# Add `ctdl3264` to the `all` target if we do that.
-#ctdl3264: utils/ctdl3264.c utils/*.h server/*.h utils/ctdl3264_structs.h
-# cc ${CFLAGS} ${LDFLAGS} utils/ctdl3264.c -lcitadel -lz -ldb -o ctdl3264
-#utils/ctdl3264_structs.h: server/server.h utils/ctdl3264_prep.sh
-# utils/ctdl3264_prep.sh
+ctdl3264: utils/ctdl3264.c utils/*.h server/*.h utils/ctdl3264_structs.h
+ cc ${CFLAGS} ${LDFLAGS} utils/ctdl3264.c -lcitadel -lz -ldb -o ctdl3264
+utils/ctdl3264_structs.h: server/server.h utils/ctdl3264_prep.sh
+ utils/ctdl3264_prep.sh
config.mk: configure
./configure
}
}
+
+void null_function(void) {
+ printf("FIXME null_function() called which means we have more work to do!\n");
+}
+
+
+void (*convert_functions[])(void) = {
+ null_function, // CDB_MSGMAIN
+ null_function, // CDB_USERS
+ null_function, // CDB_ROOMS
+ null_function, // CDB_FLOORTAB
+ null_function, // CDB_MSGLISTS
+ null_function, // CDB_VISIT
+ null_function, // CDB_DIRECTORY
+ null_function, // CDB_USETABLE
+ null_function, // CDB_BIGMSGS
+ null_function, // CDB_FULLTEXT
+ null_function, // CDB_EUIDINDEX
+ null_function, // CDB_USERSBYNUMBER
+ null_function, // CDB_EXTAUTH
+ null_function // CDB_CONFIG
+};
+
+
+void convert_table(int which_cdb) {
+ printf("Converting table %d\n", which_cdb);
+ convert_functions[which_cdb]();
+
+}
+
+
int main(int argc, char **argv) {
char ctdldir[PATH_MAX]=CTDLDIR;
}
open_databases();
+ for (int i = 0; i < MAXCDB; ++i) {
+ convert_table(i);
+ }
close_databases();
exit(0);