diff -ru3 owl-2.1.11/commands.c owl-2.1.11.asedeno/commands.c --- owl-2.1.11/commands.c 2005-01-30 12:38:56.000000000 -0500 +++ owl-2.1.11.asedeno/commands.c 2006-03-12 23:58:18.000000000 -0500 @@ -699,6 +699,10 @@ "returns the name of the filter for the current view", "", ""), + OWLCMD_ARGS("getstyle", owl_command_getstyle, OWL_CTX_INTERACTIVE, + "returns the name of the filter for the current view", + "", ""), + OWLCMD_ARGS("getvar", owl_command_getvar, OWL_CTX_INTERACTIVE, "returns the value of a variable", "getvar ", ""), @@ -2398,6 +2402,18 @@ return(NULL); } +char *owl_command_getstyle(int argc, char **argv, char *buff) +{ + char *stylename; + if (argc != 1) { + owl_function_makemsg("Wrong number of arguments for %s", argv[0]); + return NULL; + } + stylename = owl_view_get_style_name(owl_global_get_current_view(&g)); + if (stylename) stylename = owl_strdup(stylename); + return stylename; +} + /*********************************************************************/ /************************** EDIT SPECIFIC ****************************/ /*********************************************************************/