psppire-dict: Make auto_generate_var_name() public, and rename.
[pspp] / src / ui / gui / psppire-dict.c
index b3a24838580ea5d45fe10a06f39408c78eefc4ce..1e8beac5e3f1f1023ebb7d13f763596554915dd3 100644 (file)
@@ -352,8 +352,8 @@ psppire_dict_replace_dictionary (PsppireDict *dict, struct dictionary *d)
 
 /* Stores a valid name for a new variable in DICT into the SIZE bytes in NAME.
    Returns true if successful, false if SIZE is insufficient. */
-static bool
-auto_generate_var_name (const PsppireDict *dict, char *name, size_t size)
+bool
+psppire_dict_generate_name (const PsppireDict *dict, char *name, size_t size)
 {
   gint d;
 
@@ -394,7 +394,7 @@ psppire_dict_insert_variable (PsppireDict *d, gint idx, const gchar *name)
 
   if ( ! name )
     {
-      if (!auto_generate_var_name (d, tmpname, sizeof tmpname))
+      if (!psppire_dict_generate_name (d, tmpname, sizeof tmpname))
         g_return_if_reached ();
 
       name = tmpname;