]> code.citadel.org Git - citadel.git/blobdiff - webcit/addressbook_popup.c
* migrated to new hash create signature
[citadel.git] / webcit / addressbook_popup.c
index 5758ec3b0641d7e91c6e2f106b73dd7ae8828705..03a1f6277db381684a673d97d974c7ad1009ac77 100644 (file)
@@ -1,16 +1,14 @@
 /*
  * $Id$
  *
- * \defgroup AjaxAutoCompletion ajax-powered autocompletion...
- * \ingroup ClientPower
+ * AJAX-powered auto-completion
  */
 
-/*@{*/
 #include "webcit.h"
 
 
-/**
- * \brief Call this right before wDumpContent() on any page which requires the address book popup
+/*
+ * Call this right before wDumpContent() on any page which requires the address book popup
  */
 void address_book_popup(void) {
        /* Open a new div, hidden initially, for address book popups. */
@@ -23,13 +21,14 @@ void address_book_popup(void) {
        /* The 'address_book_popup' div will be closed by wDumpContent() */
 }
 
-/**
- * \brief Address book popup window
+/*
+ * Address book popup window
  */
 void display_address_book_middle_div(void) {
        char buf[256];
        long len;
-       char *Name, *Namee;
+       char *Name;
+       void *Namee;
        HashList *List;
        HashPos  *it;
 
@@ -50,7 +49,7 @@ void display_address_book_middle_div(void) {
        wprintf("</option>\n");
 
        
-       List = NewHash();
+       List = NewHash(1, NULL);
        serv_puts("LKRA");
        serv_getln(buf, sizeof buf);
        if (buf[0] == '1') while(len = serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
@@ -63,11 +62,11 @@ void display_address_book_middle_div(void) {
 
        SortByHashKey(List);
        it = GetNewHashPos();
-       while (GetNextHashPos(List, it, &len, &Name, (void**)&Namee)) {
+       while (GetNextHashPos(List, it, &len, &Name, &Namee)) {
                wprintf("<option value=\"");
-               urlescputs(Namee);
+               urlescputs((char*)Namee);
                wprintf("\">");
-               escputs(Namee);
+               escputs((char*)Namee);
                wprintf("</option>\n");
        }
        DeleteHashPos(&it);
@@ -91,8 +90,8 @@ void display_address_book_middle_div(void) {
 
 
 
-/**
- * \brief Address book popup results
+/*
+ * Address book popup results
  */
 void display_address_book_inner_div() {
        char buf[256];
@@ -100,7 +99,8 @@ void display_address_book_inner_div() {
        char target_id[64];
        char target_label[64];
        long len;
-       char *Name, *Namee;
+       char *Name;
+       void *Namee;
        HashList *List;
        HashPos  *it;
        int i;
@@ -108,7 +108,7 @@ void display_address_book_inner_div() {
 
        begin_ajax_response();
 
-       List = NewHash();
+       List = NewHash(1, NULL);
        wprintf("<div align=center><form onSubmit=\"return false;\">"
                "<select multiple name=\"whichaddr\" id=\"whichaddr\" size=\"15\">\n");
 
@@ -123,11 +123,11 @@ void display_address_book_inner_div() {
                }
                SortByHashKey(List);
                it = GetNewHashPos();
-               while (GetNextHashPos(List, it, &len, &Name, (void**)&Namee)) {
+               while (GetNextHashPos(List, it, &len, &Name, &Namee)) {
                        wprintf("<option value=\"");
-                       escputs(Namee);
+                       escputs((char*)Namee);
                        wprintf("\">");
-                       escputs(Namee);
+                       escputs((char*)Namee);
                        wprintf("</option>\n");
                }
                DeleteHashPos(&it);
@@ -149,14 +149,14 @@ void display_address_book_inner_div() {
                it = GetNewHashPos();
                while (GetNextHashPos(List, it, &len, &Name, (void**)&Namee)) {
                        wprintf("<option value=\"");
-                       escputs(Namee);
+                       escputs((char*)Namee);
                        wprintf("\">");
-                       escputs(Namee);
+                       escputs((char*)Namee);
                        wprintf("</option>\n");
                }
                DeleteHashPos(&it);
                DeleteHash(&List);
-               gotoroom(bstr(saved_roomname));
+               gotoroom((char*)BSTR(saved_roomname)); /* TODO: get rid of typecast */
        }
 
        wprintf("</select>\n");
@@ -182,6 +182,3 @@ void display_address_book_inner_div() {
 
        end_ajax_response();
 }
-
-
-/** @} */