X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-scanf.c;h=88128a3090a717f959502fcb1623ced90d39f974;hb=2c4b104df57f2e8b5ed2afa50819294aaac4aa6c;hp=951b27357f059ee94e79ef9d4be2f443ee9e6e25;hpb=96994a54e60e9c95b8bba54c2281acf7059b1203;p=pspp diff --git a/src/ui/gui/psppire-scanf.c b/src/ui/gui/psppire-scanf.c index 951b27357f..88128a3090 100644 --- a/src/ui/gui/psppire-scanf.c +++ b/src/ui/gui/psppire-scanf.c @@ -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');