wallet_Sublist * ptr1; PRInt32 count2 = LIST_COUNT(ptr->itemList);
wallet_Sublist * sublistPtr; PRInt32 count2 = LIST_COUNT(mapElementPtr->itemList);
wallet_WriteToFile(const char * filename, nsVoidArray* list) {  wallet_MapElement * ptr;  /* open output stream */  nsFileSpec dirSpec;  nsresult rv = Wallet_ProfileDirectory(dirSpec);  if (NS_FAILED(rv)) {    return;  }  nsOutputFileStream strm(dirSpec + filename);  if (!strm.is_open()) {    NS_ERROR("unable to open file");    return;  }  /* make sure the list exists */  if(!list) {    return;  }  /* put out the header */  if (filename == schemaValueFileName) {    wallet_PutHeader(strm);  }  /* traverse the list */  PRInt32 count = LIST_COUNT(list);  for (PRInt32 i=0; i<count; i++) {    ptr = NS_STATIC_CAST(wallet_MapElement*, list->ElementAt(i));    wallet_PutLine(strm, (*ptr).item1);    if (!(*ptr).item2.IsEmpty()) {      wallet_PutLine(strm, (*ptr).item2);    } else {      wallet_Sublist * ptr1;      PRInt32 count2 = LIST_COUNT(ptr->itemList);      for (PRInt32 j=0; j<count2; j++) {        ptr1 = NS_STATIC_CAST(wallet_Sublist*, ptr->itemList->ElementAt(j));        wallet_PutLine(strm, (*ptr1).item);      }    }    wallet_PutLine(strm, nsAutoString());  }  /* close the stream */  strm.flush();  strm.close();}