Lines Matching refs:strtab
1878 add_to_string_table (struct string_table *strtab, const char *str) in add_to_string_table() argument
1883 if (strtab->strings_allocated == 0) in add_to_string_table()
1885 strtab->strings_allocated = 4; in add_to_string_table()
1886 strtab->strings = (const char **) in add_to_string_table()
1887 xcalloc (strtab->strings_allocated, sizeof(char *)); in add_to_string_table()
1888 strtab->hashtab = hash_new (); in add_to_string_table()
1891 val = (offsetT) (uintptr_t)hash_find (strtab->hashtab, str); in add_to_string_table()
1895 if (strtab->strings_in_use >= strtab->strings_allocated) in add_to_string_table()
1897 unsigned int old = strtab->strings_allocated; in add_to_string_table()
1899 strtab->strings_allocated *= 2; in add_to_string_table()
1900 strtab->strings = (const char **) in add_to_string_table()
1901 xrealloc (strtab->strings, in add_to_string_table()
1902 strtab->strings_allocated * sizeof (char *)); in add_to_string_table()
1903 memset (strtab->strings + old, 0, in add_to_string_table()
1904 (strtab->strings_allocated - old) * sizeof (char *)); in add_to_string_table()
1908 val = strtab->next_offset; in add_to_string_table()
1909 hash_insert (strtab->hashtab, key, (void *) (uintptr_t)val); in add_to_string_table()
1910 strtab->strings[strtab->strings_in_use++] = key; in add_to_string_table()
1911 strtab->next_offset += strlen(key) + 1; in add_to_string_table()
1920 out_string_table (segT str_seg, struct string_table *strtab) in out_string_table() argument
1928 for (i = 0; i < strtab->strings_in_use; i++) in out_string_table()
1930 size = strlen (strtab->strings[i]) + 1; in out_string_table()
1932 memcpy (cp, strtab->strings[i], size); in out_string_table()