Changeset 864ed35 for commands.c
- Timestamp:
- Apr 29, 2008, 1:21:13 AM (16 years ago)
- Branches:
- master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- b67ab6b
- Parents:
- 120291c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
commands.c
rd768834 r864ed35 101 101 "Use 'show keymaps' to see the existing keymaps.\n" 102 102 "Key sequences may be things like M-C-t or NPAGE.\n"), 103 104 OWLCMD_ARGS("style", owl_command_style, OWL_CTX_ANY,105 "creates a new style",106 "style <name> perl <function_name>",107 "Creates a new style for formatting messages.\n"108 "A style named <name> will be created that will\n"109 "format messages using the perl function <function_name>.\n\n"110 "SEE ALSO: show styles, view -s, filter -s\n"),111 103 112 104 OWLCMD_ARGS("zwrite", owl_command_zwrite, OWL_CTX_INTERACTIVE, … … 1675 1667 return NULL; 1676 1668 } 1677 1678 char *owl_command_style(int argc, char **argv, char *buff) {1679 owl_style *s;1680 1681 /* Usage: style <name> perl <function> */1682 if (argc != 4 || strcmp(argv[2], "perl")) {1683 owl_function_makemsg("Usage: style <name> perl <function>");1684 return NULL;1685 }1686 if (!owl_perlconfig_is_function(argv[3])) {1687 owl_function_makemsg("Unable to create style '%s': no perl function '%s'",1688 argv[1], argv[3]);1689 return NULL;1690 }1691 s=owl_malloc(sizeof(owl_style));1692 owl_style_create_perl(s, argv[1], argv[3], NULL);1693 owl_global_add_style(&g, s);1694 1695 return NULL;1696 }1697 1698 1669 1699 1670 void owl_command_quit()
Note: See TracChangeset
for help on using the changeset viewer.