X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fspreadsheet-test.c;h=af0d18c81c8f6e4b082ff5092aa684198b529ceb;hb=14f4522a17db23e67a6fa17876633cc6260cb42b;hp=bec577821a68076fc20831580b00ed1bf3739677;hpb=5f91f0868ec7cdbdb7900a2cb6e876b467fb2a6e;p=pspp diff --git a/src/ui/gui/spreadsheet-test.c b/src/ui/gui/spreadsheet-test.c index bec577821a..af0d18c81c 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);