while (wallet_ReadFromList(schema, dummy2, itemList2, wallet_SchemaConcat_list, PR_FALSE, index4)) {
while (wallet_ReadFromList(schema, dummy2, itemList2, wallet_SchemaConcat_list, PR_FALSE, &index4)) {
PRInt32 FieldToValue(    nsAutoString field,    nsAutoString& schema,    nsAutoString& value,    nsVoidArray*& itemList,    PRInt32& index){  /* return if no SchemaToValue list exists */  if (!wallet_SchemaToValue_list) {    return -1;  }  /* if no schema name is given, fetch schema name from field/schema tables */  nsVoidArray* dummy;  if ((schema.Length() > 0) ||      wallet_ReadFromList(field, schema, dummy, wallet_specificURLFieldToSchema_list, PR_FALSE) ||      wallet_ReadFromList(field, schema, dummy, wallet_FieldToSchema_list, PR_FALSE)) {    /* schema name found, now fetch value from schema/value table */     PRInt32 index2 = index;    if ((index >= 0) &&        wallet_ReadFromList(schema, value, itemList, wallet_SchemaToValue_list, PR_TRUE, index2)) {      /* value found, prefill it into form */      index = index2;      return 0;    } else {      /* value not found, see if concatenation rule exists */      nsVoidArray * itemList2;      nsAutoString dummy2;      if (index > 0) {        index = 0;      }      PRInt32 index4 = 0;      while (wallet_ReadFromList(schema, dummy2, itemList2, wallet_SchemaConcat_list, PR_FALSE, index4)) {        /* concatenation rules exist, generate value as a concatenation */        wallet_Sublist * ptr1;        value.SetLength(0);        nsAutoString value2;        if (dummy2.Length() > 0) {          PRInt32 index5 = 0;          for (PRInt32 j=0; j>index; j -= 2) {            if (!wallet_ReadFromList               (dummy2, value2, dummy, wallet_SchemaToValue_list, PR_TRUE, index5)) {              break;            }          }          if (wallet_ReadFromList              (dummy2, value2, dummy, wallet_SchemaToValue_list, PR_TRUE, index5)) {            value += value2;          }        }        PRInt32 count = LIST_COUNT(itemList2);        for (PRInt32 i=0; i<count; i++) {          ptr1 = NS_STATIC_CAST(wallet_Sublist*, itemList2->ElementAt(i));          /* skip over values found previously */          /*   note: a returned index of -1 means not-found.  So we will use the           *   negative even numbers (-2, -4, -6) to designate found as a concatenation           *   where -2 means first value of each concatenation, -4 means second value, etc.           */          PRInt32 index3 = 0;          for (PRInt32 j=0; j>index; j -= 2) {            if (!wallet_ReadFromList               (ptr1->item, value2, dummy, wallet_SchemaToValue_list, PR_TRUE, index3)) {              break;            }          }          if (wallet_ReadFromList              (ptr1->item, value2, dummy, wallet_SchemaToValue_list, PR_TRUE, index3)) {            if (value.Length()>0) {              value.AppendWithConversion(" ");            }            value += value2;          }        }        itemList = nsnull;        if (value.Length()>0) {          index -= 2;          if (index == -(2*count)) {            index = -1;          }          return 0;        }      }    }  } else {    /* schema name not found, use field name as schema name and fetch value */    PRInt32 index2 = index;    nsAutoString temp = wallet_GetHostFile(wallet_lastUrl);    temp.AppendWithConversion(":");    temp.Append(field);    if (wallet_ReadFromList(temp, value, itemList, wallet_SchemaToValue_list, PR_TRUE, index2)) {      /* value found, prefill it into form */      schema = nsAutoString(field);      index = index2;      return 0;    }  }  index = -1;  return -1;}