]> code.citadel.org Git - citadel.git/blobdiff - webcit/addressbook_popup.c
* correct all GetNextHashPos() calls to have const chars
[citadel.git] / webcit / addressbook_popup.c
index f3445cfef3c72a9ca57650d586c6d45c2b9d000d..5609c68aef980557dbe7d5c25523a6d9d4aa90ff 100644 (file)
@@ -28,6 +28,7 @@ void display_address_book_middle_div(void) {
        char buf[256];
        long len;
        char *Name;
+       const char *VCName;
        void *Namee;
        StrBuf *DefAddrBook;
        HashList *List;
@@ -49,7 +50,7 @@ void display_address_book_middle_div(void) {
 
        wprintf("<option value=\"__LOCAL_USERS__\" %s>", 
                (strcmp(ChrPtr(DefAddrBook), "__LOCAL_USERS__") == 0)?
-               "active=\"yes\" ":"");
+               "selected=\"selected\" ":"");
        escputs(serv_info.serv_humannode);
        wprintf("</option>\n");
 
@@ -67,11 +68,11 @@ void display_address_book_middle_div(void) {
 
        SortByHashKey(List, 1);
        it = GetNewHashPos();
-       while (GetNextHashPos(List, it, &len, &Name, &Namee)) {
+       while (GetNextHashPos(List, it, &len, &VCName, &Namee)) {
                wprintf("<option value=\"");
                urlescputs((char*)Namee);
                if (strcmp(ChrPtr(DefAddrBook), Namee) == 0)
-                       wprintf("\" active=\"yes\" >");
+                       wprintf("\" selected=\"selected\" >");
                else
                        wprintf("\">");
                escputs((char*)Namee);
@@ -108,6 +109,7 @@ void display_address_book_inner_div() {
        char target_label[64];
        long len;
        char *Name;
+       const char *VCName;
        void *Namee;
        HashList *List;
        HashPos  *it;
@@ -135,7 +137,7 @@ void display_address_book_inner_div() {
                }
                SortByHashKey(List, 1);
                it = GetNewHashPos();
-               while (GetNextHashPos(List, it, &len, &Name, &Namee)) {
+               while (GetNextHashPos(List, it, &len, &VCName, &Namee)) {
                        wprintf("<option value=\"");
                        escputs((char*)Namee);
                        wprintf("\">");
@@ -160,7 +162,7 @@ void display_address_book_inner_div() {
                }
                SortByHashKey(List, 1);
                it = GetNewHashPos();
-               while (GetNextHashPos(List, it, &len, &Name, (void**)&Namee)) {
+               while (GetNextHashPos(List, it, &len, &VCName, (void**)&Namee)) {
                        wprintf("<option value=\"");
                        escputs((char*)Namee);
                        wprintf("\">");