treewide: fix incorrect spelling of indices in comments
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 11 Dec 2020 02:00:00 +0000 (02:00 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 11 Dec 2020 02:00:00 +0000 (02:00 +0000)
Replace 'indeces' with 'indices', the most annoying of these typos were
those found in elf.h which is a public header file copied to other
projects.

dlfcn/dlfcn.h
elf/dl-version.c
elf/elf.h
iconv/gconv_trans.c
iconvdata/jis0208.h
iconvdata/jis0212.h
locale/programs/ld-collate.c
misc/hsearch_r.c
nptl_db/td_thr_tsd.c
string/strxfrm_l.c

index c629fc7..d4a8d5a 100644 (file)
@@ -40,7 +40,7 @@
 # define RTLD_DEFAULT  ((void *) 0)
 
 
-/* Type for namespace indeces.  */
+/* Type for namespace indices.  */
 typedef long int Lmid_t;
 
 /* Special namespace ID values.  */
index 0f8bdcd..6e28221 100644 (file)
@@ -247,7 +247,7 @@ _dl_check_map_versions (struct link_map *map, int verbose, int trace_mode)
      the maximum index here as well.
 
      XXX We could avoid the loop by just taking the number of definitions
-     as an upper bound of new indeces.  */
+     as an upper bound of new indices.  */
   if (def != NULL)
     {
       ElfW(Verdef) *ent;
index bd7af7c..93994ce 100644 (file)
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -441,7 +441,7 @@ typedef struct
 #define SHT_FINI_ARRAY   15            /* Array of destructors */
 #define SHT_PREINIT_ARRAY 16           /* Array of pre-constructors */
 #define SHT_GROUP        17            /* Section group */
-#define SHT_SYMTAB_SHNDX  18           /* Extended section indeces */
+#define SHT_SYMTAB_SHNDX  18           /* Extended section indices */
 #define        SHT_NUM           19            /* Number of defined types.  */
 #define SHT_LOOS         0x60000000    /* Start OS-specific.  */
 #define SHT_GNU_ATTRIBUTES 0x6ffffff5  /* Object attributes.  */
@@ -2141,7 +2141,7 @@ enum
 #define EFA_PARISC_1_1             0x0210 /* PA-RISC 1.1 big-endian.  */
 #define EFA_PARISC_2_0             0x0214 /* PA-RISC 2.0 big-endian.  */
 
-/* Additional section indeces.  */
+/* Additional section indices.  */
 
 #define SHN_PARISC_ANSI_COMMON 0xff00     /* Section for tenatively declared
                                              symbols in ANSI C.  */
index ea02c95..a6e468e 100644 (file)
@@ -79,8 +79,8 @@ __gconv_transliterate (struct __gconv_step *step,
     return (winbuf == winbufend
            ? __GCONV_EMPTY_INPUT : __GCONV_INCOMPLETE_INPUT);
 
-  /* The array starting at FROM_IDX contains indeces to the string table
-     in FROM_TBL.  The indeces are sorted wrt to the strings.  I.e., we
+  /* The array starting at FROM_IDX contains indices to the string table
+     in FROM_TBL.  The indices are sorted wrt to the strings.  I.e., we
      are doing binary search.  */
   low = 0;
   high = size;
index 1de69fc..65bb890 100644 (file)
@@ -23,7 +23,7 @@
 #include <gconv.h>
 #include <stdint.h>
 
-/* Struct for table with indeces in UCS mapping table.  */
+/* Struct for table with indices in UCS mapping table.  */
 struct jisx0208_ucs_idx
 {
   uint16_t start;
index d4164d8..f22ac24 100644 (file)
@@ -25,7 +25,7 @@
 #include <stdint.h>
 
 
-/* Struct for table with indeces in mapping table.  */
+/* Struct for table with indices in mapping table.  */
 struct jisx0212_idx
 {
   uint16_t start;
index feb1a11..cff0c11 100644 (file)
@@ -2039,7 +2039,7 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
                obstack_int32_grow_fast (atwc.extrapool, curp->wcs[i]);
 
              /* Now find the end of the consecutive sequence and
-                add all the indeces in the indirect pool.  */
+                add all the indices in the indirect pool.  */
              do
                {
                  weightidx = output_weightwc (atwc.weightpool, atwc.collate,
@@ -2255,7 +2255,7 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap,
                  obstack_1grow_fast (&extrapool, curp->mbs[i]);
 
                /* Now find the end of the consecutive sequence and
-                  add all the indeces in the indirect pool.  */
+                  add all the indices in the indirect pool.  */
                do
                  {
                    weightidx = output_weight (&weightpool, collate, curp);
index a9905de..7fafc2c 100644 (file)
@@ -181,7 +181,7 @@ __hsearch_r (ENTRY item, ACTION action, ENTRY **retval,
       do
        {
          /* Because SIZE is prime this guarantees to step through all
-             available indeces.  */
+             available indices.  */
           if (idx <= hval2)
            idx = htab->size + idx - hval2;
          else
index 4c9c45e..f1b4684 100644 (file)
@@ -48,7 +48,7 @@ td_thr_tsd (const td_thrhandle_t *th, const thread_key_t tk, void **data)
   if (err != TD_OK)
     return err;
 
-  /* Compute the indeces.  */
+  /* Compute the indices.  */
   pthread_key_2ndlevel_size
     = DB_DESC_NELEM (th->th_ta_p->ta_field_pthread_key_data_level2_data);
   idx1st = tk / pthread_key_2ndlevel_size;
index 530a8d3..96a7ef2 100644 (file)
@@ -708,7 +708,7 @@ STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, locale_t l)
   assert (((uintptr_t) l_data.indirect) % __alignof__ (l_data.indirect[0]) == 0);
 
   /* We need the elements of the string as unsigned values since they
-     are used as indeces.  */
+     are used as indices.  */
   const USTRING_TYPE *usrc = (const USTRING_TYPE *) src;
 
   /* Allocate cache for small strings on the stack and fill it with weight and