source: perlglue.xs @ b20de4f

barnowl_perlaimdebianowlrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since b20de4f 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
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
10/* Yeah, we should just include owl.h, but curses and perl don't play nice. */
[f1e629d]11extern char *owl_function_command(char *cmd);
12extern void owl_free(void *x);
13extern SV *owl_perlconfig_curmessage2hashref();
[e1c4636]14extern int owl_zwrite_create_and_send_from_line(char *, char *);
[1fd0b25]15extern char *owl_function_ztext_stylestrip(char *);
[f1e629d]16extern void g;
17extern int owl_global_get_cols(void*);
[8ee73f8d]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
[f1e629d]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:
[8a54409]49                RETVAL = owl_zephyr_get_realm();
[f1e629d]50        OUTPUT:
51                RETVAL
52
53char *
54zephyr_getsender()
55        CODE:
[8a54409]56                RETVAL = owl_zephyr_get_sender();
[f1e629d]57        OUTPUT:
58                RETVAL
59
[e1c4636]60void
[f1e629d]61zephyr_zwrite(cmd,msg)
[e1c4636]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:
[1fd0b25]75                rv = owl_function_ztext_stylestrip(ztext);
[e1c4636]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.