]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Fri, 21 Jan 2000 05:18:41 +0000 (05:18 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 21 Jan 2000 05:18:41 +0000 (05:18 +0000)
* manual/getopt.texi (Using the getopt function): Fix description of
return value for format string starting with '-' (PR libc/1551).
Patch by Raúl Núñez de Arenas Coronado <dervishd@jazzfree.com>

* sunrpc/clnt_perr.c (rpc_errlist): Fix index for RPC_PROGVERSMISMATCH.
Patch by jens.moeller@westgeo.com (PR libc/1550).

* locale/programs/ld-collate.c (struct element_t): Add wclast
and compute it where necessary.
(collate_output): Insert indirect references in the right order.

ChangeLog
linuxthreads_db/ChangeLog
linuxthreads_db/td_thr_getgregs.c
locale/programs/ld-collate.c
manual/getopt.texi
sunrpc/clnt_perr.c

index 6bd4c821ec109732f2098da742783ee0b0687ef3..8f144c4bb454ebe2ee4a02a07405a7e3e168c3a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2000-01-20  Ulrich Drepper  <drepper@cygnus.com>
 
+       * manual/getopt.texi (Using the getopt function): Fix description of
+       return value for format string starting with '-' (PR libc/1551).
+       Patch by Raúl Núñez de Arenas Coronado <dervishd@jazzfree.com>
+
+       * sunrpc/clnt_perr.c (rpc_errlist): Fix index for RPC_PROGVERSMISMATCH.
+       Patch by jens.moeller@westgeo.com (PR libc/1550).
+
+       * locale/programs/ld-collate.c (struct element_t): Add wclast
+       and compute it where necessary.
+       (collate_output): Insert indirect references in the right order.
+
        * math/Makefile (tests): Add test-misc.
        * math/test-misc.c: New file.
 
index 72f8fc466e541fa1a9157f26a41604d7d485343f..3c182ea2ccf1fb2e54aad5be6d3cebac67f50c3e 100644 (file)
@@ -1,3 +1,7 @@
+2000-01-20  Andreas Jaeger  <aj@suse.de>
+
+       * td_thr_getgregs.c (td_thr_getgregs): Fix typo.
+
 2000-01-19  Ulrich Drepper  <drepper@cygnus.com>
 
        * td_thr_getgregs.c: Correct size parameter of memset call.
index c485686afde30420afd284b26a0ca8937d0e37a2..a4d861970ea23155ef76ab478cb848f0a8f8b8e8 100644 (file)
@@ -35,7 +35,7 @@ td_thr_getgregs (const td_thrhandle_t *th, prgregset_t gregs)
 
   /* If the thread already terminated we return all zeroes.  */
   if (pds.p_terminated)
-    memset (gregs, '\0', sizeof (prgrepset_t));
+    memset (gregs, '\0', sizeof (prgregset_t));
   /* Otherwise get the register content through the callback.  */
   else if (ps_lgetregs (th->th_ta_p->ph, pds.p_pid, gregs) != PS_OK)
     return TD_ERR;
index bd07f706129974138aa49200864aa1dc0af1d2e2..226bf23b4a13fa42fbd032b02952fe6f710454ed 100644 (file)
@@ -112,6 +112,7 @@ struct element_t
 
   /* Next element in wide character output list.  */
   struct element_t *wcnext;
+  struct element_t *wclast;
 };
 
 /* Special element value.  */
@@ -1669,6 +1670,7 @@ Computing table size for collation table might take a while..."),
       if (runp->wcs != NULL)
        {
          struct element_t **eptr;
+         struct element_t *lastp = NULL;
          size_t idx;
 
          /* Find a free index.  */
@@ -1712,11 +1714,15 @@ Computing table size for collation table might take a while..."),
                }
 
              /* To the next entry.  */
+             lastp = *eptr;
              eptr = &(*eptr)->wcnext;
            }
 
          /* Set the pointers.  */
          runp->wcnext = *eptr;
+         runp->wclast = lastp;
+         if (*eptr != NULL)
+           (*eptr)->wclast = runp;
          *eptr = runp;
        dont_insertwc:
        }
@@ -2286,19 +2292,18 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
            int32_t weightidx;
            int added;
 
-           /* Output the weight info.  */
-           weightidx = output_weightwc (&weightpool, collate, runp);
-
            /* Find out wether this is a single entry or we have more than
               one consecutive entry.  */
            if (runp->wcnext != NULL
                && runp->nwcs == runp->wcnext->nwcs
                && wmemcmp ((wchar_t *) runp->wcs,
                            (wchar_t *)runp->wcnext->wcs, runp->nwcs - 1) == 0
-               && (runp->wcs[runp->nwcs - 1] + 1
-                   == runp->wcnext->wcs[runp->nwcs - 1]))
+               && (runp->wcs[runp->nwcs - 1]
+                   == runp->wcnext->wcs[runp->nwcs - 1] + 1))
              {
                int i;
+               struct element_t *series_startp = runp;
+               struct element_t *curp;
 
                /* Now add first the initial byte sequence.  */
                added = (1 + 1 + 2 * (runp->nwcs - 1)) * sizeof (int32_t);
@@ -2322,34 +2327,46 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
                    i = runp->nwcs - 1;
                    obstack_grow (&extrapool, &i, sizeof (int32_t));
                  }
+
+               do
+                 runp = runp->wcnext;
+               while (runp->wcnext != NULL
+                      && runp->nwcs == runp->wcnext->nwcs
+                      && wmemcmp ((wchar_t *) runp->wcs,
+                                  (wchar_t *)runp->wcnext->wcs,
+                                  runp->nwcs - 1) == 0
+                      && (runp->wcs[runp->nwcs - 1]
+                          == runp->wcnext->wcs[runp->nwcs - 1] + 1));
+
+               /* Now walk backward from here to the beginning.  */
+               curp = runp;
+
                for (i = 1; i < runp->nwcs; ++i)
                  if (sizeof (int32_t) == sizeof (int))
-                   obstack_int_grow_fast (&extrapool, runp->wcs[i]);
+                   obstack_int_grow_fast (&extrapool, curp->wcs[i]);
                  else
-                   obstack_grow (&extrapool, &runp->wcs[i], sizeof (int32_t));
+                   obstack_grow (&extrapool, &curp->wcs[i], sizeof (int32_t));
 
                /* Now find the end of the consecutive sequence and
                    add all the indeces in the indirect pool.  */
-               while (1)
+               do
                  {
+                   weightidx = output_weightwc (&weightpool, collate, curp);
                    if (sizeof (int32_t) == sizeof (int))
                      obstack_int_grow (&extrapool, weightidx);
                    else
                      obstack_grow (&extrapool, &weightidx, sizeof (int32_t));
 
-                   runp = runp->next;
-                   if (runp->wcnext == NULL
-                       || runp->nwcs != runp->wcnext->nwcs
-                       || wmemcmp ((wchar_t *) runp->wcs,
-                                   (wchar_t *) runp->wcnext->wcs,
-                                   runp->nwcs - 1) != 0
-                       || (runp->wcs[runp->nwcs - 1] + 1
-                           != runp->wcnext->wcs[runp->nwcs - 1]))
-                     break;
-
-                   /* Insert the weight.  */
-                   weightidx = output_weightwc (&weightpool, collate, runp);
+                   curp = curp->wclast;
                  }
+               while (curp != series_startp);
+
+               /* Add the final weight.  */
+               weightidx = output_weightwc (&weightpool, collate, curp);
+               if (sizeof (int32_t) == sizeof (int))
+                 obstack_int_grow (&indirectpool, weightidx);
+               else
+                 obstack_grow (&indirectpool, &weightidx, sizeof (int32_t));
 
                /* And add the end byte sequence.  Without length this
                    time.  */
@@ -2358,12 +2375,6 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
                    obstack_int_grow (&extrapool, runp->wcs[i]);
                  else
                    obstack_grow (&extrapool, &runp->wcs[i], sizeof (int32_t));
-
-               weightidx = output_weightwc (&weightpool, collate, runp);
-               if (sizeof (int32_t) == sizeof (int))
-                 obstack_int_grow (&extrapool, weightidx);
-               else
-                 obstack_grow (&extrapool, &weightidx, sizeof (int32_t));
              }
            else
              {
@@ -2372,6 +2383,9 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
                   tested for).  */
                int i;
 
+               /* Output the weight info.  */
+               weightidx = output_weightwc (&weightpool, collate, runp);
+
                added = (1 + 1 + runp->nwcs - 1) * sizeof (int32_t);
                if (sizeof (int) == sizeof (int32_t))
                  obstack_make_room (&extrapool, added);
index aefb0345660d63fbc947b886d6d8477f7ad639c7..f388c993945ef9ae1a77a4cf3a9690594952d698 100644 (file)
@@ -85,7 +85,7 @@ written to expect this.
 @item
 If the @var{options} argument string begins with a hyphen (@samp{-}), this
 is treated specially.  It permits arguments that are not options to be
-returned as if they were associated with option character @samp{\0}.
+returned as if they were associated with option character @samp{\1}.
 
 @item
 POSIX demands the following behaviour: The first non-option stops option
index 7896499f82c8ab4ee8d7c76f86d8e591e7a0f04b..ba95d07ce84ee035337396d7fbdd6e37fd33565e 100644 (file)
@@ -241,7 +241,7 @@ static const struct rpc_errtab rpc_errlist[] =
   { RPC_VERSMISMATCH, RPC_VERSMISMATCH_IDX },
   { RPC_AUTHERROR, RPC_AUTHERROR_IDX },
   { RPC_PROGUNAVAIL, RPC_PROGUNAVAIL_IDX },
-  { RPC_PROGVERSMISMATCH, RPC_PROGVERSMISMATCH },
+  { RPC_PROGVERSMISMATCH, RPC_PROGVERSMISMATCH_IDX },
   { RPC_PROCUNAVAIL, RPC_PROCUNAVAIL_IDX },
   { RPC_CANTDECODEARGS, RPC_CANTDECODEARGS_IDX },
   { RPC_SYSTEMERROR, RPC_SYSTEMERROR_IDX },