X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fsettings.c;h=1b48299446d777491fbf9fad5cc087204481bb22;hb=4a2dcede63a2fc6423301245b2e65c4b5f1aabbe;hp=2479431b554687aff821f219cb6ae9cbf994683b;hpb=07da9f454c17fb961cae09f6d7d505f7abb281c0;p=pspp diff --git a/src/data/settings.c b/src/data/settings.c index 2479431b55..1b48299446 100644 --- a/src/data/settings.c +++ b/src/data/settings.c @@ -71,6 +71,7 @@ struct settings int syntax; struct fmt_settings styles; + double small; enum settings_output_devices output_routing[SETTINGS_N_OUTPUT_TYPES]; @@ -111,6 +112,7 @@ static struct settings the_settings = { ENHANCED, /* global_algorithm */ ENHANCED, /* syntax */ FMT_SETTINGS_INIT, /* styles */ + .0001, /* small */ /* output_routing */ {SETTINGS_DEVICE_LISTING | SETTINGS_DEVICE_TERMINAL, @@ -140,7 +142,7 @@ static void settings_copy (struct settings *dst, const struct settings *src) { *dst = *src; - fmt_settings_copy (&dst->styles, &src->styles); + dst->styles = fmt_settings_copy (&src->styles); } /* Returns a copy of the current settings. */ @@ -551,6 +553,18 @@ settings_get_fmt_settings (void) return &the_settings.styles; } +double +settings_get_small (void) +{ + return the_settings.small; +} + +void +settings_set_small (double small) +{ + the_settings.small = small; +} + /* Returns a string of the form "$#,###.##" according to FMT, which must be of type FMT_DOLLAR. The caller must free the string. */