(const char * filename, nsVoidArray*& list, PlacementType placement = DUP_AFTER) {
(const char * filename, nsVoidArray*& list, PlacementType placement = AT_END) {
wallet_ReadFromURLFieldToSchemaFile    (const char * filename, nsVoidArray*& list, PlacementType placement = DUP_AFTER) {  /* open input stream */  nsFileSpec dirSpec;  nsresult rv;  rv = Wallet_ProfileDirectory(dirSpec);  if (NS_FAILED(rv)) {    return;  }  nsInputFileStream strm(dirSpec + filename);  if (!strm.is_open()) {    /* if we failed to download the file, see if an initial version of it exists */    rv = Wallet_DefaultsDirectory(dirSpec);    if (NS_FAILED(rv)) {      return;    }    nsInputFileStream strm2(dirSpec + filename);    strm = strm2;    if (!strm.is_open()) {      /* still not open so give up */      return;    }  }  /* make sure the list exists */  if(!list) {    list = new nsVoidArray();    if(!list) {      strm.close();      return;    }  }  for (;;) {    nsAutoString item;    if (NS_FAILED(wallet_GetLine(strm, item))) {      /* end of file reached */      break;    }    nsVoidArray * itemList = new nsVoidArray();    if (!itemList) {      break;    }    nsAutoString dummyString;    wallet_WriteToList(item, dummyString, itemList, list, PR_FALSE, placement);    for (;;) {      nsAutoString item1;      if (NS_FAILED(wallet_GetLine(strm, item1))) {        /* end of file reached */        break;      }      if (item1.Length()==0) {        /* end of url reached */        break;      }      nsAutoString item2;      if (NS_FAILED(wallet_GetLine(strm, item2))) {        /* unexpected end of file reached */        break;      }      nsVoidArray* dummyList = NULL;      wallet_WriteToList(item1, item2, dummyList, itemList, PR_FALSE, placement);      nsAutoString item3;      if (NS_FAILED(wallet_GetLine(strm, item3))) {        /* end of file reached */        strm.close();        return;      }      if (item3.Length()!=0) {        /* invalid file format */        break;      }    }  }  strm.close();}