- str_uppercase (name);
-
- if (dict_create_var (dict, name, 0))
- return 1;
-
- /* Add numeric extensions until acceptable. */
- {
- const int len = (int) strlen (name);
- char n[SHORT_NAME_LEN + 1];
- int i;
-
- for (i = 1; i < 10000000; i++)
- {
- int ofs = MIN (7 - intlog10 (i), len);
- memcpy (n, name, ofs);
- sprintf (&n[ofs], "%d", i);
-
- if (dict_create_var (dict, n, 0))
- return 1;
- }
- }
-
- msg (SE, _("Could not create acceptable variant for variable %s."), name);
- return 0;
-}
-
-/* Make a new dictionary for all the new variable names. */
-static bool
-build_dictionary (struct dictionary *dict, struct flip_pgm *flip)
-{
- dict_create_var_assert (dict, "CASE_LBL", 8);
-
- if (flip->new_names_head == NULL)
- {
- int i;
-
- if (flip->case_cnt > 99999)
- {
- msg (SE, _("Cannot create more than 99999 variable names."));
- return false;
- }
-
- for (i = 0; i < flip->case_cnt - 1; i++)
- {
- struct variable *v;
- char s[SHORT_NAME_LEN + 1];