lr_error (ldfile, _("conversion rate valze cannot be zero"));
lr_error (ldfile, _("conversion rate value cannot be zero"));
monetary_read (struct linereader *ldfile, struct localedef_t *result,	       struct charmap_t *charmap, const char *repertoire_name,	       int ignore_content){  struct repertoire_t *repertoire = NULL;  struct locale_monetary_t *monetary;  struct token *now;  enum token_t nowtok;  /* Get the repertoire we have to use.  */  if (repertoire_name != NULL)    repertoire = repertoire_read (repertoire_name);  /* The rest of the line containing `LC_MONETARY' must be free.  */  lr_ignore_rest (ldfile, 1);  do    {      now = lr_token (ldfile, charmap, NULL);      nowtok = now->tok;    }  while (nowtok == tok_eol);  /* If we see `copy' now we are almost done.  */  if (nowtok == tok_copy)    {      handle_copy (ldfile, charmap, repertoire_name, result, tok_lc_monetary,		   LC_MONETARY, "LC_MONETARY", ignore_content);      return;    }  /* Prepare the data structures.  */  monetary_startup (ldfile, result, ignore_content);  monetary = result->categories[LC_MONETARY].monetary;  while (1)    {      /* Of course we don't proceed beyond the end of file.  */      if (nowtok == tok_eof)	break;      /* Ignore empty lines.  */      if (nowtok == tok_eol)	{	  now = lr_token (ldfile, charmap, NULL);	  nowtok = now->tok;	  continue;	}      switch (nowtok)	{#define STR_ELEM(cat) \	case tok_##cat:							      \	  /* Ignore the rest of the line if we don't need the input of	      \	     this line.  */						      \	  if (ignore_content)						      \	    {								      \	      lr_ignore_rest (ldfile, 0);				      \	      break;							      \	    }								      \									      \	  now = lr_token (ldfile, charmap, NULL);			      \	  if (now->tok != tok_string)					      \	    goto err_label;						      \	  else if (monetary->cat != NULL)				      \	    lr_error (ldfile, _("%s: field `%s' declared more than once"),    \		      "LC_MONETARY", #cat);				      \	  else if (!ignore_content && now->val.str.startmb == NULL)	      \	    {								      \	      lr_error (ldfile, _("\%s: unknown character in field `%s'"), "LC_MONETARY", #cat);		      \	      monetary->cat = "";					      \	    }								      \	  else if (!ignore_content)					      \	    monetary->cat = now->val.str.startmb;			      \	  lr_ignore_rest (ldfile, 1);					      \	  break	  STR_ELEM (int_curr_symbol);	  STR_ELEM (currency_symbol);	  STR_ELEM (positive_sign);	  STR_ELEM (negative_sign);	  STR_ELEM (duo_int_curr_symbol);	  STR_ELEM (duo_currency_symbol);#define STR_ELEM_WC(cat) \	case tok_##cat:							      \	  /* Ignore the rest of the line if we don't need the input of	      \	     this line.  */						      \	  if (ignore_content)						      \	    {								      \	      lr_ignore_rest (ldfile, 0);				      \	      break;							      \	    }								      \									      \	  ldfile->return_widestr = 1;					      \	  now = lr_token (ldfile, charmap, repertoire);			      \	  if (now->tok != tok_string)					      \	    goto err_label;						      \	  if (monetary->cat != NULL)					      \	    lr_error (ldfile, _("\%s: field `%s' declared more than once"), "LC_MONETARY", #cat);		      \	  else if (!ignore_content && now->val.str.startmb == NULL)	      \	    {								      \	      lr_error (ldfile, _("\%s: unknown character in field `%s'"), "LC_MONETARY", #cat);		      \	      monetary->cat = "";					      \	      monetary->cat##_wc = L'\0';				      \	    }								      \	  else if (now->val.str.startwc != NULL && now->val.str.lenwc > 2)    \	    {								      \	      lr_error (ldfile, _("\%s: value for field `%s' must be a single character"), "LC_MONETARY", #cat);  \	    }								      \	  else if (!ignore_content)					      \	    {								      \	      monetary->cat = now->val.str.startmb;			      \									      \	      if (now->val.str.startwc != NULL)				      \		monetary->cat##_wc = *now->val.str.startwc;		      \	    }								      \	  ldfile->return_widestr = 0;					      \	  break	  STR_ELEM_WC (mon_decimal_point);	  STR_ELEM_WC (mon_thousands_sep);#define INT_ELEM(cat) \	case tok_##cat:							      \	  /* Ignore the rest of the line if we don't need the input of	      \	     this line.  */						      \	  if (ignore_content)						      \	    {								      \	      lr_ignore_rest (ldfile, 0);				      \	      break;							      \	    }								      \									      \	  now = lr_token (ldfile, charmap, NULL);			      \	  if (now->tok != tok_minus1 && now->tok != tok_number)		      \	    goto err_label;						      \	  else if (monetary->cat != -2)					      \	    lr_error (ldfile, _("%s: field `%s' declared more than once"),    \		      "LC_MONETARY", #cat);				      \	  else if (!ignore_content)					      \	    monetary->cat = now->tok == tok_minus1 ? -1 : now->val.num;	      \	  break	  INT_ELEM (int_frac_digits);	  INT_ELEM (frac_digits);	  INT_ELEM (p_cs_precedes);	  INT_ELEM (p_sep_by_space);	  INT_ELEM (n_cs_precedes);	  INT_ELEM (n_sep_by_space);	  INT_ELEM (p_sign_posn);	  INT_ELEM (n_sign_posn);	  INT_ELEM (int_p_cs_precedes);	  INT_ELEM (int_p_sep_by_space);	  INT_ELEM (int_n_cs_precedes);	  INT_ELEM (int_n_sep_by_space);	  INT_ELEM (int_p_sign_posn);	  INT_ELEM (int_n_sign_posn);	  INT_ELEM (duo_int_frac_digits);	  INT_ELEM (duo_frac_digits);	  INT_ELEM (duo_p_cs_precedes);	  INT_ELEM (duo_p_sep_by_space);	  INT_ELEM (duo_n_cs_precedes);	  INT_ELEM (duo_n_sep_by_space);	  INT_ELEM (duo_p_sign_posn);	  INT_ELEM (duo_n_sign_posn);	  INT_ELEM (duo_int_p_cs_precedes);	  INT_ELEM (duo_int_p_sep_by_space);	  INT_ELEM (duo_int_n_cs_precedes);	  INT_ELEM (duo_int_n_sep_by_space);	  INT_ELEM (duo_int_p_sign_posn);	  INT_ELEM (duo_int_n_sign_posn);	  INT_ELEM (uno_valid_from);	  INT_ELEM (uno_valid_to);	  INT_ELEM (duo_valid_from);	  INT_ELEM (duo_valid_to);	case tok_mon_grouping:	  /* Ignore the rest of the line if we don't need the input of	     this line.  */	  if (ignore_content)	    {	      lr_ignore_rest (ldfile, 0);	      break;	    }	  now = lr_token (ldfile, charmap, NULL);	  if (now->tok != tok_minus1 && now->tok != tok_number)	    goto err_label;	  else	    {	      size_t act = 0;	      size_t max = 10;	      char *grouping = ignore_content ? NULL : xmalloc (max);	      do		{		  if (act + 1 >= max)		    {		      max *= 2;		      grouping = xrealloc (grouping, max);		    }		  if (act > 0 && grouping[act - 1] == '\177')		    {		      lr_error (ldfile, _("\%s: `-1' must be last entry in `%s' field"),				"LC_MONETARY", "mon_grouping");		      lr_ignore_rest (ldfile, 0);		      break;		    }		  if (now->tok == tok_minus1)		    {		      if (!ignore_content)			grouping[act++] = '\177';		    }		  else if (now->val.num == 0)		    {		      /* A value of 0 disables grouping from here on but			 we must not store a NUL character since this			 terminates the string.  Use something different			 which must not be used otherwise.  */		      if (!ignore_content)			grouping[act++] = '\377';		    }		  else if (now->val.num > 126)		    lr_error (ldfile, _("\%s: values for field `%s' must be smaller than 127"),			      "LC_MONETARY", "mon_grouping");		  else if (!ignore_content)		    grouping[act++] = now->val.num;		  /* Next must be semicolon.  */		  now = lr_token (ldfile, charmap, NULL);		  if (now->tok != tok_semicolon)		    break;		  now = lr_token (ldfile, charmap, NULL);		}	      while (now->tok == tok_minus1 || now->tok == tok_number);	      if (now->tok != tok_eol)		goto err_label;	      if (!ignore_content)		{		  grouping[act++] = '\0';		  monetary->mon_grouping = xrealloc (grouping, act);		  monetary->mon_grouping_len = act;		}	    }	  break;	case tok_conversion_rate:	  /* Ignore the rest of the line if we don't need the input of	     this line.  */	  if (ignore_content)	    {	      lr_ignore_rest (ldfile, 0);	      break;	    }	  now = lr_token (ldfile, charmap, NULL);	  if (now->tok != tok_number)	    goto err_label;	  if (now->val.num == 0)	    {	    invalid_conversion_rate:	      lr_error (ldfile, _("conversion rate valze cannot be zero"));	      if (!ignore_content)		{		  monetary->conversion_rate[0] = 1;		  monetary->conversion_rate[1] = 1;		}	      break;	    }	  if (!ignore_content)	    monetary->conversion_rate[0] = now->val.num;	  /* Next must be a semicolon.  */	  now = lr_token (ldfile, charmap, NULL);	  if (now->tok != tok_semicolon)	    goto err_label;	  /* And another number.  */	  now = lr_token (ldfile, charmap, NULL);	  if (now->tok != tok_number)	    goto err_label;	  if (now->val.num == 0)	    goto invalid_conversion_rate;	  if (!ignore_content)	    monetary->conversion_rate[1] = now->val.num;	  /* The rest of the line must be empty.  */	  lr_ignore_rest (ldfile, 1);	  break;	case tok_end:	  /* Next we assume `LC_MONETARY'.  */	  now = lr_token (ldfile, charmap, NULL);	  if (now->tok == tok_eof)	    break;	  if (now->tok == tok_eol)	    lr_error (ldfile, _("%s: incomplete `END' line"), "LC_MONETARY");	  else if (now->tok != tok_lc_monetary)	    lr_error (ldfile, _("\%1$s: definition does not end with `END %1$s'"), "LC_MONETARY");	  lr_ignore_rest (ldfile, now->tok == tok_lc_monetary);	  return;	default:	err_label:	  SYNTAX_ERROR (_("%s: syntax error"), "LC_MONETARY");	}      /* Prepare for the next round.  */      now = lr_token (ldfile, charmap, NULL);      nowtok = now->tok;    }  /* When we come here we reached the end of the file.  */  lr_error (ldfile, _("%s: premature end of file"), "LC_MONETARY");}