source: perlglue.xs @ 8ee73f8d

barnowl_perlaimdebianowlrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 8ee73f8d was 8ee73f8d, checked in by Erik Nygren <nygren@mit.edu>, 18 years ago
Fixed a memory reference bug in delete and undelete commands. Added support for perl to call directly back into owl. Changed the implementation of owl::command("...") to immediately call back into owl. This allows perl to get the return value of strings returned by owl commands. Added the getview command which returns the name of the current view's filter. Added the getvar command which returns the value of a variable. Added an example to examples/owlconf.erik which uses TAB to narrow and restore the view. Added an example to examples/owlconf.erik which uses M-c to color messages matching the current one green.
  • Property mode set to 100644
File size: 415 bytes
Line 
1#include "EXTERN.h"
2#include "perl.h"
3#include "XSUB.h"
4
5/* Yeah, we should just include owl.h, but curses and perl don't play nice. */
6extern char *owl_function_command(char *cmd);
7extern void owl_free(void *x);
8
9MODULE = owl            PACKAGE = owl           
10
11char *
12command(cmd)
13        char *cmd
14        PREINIT:
15                char *rv = NULL;
16        CODE:
17                rv = owl_function_command(cmd);
18                RETVAL = rv;   
19        OUTPUT:
20                RETVAL
21        CLEANUP:
22                if (rv) owl_free(rv);
23
Note: See TracBrowser for help on using the repository browser.