source: perlglue.xs @ 1152d45

barnowl_perlaimdebianrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 1152d45 was 1152d45, checked in by Nelson Elhage <nelhage@mit.edu>, 14 years ago
Including owl.h into perlglue.xs to make it easier to add more perl glue.
  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[83a9b63]1static const char fileIdent[] = "$Id$";
2
[8a54409]3#ifdef HAVE_LIBZEPHYR
[f1e629d]4#include <zephyr/zephyr.h>
[8a54409]5#endif
[f1e629d]6#include <EXTERN.h>
7#include <perl.h>
8#include <XSUB.h>
[8ee73f8d]9
[1152d45]10#define OWL_PERL
11#include "owl.h"
12SV *owl_perlconfig_curmessage2hashref(void);
[8ee73f8d]13
14MODULE = owl            PACKAGE = owl           
15
16char *
17command(cmd)
18        char *cmd
19        PREINIT:
20                char *rv = NULL;
21        CODE:
22                rv = owl_function_command(cmd);
23                RETVAL = rv;   
24        OUTPUT:
25                RETVAL
26        CLEANUP:
27                if (rv) owl_free(rv);
28
[f1e629d]29SV *
30getcurmsg()
31        CODE:
32                ST(0) = owl_perlconfig_curmessage2hashref();
33
34int
35getnumcols()
36        CODE:
37                RETVAL = owl_global_get_cols(&g);
38        OUTPUT:
39                RETVAL
40
41char *
42zephyr_getrealm()
43        CODE:
[8a54409]44                RETVAL = owl_zephyr_get_realm();
[f1e629d]45        OUTPUT:
46                RETVAL
47
48char *
49zephyr_getsender()
50        CODE:
[8a54409]51                RETVAL = owl_zephyr_get_sender();
[f1e629d]52        OUTPUT:
53                RETVAL
54
[e1c4636]55void
[f1e629d]56zephyr_zwrite(cmd,msg)
[e1c4636]57        char *cmd
58        char *msg
59        PREINIT:
60                int i;
61        CODE:
62                i = owl_zwrite_create_and_send_from_line(cmd, msg);
63
64char *
65ztext_stylestrip(ztext)
66        char *ztext
67        PREINIT:
68                char *rv = NULL;
69        CODE:
[1fd0b25]70                rv = owl_function_ztext_stylestrip(ztext);
[e1c4636]71                RETVAL = rv;
72        OUTPUT:
73                RETVAL
74        CLEANUP:
75                if (rv) owl_free(rv);
76
Note: See TracBrowser for help on using the repository browser.