projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid deprecation warnings by use of gtk2 -> gtk3 wrapper macros.
[pspp]
/
src
/
data
/
format.c
diff --git
a/src/data/format.c
b/src/data/format.c
index 21162a05ae4f4ab21aff8012def2fdcd83d30123..3a380bda45c0d960758739531289436da37f7af9 100644
(file)
--- a/
src/data/format.c
+++ b/
src/data/format.c
@@
-475,8
+475,10
@@
fmt_equal (const struct fmt_spec *a, const struct fmt_spec *b)
return a->type == b->type && a->w == b->w && a->d == b->d;
}
return a->type == b->type && a->w == b->w && a->d == b->d;
}
-/* Adjusts FMT to be valid for a value of the given WIDTH. */
-void
+/* Adjusts FMT to be valid for a value of the given WIDTH if necessary.
+ If nothing needed to be changed the return value is false
+ */
+bool
fmt_resize (struct fmt_spec *fmt, int width)
{
if ((width > 0) != fmt_is_string (fmt->type))
fmt_resize (struct fmt_spec *fmt, int width)
{
if ((width > 0) != fmt_is_string (fmt->type))
@@
-494,7
+496,9
@@
fmt_resize (struct fmt_spec *fmt, int width)
else
{
/* Still numeric. */
else
{
/* Still numeric. */
+ return false;
}
}
+ return true;
}
/* Adjusts FMT's width and decimal places to be valid for USE. */
}
/* Adjusts FMT's width and decimal places to be valid for USE. */