projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
format: Reduce size of struct fmt_spec from 6 bytes to 4.
[pspp]
/
src
/
language
/
utilities
/
output.c
diff --git
a/src/language/utilities/output.c
b/src/language/utilities/output.c
index a699fdf5f5e4ef9968f14bdb24c4bf180bd4ada9..f0dd016a829bfb2daa7e4c1049453d8c4964a622 100644
(file)
--- a/
src/language/utilities/output.c
+++ b/
src/language/utilities/output.c
@@
-61,7
+61,7
@@
cmd_output (struct lexer *lexer, struct dataset *ds UNUSED)
else if (lex_match_id (lexer, "TABLECELLS"))
{
string_set_clear (&rc_names);
else if (lex_match_id (lexer, "TABLECELLS"))
{
string_set_clear (&rc_names);
- struct fmt_spec fmt = {
0, 0,
0 };
+ struct fmt_spec fmt = {
.type =
0 };
while (lex_token (lexer) != T_SLASH &&
lex_token (lexer) != T_ENDCMD)
while (lex_token (lexer) != T_SLASH &&
lex_token (lexer) != T_ENDCMD)
@@
-86,8
+86,8
@@
cmd_output (struct lexer *lexer, struct dataset *ds UNUSED)
else if (lex_match_id (lexer, "FORMAT"))
{
char type[FMT_TYPE_LEN_MAX + 1];
else if (lex_match_id (lexer, "FORMAT"))
{
char type[FMT_TYPE_LEN_MAX + 1];
-
int width = -1
;
-
int decimals = -1
;
+
uint16_t width
;
+
uint8_t decimals
;
if (! lex_force_match (lexer, T_EQUALS))
goto error;
if (! lex_force_match (lexer, T_EQUALS))
goto error;
@@
-135,6
+135,7
@@
cmd_output (struct lexer *lexer, struct dataset *ds UNUSED)
}
}
}
}
+ string_set_destroy (&rc_names);
return CMD_SUCCESS;
error:
return CMD_SUCCESS;
error: