+
+ /* Install new short name for IDX. */
+ if (short_name != NULL)
+ {
+ if (idx >= var->short_name_cnt)
+ {
+ size_t old_cnt = var->short_name_cnt;
+ size_t i;
+ var->short_name_cnt = MAX (idx * 2, 1);
+ var->short_names = xnrealloc (var->short_names, var->short_name_cnt,
+ sizeof *var->short_names);
+ for (i = old_cnt; i < var->short_name_cnt; i++)
+ var->short_names[i] = NULL;
+ }
+ var->short_names[idx] = xstrndup (short_name, MAX_SHORT_STRING);
+ str_uppercase (var->short_names[idx]);
+ }
+
+ dict_var_changed (var);