summary refs log tree commit diff
path: root/locale/programs/linereader.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-07 02:38:44 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-07 02:38:44 +0000
commita0dc52061fd8d47c37bbd363533ae0a4307e507c (patch)
tree7b44e3c280a8c39bc7f4c13b426eee8a40dda66d /locale/programs/linereader.c
parent372f94ba46f2b64aa2d99085112816789db3fe41 (diff)
downloadglibc-a0dc52061fd8d47c37bbd363533ae0a4307e507c.tar.gz
glibc-a0dc52061fd8d47c37bbd363533ae0a4307e507c.tar.xz
glibc-a0dc52061fd8d47c37bbd363533ae0a4307e507c.zip
Update.
2000-04-06  Ulrich Drepper  <drepper@redhat.com>

	* locale/programs/charmap.c (charmap_new_char): Add parameter step.
	Support ..(2).. ellipsis.
	(parse_charmap): Recognize ..(2).. etc and pass step down.
	Correctly generate names for UCS4 characters.

	* locale/programs/ld-ctype.c (struct translit_ignore_t): Add step.
	(ctype_finish): We know the wide character value for <SP>,
	don't search.
	(charclass_symbolic_ellipsis): Handle ..(2).. ellipsis.
	(charclass_ucs4_ellipsis): Likewise.
	(read_translit_ignore_entry): Store ellipsis step.
	(ctype_read): Recognize ..(2).. etc and pass step down.

	* locale/programs/linereader.c (lr_token): When seeing comment
	character ignore only rest of line in sources but stop at escaped
	newline.
	Recognize ..(2).. and ....(2).....

	* locale/programs/locfile-token.h (enum token_t): Add tok_ellipsis2_2
	and tok_ellipsis4_2.
Diffstat (limited to 'locale/programs/linereader.c')
-rw-r--r--locale/programs/linereader.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
index f6532a4792..36dd0cd2d0 100644
--- a/locale/programs/linereader.c
+++ b/locale/programs/linereader.c
@@ -185,6 +185,16 @@ lr_token (struct linereader *lr, const struct charmap_t *charmap,
       if (ch != lr->comment_char)
 	break;
 
+      /* Is there an newline at the end of the buffer?  */
+      if (lr->buf[lr->bufact - 1] != '\n')
+	{
+	  /* No.  Some people want this to mean that only the line in
+	     the file not the logical, concatenated line is ignored.
+	     Let's try this.  */
+	  lr->idx = lr->bufact;
+	  continue;
+	}
+
       /* Ignore rest of line.  */
       lr_ignore_rest (lr, 0);
       lr->token.tok = tok_eol;
@@ -198,6 +208,14 @@ lr_token (struct linereader *lr, const struct charmap_t *charmap,
   /* Match ellipsis.  */
   if (ch == '.')
     {
+      if (strncmp (&lr->buf[lr->idx], "...(2)....", 10) == 0)
+	{
+	  int cnt;
+	  for (cnt = 0; cnt < 10; ++cnt)
+	    lr_getc (lr);
+	  lr->token.tok = tok_ellipsis4_2;
+	  return &lr->token;
+	}
       if (strncmp (&lr->buf[lr->idx], "...", 3) == 0)
 	{
 	  lr_getc (lr);
@@ -213,6 +231,14 @@ lr_token (struct linereader *lr, const struct charmap_t *charmap,
 	  lr->token.tok = tok_ellipsis3;
 	  return &lr->token;
 	}
+      if (strncmp (&lr->buf[lr->idx], ".(2)..", 6) == 0)
+	{
+	  int cnt;
+	  for (cnt = 0; cnt < 6; ++cnt)
+	    lr_getc (lr);
+	  lr->token.tok = tok_ellipsis2_2;
+	  return &lr->token;
+	}
       if (lr->buf[lr->idx] == '.')
 	{
 	  lr_getc (lr);