Used type casenumber in GUI code where appropriate. Also, generally
[pspp-builds.git] / src / ui / gui / psppire-case-file.c
index 215eecc51802be034fea0f7dfb50f4e99be65ca2..7de97f5ca2e123df28423a2c5bdfe5915038e9a1 100644 (file)
@@ -1,21 +1,18 @@
-/*
-    PSPPIRE --- A Graphical User Interface for PSPP
-    Copyright (C) 2006  Free Software Foundation
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2006  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
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+   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
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
 
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-    02110-1301, USA. */
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
 #include <string.h>
@@ -167,7 +164,7 @@ psppire_case_file_new (const struct casereader *reader)
 
 
 gboolean
-psppire_case_file_delete_cases (PsppireCaseFile *cf, gint n_cases, gint first)
+psppire_case_file_delete_cases (PsppireCaseFile *cf, casenumber n_cases, casenumber first)
 {
   g_return_val_if_fail (cf, FALSE);
   g_return_val_if_fail (cf->datasheet, FALSE);
@@ -182,8 +179,8 @@ psppire_case_file_delete_cases (PsppireCaseFile *cf, gint n_cases, gint first)
 /* Insert case CC into the case file before POSN */
 gboolean
 psppire_case_file_insert_case (PsppireCaseFile *cf,
-                             struct ccase *cc,
-                             gint posn)
+                              struct ccase *cc,
+                              casenumber posn)
 {
   struct ccase tmp;
   bool result ;
@@ -197,7 +194,7 @@ psppire_case_file_insert_case (PsppireCaseFile *cf,
   if ( result )
     g_signal_emit (cf, signals [CASE_INSERTED], 0, posn);
   else
-    g_warning ("Cannot insert case at position %d\n", posn);
+    g_warning ("Cannot insert case at position %ld\n", posn);
 
   return result;
 }
@@ -226,7 +223,7 @@ psppire_case_file_append_case (PsppireCaseFile *cf,
 }
 
 
-inline gint
+inline casenumber
 psppire_case_file_get_case_count (const PsppireCaseFile *cf)
 {
   g_return_val_if_fail (cf, FALSE);
@@ -280,7 +277,7 @@ psppire_case_file_clear (PsppireCaseFile *cf)
 /* Set the IDXth value of case C to V.
    Returns true if successful, false on I/O error. */
 gboolean
-psppire_case_file_set_value (PsppireCaseFile *cf, gint casenum, gint idx,
+psppire_case_file_set_value (PsppireCaseFile *cf, casenumber casenum, gint idx,
                            union value *v, gint width)
 {
   bool ok;
@@ -300,7 +297,7 @@ psppire_case_file_set_value (PsppireCaseFile *cf, gint casenum, gint idx,
 
 /* Set the IDXth value of case C using D_IN */
 gboolean
-psppire_case_file_data_in (PsppireCaseFile *cf, gint casenum, gint idx,
+psppire_case_file_data_in (PsppireCaseFile *cf, casenumber casenum, gint idx,
                           struct substring input, const struct fmt_spec *fmt)
 {
   union value *value;
@@ -367,7 +364,7 @@ psppire_case_file_insert_values (PsppireCaseFile *cf,
    Returns true on success, false otherwise.
  */
 gboolean
-psppire_case_file_get_case (const PsppireCaseFile *cf, gint casenum,
+psppire_case_file_get_case (const PsppireCaseFile *cf, casenumber casenum,
                           struct ccase *c)
 {
   g_return_val_if_fail (cf, FALSE);