#include <limits.h>
#include "citadel.h"
#include "server.h"
-#include "sysdep_decls.h"
#include "citserver.h"
#include "support.h"
#include "config.h"
-#include "serv_extensions.h"
#include "database.h"
#include "msgbase.h"
#include "tools.h"
#include "control.h"
#include "euidindex.h"
+
+#include "ctdl_module.h"
+
+
+
+
#define END_OF_MESSAGE "---eom---dbd---"
char artv_tempfilename1[PATH_MAX];
char abuf[SIZ];
char s_version[SIZ];
int version;
+ long iterations;
unbuffer_output();
cprintf("%d sock it to me\n", SEND_LISTING);
abuf[0] = '\0';
unbuffer_output();
+ iterations = 0;
while (client_getln(buf, sizeof buf), strcmp(buf, "000")) {
lprintf(CTDL_DEBUG, "import keyword: <%s>\n", buf);
if ((abuf[0] == '\0') || (strcasecmp(buf, abuf))) {
cprintf ("\n\nImporting datatype %s\n", buf);
- strncpy (abuf, buf, SIZ);
+ strncpy (abuf, buf, SIZ);
+ iterations = 0;
}
- else {
+ else {
cprintf(".");
+ if (iterations % 64 == 0)
+ cprintf("\n");
}
else if (!strcasecmp(buf, "visit")) artv_import_visit();
else if (!strcasecmp(buf, "message")) artv_import_message();
else break;
-
+ iterations ++;
}
lprintf(CTDL_INFO, "Invalid keyword <%s>. Flushing input.\n", buf);
while (client_getln(buf, sizeof buf), strcmp(buf, "000")) ;;
- cprintf("done.\n");
rebuild_euid_index();
}
-char *serv_vandelay_init(void)
+CTDL_MODULE_INIT(vandelay)
{
CtdlRegisterProtoHook(cmd_artv, "ARTV", "import/export data store");
+
+ /* return our Subversion id for the Log */
return "$Id$";
}