source: perlglue.xs @ afbf668

barnowl_perlaimdebianowlrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since afbf668 was 8a54409, checked in by James M. Kretchmar <kretch@mit.edu>, 21 years ago
Small fixes to keep zephyrless build working Increased size of screenname field in buddy listing
  • Property mode set to 100644
File size: 1.3 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/* Yeah, we should just include owl.h, but curses and perl don't play nice. */
11extern char *owl_function_command(char *cmd);
12extern void owl_free(void *x);
13extern SV *owl_perlconfig_curmessage2hashref();
14extern int owl_zwrite_create_and_send_from_line(char *, char *);
15extern char *owl_function_ztext_stylestrip(char *);
16extern void g;
17extern int owl_global_get_cols(void*);
18
19MODULE = owl            PACKAGE = owl           
20
21char *
22command(cmd)
23        char *cmd
24        PREINIT:
25                char *rv = NULL;
26        CODE:
27                rv = owl_function_command(cmd);
28                RETVAL = rv;   
29        OUTPUT:
30                RETVAL
31        CLEANUP:
32                if (rv) owl_free(rv);
33
34SV *
35getcurmsg()
36        CODE:
37                ST(0) = owl_perlconfig_curmessage2hashref();
38
39int
40getnumcols()
41        CODE:
42                RETVAL = owl_global_get_cols(&g);
43        OUTPUT:
44                RETVAL
45
46char *
47zephyr_getrealm()
48        CODE:
49                RETVAL = owl_zephyr_get_realm();
50        OUTPUT:
51                RETVAL
52
53char *
54zephyr_getsender()
55        CODE:
56                RETVAL = owl_zephyr_get_sender();
57        OUTPUT:
58                RETVAL
59
60void
61zephyr_zwrite(cmd,msg)
62        char *cmd
63        char *msg
64        PREINIT:
65                int i;
66        CODE:
67                i = owl_zwrite_create_and_send_from_line(cmd, msg);
68
69char *
70ztext_stylestrip(ztext)
71        char *ztext
72        PREINIT:
73                char *rv = NULL;
74        CODE:
75                rv = owl_function_ztext_stylestrip(ztext);
76                RETVAL = rv;
77        OUTPUT:
78                RETVAL
79        CLEANUP:
80                if (rv) owl_free(rv);
81
Note: See TracBrowser for help on using the repository browser.