X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fspreadsheet-test.c;h=b70227008331377db9dd626fbd5582bbf4164cdd;hb=6ee48467ac46bb8553f6fb3782623559affb1b9c;hp=8c96ec96a886607beedc0a010be7837dc9e17ebb;hpb=94f97f9918ae8fb45a3a81d9663df3b234345f31;p=pspp diff --git a/src/ui/gui/spreadsheet-test.c b/src/ui/gui/spreadsheet-test.c index 8c96ec96a8..b702270083 100644 --- a/src/ui/gui/spreadsheet-test.c +++ b/src/ui/gui/spreadsheet-test.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2013 Free Software Foundation + Copyright (C) 2013, 2014 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 @@ -19,6 +19,7 @@ #include +#include #include #include "psppire-spreadsheet-model.h" @@ -78,7 +79,7 @@ on_clicked (GtkButton *button, struct xxx *stuff) const int width = caseproto_get_width (proto, i); const union value *val = case_data_idx (c, i); if (0 == width) - printf ("%g ", val->f); + printf ("%.*g ", DBL_DIG + 1, val->f); else { char *ss = xzalloc (width + 1); @@ -191,7 +192,7 @@ main (int argc, char *argv[] ) gtk_main (); - spreadsheet_destroy (stuff.sp); + spreadsheet_unref (stuff.sp); return 0; }