X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=src%2Fdata%2Fformat.c;h=e15931ad1a2b4764547747945e9399305f2b8946;hb=92c474055d5af5557c5f9341018f4e1642586af2;hp=95e87a0daa7e7f32fc6b8bc7f7bd1d9bbcc19868;hpb=4e8257086ffc71bc5a1785fd86610921be677887;p=pspp-builds.git diff --git a/src/data/format.c b/src/data/format.c index 95e87a0d..e15931ad 100644 --- a/src/data/format.c +++ b/src/data/format.c @@ -912,6 +912,56 @@ fmt_date_template (enum fmt_type type) } } +/* Returns a string representing the format TYPE for use in a GUI dialog. */ +const char * +fmt_gui_name (enum fmt_type type) +{ + switch (type) + { + case FMT_F: + return _("Numeric"); + + case FMT_COMMA: + return _("Comma"); + + case FMT_DOT: + return _("Dot"); + + case FMT_E: + return _("Scientific"); + + case FMT_DATE: + case FMT_EDATE: + case FMT_SDATE: + case FMT_ADATE: + case FMT_JDATE: + case FMT_QYR: + case FMT_MOYR: + case FMT_WKYR: + case FMT_DATETIME: + case FMT_TIME: + case FMT_DTIME: + case FMT_WKDAY: + case FMT_MONTH: + return _("Date"); + + case FMT_DOLLAR: + return _("Dollar"); + + case FMT_CCA: + case FMT_CCB: + case FMT_CCC: + case FMT_CCD: + case FMT_CCE: + return _("Custom"); + + case FMT_A: + return _("String"); + + default: + return fmt_name (type); + } +} /* Returns true if TYPE is a valid format type, false otherwise. */