about summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-10 05:59:19 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-10 05:59:19 +0000
commit2f76d88d7dba542d15fce687b7d05ef026ab267b (patch)
tree53a637396c32a9ffd910a43a479775d3e332152b /locale
parent2b15132f986df6e8dcc2355f6e3e618550d1922b (diff)
downloadglibc-2f76d88d7dba542d15fce687b7d05ef026ab267b.tar.gz
glibc-2f76d88d7dba542d15fce687b7d05ef026ab267b.tar.xz
glibc-2f76d88d7dba542d15fce687b7d05ef026ab267b.zip
Update.
	* posix/fnmatch_loop.c: Fix computation of alignment.

2001-08-09  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regex.c (wcs_regex_compile): Use appropriate string
	to compare with collating element.
	Fix the padding for the alignment.

2001-08-09  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* locale/programs/ld-collate.c (collate_output): Exclude
	characters from elem_table.
	Reduce if clause to write collating elements correctly.
	* posix/Makefile (tests): Add bug-regex5.
	* posix/bug-regex5.c: New file.

2001-08-09  Ulrich Drepper  <drepper@redhat.com>
Diffstat (limited to 'locale')
-rw-r--r--locale/programs/ld-collate.c51
1 files changed, 25 insertions, 26 deletions
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
index d19e3bba59..e901558bd1 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
@@ -2449,7 +2449,7 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
   runp = collate->start;
   while (runp != NULL)
     {
-      if (runp->mbs != NULL && runp->weights != NULL)
+      if (runp->mbs != NULL && runp->weights != NULL && !runp->is_character)
 	{
 	  /* Compute the hash value of the name.  */
 	  uint32_t namelen = strlen (runp->name);
@@ -2469,37 +2469,36 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
 		    idx -= elem_size;
 		}
 	      while (elem_table[idx * 2] != 0);
+	    }
+	  /* This is the spot where we will insert the value.  */
+ 	  elem_table[idx * 2] = hash;
+	  elem_table[idx * 2 + 1] = obstack_object_size (&extrapool);
 
-	      /* This is the spot where we will insert the value.  */
-	      elem_table[idx * 2] = hash;
-	      elem_table[idx * 2 + 1] = obstack_object_size (&extrapool);
-
-	      /* The the string itself including length.  */
-	      obstack_1grow (&extrapool, namelen);
-	      obstack_grow (&extrapool, runp->name, namelen);
+	  /* The the string itself including length.  */
+	  obstack_1grow (&extrapool, namelen);
+	  obstack_grow (&extrapool, runp->name, namelen);
 
-	      /* And the multibyte representation.  */
-	      obstack_1grow (&extrapool, runp->nmbs);
-	      obstack_grow (&extrapool, runp->mbs, runp->nmbs);
+	  /* And the multibyte representation.  */
+	  obstack_1grow (&extrapool, runp->nmbs);
+	  obstack_grow (&extrapool, runp->mbs, runp->nmbs);
 
-	      /* And align again to 32 bits.  */
-	      if ((1 + namelen + 1 + runp->nmbs) % sizeof (int32_t) != 0)
-		obstack_grow (&extrapool, "\0\0",
-			      (sizeof (int32_t)
-			       - ((1 + namelen + 1 + runp->nmbs)
-				  % sizeof (int32_t))));
+	  /* And align again to 32 bits.  */
+	  if ((1 + namelen + 1 + runp->nmbs) % sizeof (int32_t) != 0)
+	    obstack_grow (&extrapool, "\0\0",
+			  (sizeof (int32_t)
+			   - ((1 + namelen + 1 + runp->nmbs)
+			      % sizeof (int32_t))));
 
-	      /* Now some 32-bit values: multibyte collation sequence,
-		 wide char string (including length), and wide char
-		 collation sequence.  */
-	      obstack_int32_grow (&extrapool, runp->mbseqorder);
+	  /* Now some 32-bit values: multibyte collation sequence,
+	     wide char string (including length), and wide char
+	     collation sequence.  */
+	  obstack_int32_grow (&extrapool, runp->mbseqorder);
 
-	      obstack_int32_grow (&extrapool, runp->nwcs);
-	      obstack_grow (&extrapool, runp->wcs,
-			    runp->nwcs * sizeof (uint32_t));
+	  obstack_int32_grow (&extrapool, runp->nwcs);
+	  obstack_grow (&extrapool, runp->wcs,
+			runp->nwcs * sizeof (uint32_t));
 
-	      obstack_int32_grow (&extrapool, runp->wcseqorder);
-	    }
+	  obstack_int32_grow (&extrapool, runp->wcseqorder);
 	}
 
       runp = runp->next;