elem = sym->order = new_element (collate, NULL, 0, NULL, NULL, 0);
elem = sym->order = new_element (collate, NULL, 0, NULL, NULL, 0, 0);
insert_value (struct linereader *ldfile, struct token *arg,	      struct charmap_t *charmap, struct repertoire_t *repertoire,	      struct locale_collate_t *collate){  /* First find out what kind of symbol this is.  */  struct charseq *seq;  uint32_t wc;  struct element_t *elem = NULL;  /* Try to find the character in the charmap.  */  seq = charmap_find_value (charmap, arg->val.str.startmb, arg->val.str.lenmb);  /* Determine the wide character.  */  if (seq == NULL || seq->ucs4 == UNINITIALIZED_CHAR_VALUE)    {      wc = repertoire_find_value (repertoire, arg->val.str.startmb,				  arg->val.str.lenmb);      if (seq != NULL)	seq->ucs4 = wc;    }  else    wc = seq->ucs4;  if (wc == ILLEGAL_CHAR_VALUE && seq == NULL)    {      /* It's no character, so look through the collation elements and	 symbol list.  */      void *result;      if (find_entry (&collate->sym_table, arg->val.str.startmb,		      arg->val.str.lenmb, &result) == 0)	{	  /* It's a collation symbol.  */	  struct symbol_t *sym = (struct symbol_t *) result;	  elem = sym->order;	  if (elem == NULL)	    elem = sym->order = new_element (collate, NULL, 0, NULL, NULL, 0);	}      else if (find_entry (&collate->elem_table, arg->val.str.startmb,			   arg->val.str.lenmb, (void **) &elem) != 0)	{	  /* It's also no collation element.  Therefore ignore it.  */	  lr_ignore_rest (ldfile, 0);	  return 1;	}    }  else    {      /* Otherwise the symbols stands for a character.  */      if (find_entry (&collate->seq_table, arg->val.str.startmb,		      arg->val.str.lenmb, (void **) &elem) != 0)	{	  uint32_t wcs[2] = { wc, 0 };	  /* We have to allocate an entry.  */	  elem = new_element (collate, seq != NULL ? seq->bytes : NULL,			      seq != NULL ? seq->nbytes : 0,			      wcs, arg->val.str.startmb, arg->val.str.lenmb);	  /* And add it to the table.  */	  if (insert_entry (&collate->seq_table, arg->val.str.startmb,			    arg->val.str.lenmb, elem) != 0)	    /* This cannot happen.  */	    assert (! "Internal error");	}      else	{	  /* Maybe the character was used before the definition.  In this case	     we have to insert the byte sequences now.  */	  if (elem->mbs == NULL && seq != NULL)	    {	      elem->mbs = obstack_copy0 (&collate->mempool,					 seq->bytes, seq->nbytes);	      elem->nmbs = seq->nbytes;	    }	  if (elem->wcs == NULL && wc != ILLEGAL_CHAR_VALUE)	    {	      uint32_t wcs[2] = { wc, 0 };	      elem->wcs = obstack_copy (&collate->mempool, wcs, sizeof (wcs));	      elem->nwcs = 1;	    }	}    }  /* Test whether this element is not already in the list.  */  if (elem->next != NULL || (collate->cursor != NULL			     && elem->next == collate->cursor))    {      lr_error (ldfile, _("order for `%.*s' already defined at %s:%zu"),		(int) arg->val.str.lenmb, arg->val.str.startmb,		elem->file, elem->line);      lr_ignore_rest (ldfile, 0);      return 1;    }  insert_weights (ldfile, elem, charmap, repertoire, collate, tok_none);  return 0;}