source: perlglue.xs @ bc220b2

barnowl_perlaimdebianrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since bc220b2 was 1152d45, checked in by Nelson Elhage <nelhage@mit.edu>, 18 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
Line 
1static const char fileIdent[] = "$Id$";
2
3#ifdef HAVE_LIBZEPHYR
4#include <zephyr/zephyr.h>
5#endif
6#include <EXTERN.h>
7#include <perl.h>
8#include <XSUB.h>
9
10#define OWL_PERL
11#include "owl.h"
12SV *owl_perlconfig_curmessage2hashref(void);
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
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:
44                RETVAL = owl_zephyr_get_realm();
45        OUTPUT:
46                RETVAL
47
48char *
49zephyr_getsender()
50        CODE:
51                RETVAL = owl_zephyr_get_sender();
52        OUTPUT:
53                RETVAL
54
55void
56zephyr_zwrite(cmd,msg)
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:
70                rv = owl_function_ztext_stylestrip(ztext);
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.