]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_vandelay.c
mk_module_init.sh now tests to see if echo supports -e and -E
[citadel.git] / citadel / serv_vandelay.c
index a2f3ac3c2e72cdce3decc074d149b4d2d934e252..b1c3630c0cdf9a3facc2a41d4c6db96e536e01ea 100644 (file)
 #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];
@@ -649,21 +653,26 @@ void artv_do_import(void) {
        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");
                        
                }
                
@@ -683,11 +692,10 @@ void artv_do_import(void) {
                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();
 }
 
@@ -722,8 +730,10 @@ void cmd_artv(char *cmdbuf) {
 
 
 
-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$";
 }