wallet_MapElement * ptr; PRInt32 count = LIST_COUNT(wallet_URLFieldToSchema_list); for (PRInt32 i=0; i<count; i++) { ptr = NS_STATIC_CAST(wallet_MapElement*, wallet_URLFieldToSchema_list->ElementAt(i)); if (ptr->item1 == urlName) { wallet_specificURLFieldToSchema_list = ptr->itemList; break; } } #ifdef DEBUG   #endif
wallet_InitializeCurrentURL(nsIDocument * doc) {  /* get url */  nsIURI* url;  url = doc->GetDocumentURL();  if (wallet_lastUrl == url) {    NS_RELEASE(url);    return;  } else {    if (wallet_lastUrl) {//??      NS_RELEASE(lastUrl);    }    wallet_lastUrl = url;  }  /* get host+file */  nsAutoString urlName;  wallet_GetHostFile(url, urlName);  NS_RELEASE(url);  if (urlName.Length() == 0) {    return;  }  /* get field/schema mapping specific to current url */  wallet_MapElement * ptr;  PRInt32 count = LIST_COUNT(wallet_URLFieldToSchema_list);  for (PRInt32 i=0; i<count; i++) {    ptr = NS_STATIC_CAST(wallet_MapElement*, wallet_URLFieldToSchema_list->ElementAt(i));    if (ptr->item1 == urlName) {      wallet_specificURLFieldToSchema_list = ptr->itemList;      break;    }  }#ifdef DEBUG//  fprintf(stdout,"specific URL Field to Schema table \n");//  wallet_Dump(wallet_specificURLFieldToSchema_list);#endif}