Bring in new dkim code
[citadel.git] / webcit / autocompletion.c
index 4cf4ccd6f659ff139fe84df68da623d681c6282e..e936068fdc1011770111ad96d817a70a5563d64e 100644 (file)
@@ -1,7 +1,15 @@
 /*
- * $Id$
+ * dynamic html autocompletion
  *
- * ajax-powered autocompletion...
+ * Copyright (c) 1996-2012 by the citadel.org team
+ *
+ * This program is open source software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  */
 
 #include "webcit.h"
@@ -25,22 +33,22 @@ void recp_autocomplete(char *partial) {
                PACKAGE_STRING);
        begin_burst();
 
-       wprintf("<ul>");
+       wc_printf("<ul>");
 
        serv_printf("AUTO %s", partial);
        serv_getln(buf, sizeof buf);
        if (buf[0] == '1') {
                while(serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
                        extract_token(name, buf, 0, '|', sizeof name);
-                       wprintf("<li>");
+                       wc_printf("<li>");
                        escputs(name);
-                       wprintf("</li>");
+                       wc_printf("</li>");
                }
        }
 
-       wprintf("</ul>");
+       wc_printf("</ul>");
 
-       wprintf("\r\n\r\n");
+       wc_printf("\r\n\r\n");
        wDumpContent(0);
 }
 
@@ -54,7 +62,7 @@ void
 InitModule_AUTO_COMPLETE
 (void)
 {
-       WebcitAddUrlHandler(HKEY("recp_autocomplete"), _recp_autocomplete, 0);
-       WebcitAddUrlHandler(HKEY("cc_autocomplete"),   _cc_autocomplete, 0);
-       WebcitAddUrlHandler(HKEY("bcc_autocomplete"),  _bcc_autocomplete, 0);
+       WebcitAddUrlHandler(HKEY("recp_autocomplete"), "", 0, _recp_autocomplete, 0);
+       WebcitAddUrlHandler(HKEY("cc_autocomplete"),   "", 0, _cc_autocomplete, 0);
+       WebcitAddUrlHandler(HKEY("bcc_autocomplete"),  "", 0, _bcc_autocomplete, 0);
 }