X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fformat.h;h=8c54ba3a171448121cc0b4911b3146a21b34e510;hb=bef05451ef0f1a79d5427d5d4701b2744824c0b4;hp=d6779d4b3f5f6dccab20e952d55006cf835eaf0e;hpb=cc2f30a26fb9dc6c0f92210c790df6c39bba038f;p=pspp diff --git a/src/data/format.h b/src/data/format.h index d6779d4b3f..8c54ba3a17 100644 --- a/src/data/format.h +++ b/src/data/format.h @@ -164,6 +164,7 @@ struct fmt_number_style struct fmt_affix neg_suffix; /* Negative suffix. */ char decimal; /* Decimal point: '.' or ','. */ char grouping; /* Grouping character: ',', '.', or 0. */ + bool include_leading_zero; /* Format as ".5" or "0.5"? */ /* A fmt_affix may require more bytes than its display width; for example, U+00A5 (Â¥) is 2 bytes in UTF-8 but occupies only one display column. @@ -192,6 +193,11 @@ struct fmt_settings { int epoch; /* 0 for default epoch. */ char decimal; /* '.' or ','. */ + + /* Format F, E, COMMA, and DOT with leading zero (e.g. "0.5" instead of + ".5")? */ + bool include_leading_zero; + struct fmt_number_style *ccs[FMT_N_CCS]; /* CCA through CCE. */ }; #define FMT_SETTINGS_INIT { .decimal = '.' }