[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/11] psppire-dict: Make auto_generate_var_name() public, and re
From: |
Ben Pfaff |
Subject: |
[PATCH 09/11] psppire-dict: Make auto_generate_var_name() public, and rename. |
Date: |
Sun, 15 Apr 2012 16:58:31 -0700 |
This function will acquire a few users in upcoming commits.
This commit renames it to have the same prefix as other public
functions in this file.
---
src/ui/gui/psppire-dict.c | 6 +++---
src/ui/gui/psppire-dict.h | 4 +++-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/ui/gui/psppire-dict.c b/src/ui/gui/psppire-dict.c
index b3a2483..1e8beac 100644
--- a/src/ui/gui/psppire-dict.c
+++ b/src/ui/gui/psppire-dict.c
@@ -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;
diff --git a/src/ui/gui/psppire-dict.h b/src/ui/gui/psppire-dict.h
index 7987493..53b09f4 100644
--- a/src/ui/gui/psppire-dict.h
+++ b/src/ui/gui/psppire-dict.h
@@ -1,5 +1,5 @@
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2004, 2009 Free Software Foundation
+ Copyright (C) 2004, 2009, 2011 Free Software Foundation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -99,6 +99,8 @@ void psppire_dict_resize_variable (PsppireDict *,
gboolean psppire_dict_check_name (const PsppireDict *dict,
const gchar *name, gboolean report);
+bool psppire_dict_generate_name (const PsppireDict *, char *name, size_t size);
+
gint psppire_dict_get_next_value_idx (const PsppireDict *dict);
gboolean psppire_dict_rename_var (PsppireDict *dict, struct variable *v,
--
1.7.2.5
- [PATCH 00/11] first batch of psppsheet changes, Ben Pfaff, 2012/04/15
- [PATCH 01/11] psppire-data-editor: Drop psppire_data_editor_set_font() redundancy., Ben Pfaff, 2012/04/15
- [PATCH 04/11] psppire-buttonbox: Fix style in header file., Ben Pfaff, 2012/04/15
- [PATCH 03/11] psppire-data-store: Use NULL for a null pointer., Ben Pfaff, 2012/04/15
- [PATCH 02/11] psppire-data-store: Use PSPPIRE namespace instead of GTK+'s., Ben Pfaff, 2012/04/15
- [PATCH 06/11] find-dialog: Change "Cancel" button to "Close" button., Ben Pfaff, 2012/04/15
- [PATCH 05/11] gtkxpaned: Remove write-only variables., Ben Pfaff, 2012/04/15
- [PATCH 08/11] psppire-dict: Get rid of static var in auto_generate_var_name()., Ben Pfaff, 2012/04/15
- [PATCH 07/11] Allow dictionary 'var_deleted' callback to examine the deleted var., Ben Pfaff, 2012/04/15
- [PATCH 09/11] psppire-dict: Make auto_generate_var_name() public, and rename.,
Ben Pfaff <=
- [PATCH 10/11] psppire-dict: Return new var from psppire_dict_insert_variable()., Ben Pfaff, 2012/04/15
- [PATCH 11/11] psppire-dict: Better validate idx arg in psppire_dict_get_variable()., Ben Pfaff, 2012/04/15
- Re: [PATCH 00/11] first batch of psppsheet changes, John Darrington, 2012/04/16