CTABLES basics work
[pspp] / src / ui / gui / psppire-scanf.c
index 951b27357f059ee94e79ef9d4be2f443ee9e6e25..88128a3090a717f959502fcb1623ced90d39f974 100644 (file)
@@ -107,11 +107,11 @@ guts (PsppireScanf *scanf)
       int width = 0;
 
       if (dir.precision_start && dir.precision_end)
-       precision = strtol (dir.precision_start + 1,
+       precision = g_ascii_strtoll (dir.precision_start + 1,
                            (char **) &dir.precision_end, 10);
 
       if (dir.width_start && dir.width_end)
-       width = strtol (dir.width_start, (char **) &dir.width_end, 10);
+       width = g_ascii_strtoll (dir.width_start, (char **) &dir.width_end, 10);
 
       if (dir.dir_start > s)
        ship_label (scanf, &s, &scanf->d, i);
@@ -238,7 +238,7 @@ static GObjectClass *parent_class = NULL;
 static void
 psppire_scanf_dispose (GObject *obj)
 {
-  PsppireScanf *w = (PsppireScanf *)obj;
+  PsppireScanf *w = PSPPIRE_SCANF (obj);
 
   if (w->dispose_has_run)
     return;
@@ -331,10 +331,12 @@ psppire_scanf_class_init (PsppireScanfClass *class)
 static void
 psppire_scanf_init (PsppireScanf *w)
 {
+  w->dispose_has_run = FALSE;
+
   gtk_orientable_set_orientation (GTK_ORIENTABLE (w), GTK_ORIENTATION_HORIZONTAL);
 }
 
-gchar
+static gchar
 psppire_get_conversion_char (PsppireScanf *w, gint n)
 {
   g_return_val_if_fail (n < w->d.count, '\0');