source:
perlglue.xs
@
bc220b2
Last change on this file since bc220b2 was 1152d45, checked in by Nelson Elhage <nelhage@mit.edu>, 18 years ago | |
---|---|
|
|
File size: 1.1 KB |
Rev | Line | |
---|---|---|
[83a9b63] | 1 | static 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" | |
12 | SV *owl_perlconfig_curmessage2hashref(void); | |
[8ee73f8d] | 13 | |
14 | MODULE = owl PACKAGE = owl | |
15 | ||
16 | char * | |
17 | command(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] | 29 | SV * |
30 | getcurmsg() | |
31 | CODE: | |
32 | ST(0) = owl_perlconfig_curmessage2hashref(); | |
33 | ||
34 | int | |
35 | getnumcols() | |
36 | CODE: | |
37 | RETVAL = owl_global_get_cols(&g); | |
38 | OUTPUT: | |
39 | RETVAL | |
40 | ||
41 | char * | |
42 | zephyr_getrealm() | |
43 | CODE: | |
[8a54409] | 44 | RETVAL = owl_zephyr_get_realm(); |
[f1e629d] | 45 | OUTPUT: |
46 | RETVAL | |
47 | ||
48 | char * | |
49 | zephyr_getsender() | |
50 | CODE: | |
[8a54409] | 51 | RETVAL = owl_zephyr_get_sender(); |
[f1e629d] | 52 | OUTPUT: |
53 | RETVAL | |
54 | ||
[e1c4636] | 55 | void |
[f1e629d] | 56 | zephyr_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 | ||
64 | char * | |
65 | ztext_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.