Changeset 216c734 for commands.c


Ignore:
Timestamp:
Oct 24, 2006, 12:40:02 PM (14 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
0138478
Parents:
4211f50b
Message:
Adding my getstyle patch, which I rely on from perl right now for a
number of my "modules".
File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    r4211f50b r216c734  
    703703              "returns the value of a variable",
    704704              "getvar <varname>", ""),
     705
     706  OWLCMD_ARGS("getstyle", owl_command_getstyle, OWL_CTX_INTERACTIVE,
     707              "returns the name of the style for the current view",
     708              "", ""),
    705709
    706710  OWLCMD_ARGS("search", owl_command_search, OWL_CTX_INTERACTIVE,
     
    23952399}
    23962400
     2401char *owl_command_getstyle(int argc, char **argv, char *buff)
     2402{
     2403  char *stylename;
     2404  if (argc != 1) {
     2405    owl_function_makemsg("Wrong number of arguments for %s", argv[0]);
     2406    return NULL;
     2407  }
     2408  stylename = owl_view_get_style_name(owl_global_get_current_view(&g));
     2409  if (stylename) stylename = owl_strdup(stylename);
     2410  return stylename;
     2411}
     2412
    23972413/*********************************************************************/
    23982414/************************** EDIT SPECIFIC ****************************/
Note: See TracChangeset for help on using the changeset viewer.