X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fspv%2Fspv-writer.c;h=182cc5e5471b1b0a81003fb057957c43b8019588;hb=df1d194af32e35739355981252785e768f21ebb0;hp=5a81002927e5f51fda7b8e92a4fbece5a53233ae;hpb=75e0214defed00011cfb6d74ce220cafd4e69fb7;p=pspp diff --git a/src/output/spv/spv-writer.c b/src/output/spv/spv-writer.c index 5a81002927..182cc5e547 100644 --- a/src/output/spv/spv-writer.c +++ b/src/output/spv/spv-writer.c @@ -598,10 +598,10 @@ put_value_mod (struct buf *buf, const struct pivot_value *value, } static void -put_format (struct buf *buf, const struct fmt_spec *f, bool honor_small) +put_format (struct buf *buf, struct fmt_spec f, bool honor_small) { - int type = f->type == FMT_F && honor_small ? 40 : fmt_to_io (f->type); - put_u32 (buf, (type << 16) | (f->w << 8) | f->d); + int type = f.type == FMT_F && honor_small ? 40 : fmt_to_io (f.type); + put_u32 (buf, (type << 16) | (f.w << 8) | f.d); } static int @@ -629,7 +629,7 @@ put_value (struct buf *buf, const struct pivot_value *value) { put_byte (buf, 2); put_value_mod (buf, value, NULL); - put_format (buf, &value->numeric.format, value->numeric.honor_small); + put_format (buf, value->numeric.format, value->numeric.honor_small); put_double (buf, value->numeric.x); put_string (buf, value->numeric.var_name); put_string (buf, value->numeric.value_label); @@ -639,7 +639,7 @@ put_value (struct buf *buf, const struct pivot_value *value) { put_byte (buf, 1); put_value_mod (buf, value, NULL); - put_format (buf, &value->numeric.format, value->numeric.honor_small); + put_format (buf, value->numeric.format, value->numeric.honor_small); put_double (buf, value->numeric.x); } break; @@ -649,10 +649,10 @@ put_value (struct buf *buf, const struct pivot_value *value) put_value_mod (buf, value, NULL); size_t len = strlen (value->string.s); if (value->string.hex) - put_format (buf, &(struct fmt_spec) { .type = FMT_AHEX, .w = len * 2 }, + put_format (buf, (struct fmt_spec) { .type = FMT_AHEX, .w = len * 2 }, false); else - put_format (buf, &(struct fmt_spec) { .type = FMT_A, .w = len }, false); + put_format (buf, (struct fmt_spec) { .type = FMT_A, .w = len }, false); put_string (buf, value->string.value_label); put_string (buf, value->string.var_name); put_show_values (buf, value->string.show);