X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fdriver.c;fp=src%2Foutput%2Fdriver.c;h=82556c81d0c41d858f816eb41939be613bfc8f51;hb=0536ee7f632fbc31e54d4f6782940b107bcc7efe;hp=e6fc0ca9506de146ab8f48d7b5c41a97d01240a5;hpb=80bafa137ac4066f180d3989b4861202c03e96ae;p=pspp diff --git a/src/output/driver.c b/src/output/driver.c index e6fc0ca950..82556c81d0 100644 --- a/src/output/driver.c +++ b/src/output/driver.c @@ -32,6 +32,7 @@ #include "data/settings.h" #include "libpspp/array.h" #include "libpspp/assertion.h" +#include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/llx.h" #include "libpspp/string-map.h" @@ -273,7 +274,11 @@ output_submit (struct output_item *item) output_submit__ (e, item); } -const char * +/* Returns the name of the command currently being parsed, in all uppercase. + The caller must free the returned value. + + Returns NULL if no command is being parsed. */ +char * output_get_command_name (void) { struct output_engine *e = engine_stack_top (); @@ -282,7 +287,7 @@ output_get_command_name (void) for (size_t i = e->n_groups; i-- > 0; ) if (e->groups[i]) - return e->groups[i]; + return utf8_to_upper (e->groups[i]); return NULL; }