diff options
author | Timo Sirainen <cras@irssi.org> | 2000-10-03 19:10:24 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-10-03 19:10:24 +0000 |
commit | 391a419a1fce87ea4fef199390e23cbf0dbee589 (patch) | |
tree | 4c5d7bfd3c10e3616bba6fba7b2d0d8e62bb8412 /src/perl/common/Rawlog.xs | |
parent | 6fc2a3412178385f241efa4c16d7e8b10d392042 (diff) | |
download | irssi-391a419a1fce87ea4fef199390e23cbf0dbee589.zip |
s/core/common/ - because make clean tried to delete it :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@715 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/common/Rawlog.xs')
-rw-r--r-- | src/perl/common/Rawlog.xs | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/src/perl/common/Rawlog.xs b/src/perl/common/Rawlog.xs new file mode 100644 index 00000000..c7422bac --- /dev/null +++ b/src/perl/common/Rawlog.xs @@ -0,0 +1,84 @@ +MODULE = Irssi PACKAGE = Irssi + +void +rawlog_set_size(lines) + int lines + +Irssi::Rawlog +rawlog_create() + +#******************************* +MODULE = Irssi PACKAGE = Irssi::Server +#******************************* + +void +rawlog_input(rawlog, str) + Irssi::Rawlog rawlog + char *str + +void +rawlog_output(rawlog, str) + Irssi::Rawlog rawlog + char *str + +void +rawlog_redirect(rawlog, str) + Irssi::Rawlog rawlog + char *str + + +#******************************* +MODULE = Irssi PACKAGE = Irssi::Rawlog PREFIX = rawlog_ +#******************************* + +void +values(rawlog) + Irssi::Rawlog rawlog +PREINIT: + HV *hv; + AV *av; + GSList *tmp; +PPCODE: + hv = newHV(); + hv_store(hv, "logging", 7, newSViv(rawlog->logging), 0); + hv_store(hv, "nlines", 6, newSViv(rawlog->nlines), 0); + + av = newAV(); + for (tmp = rawlog->lines; tmp != NULL; tmp = tmp->next) { + av_push(av, new_pv(tmp->data)); + } + hv_store(hv, "lines", 5, newRV_noinc((SV*)av), 0); + XPUSHs(sv_2mortal(newRV_noinc((SV*)hv))); + +void +rawlog_destroy(rawlog) + Irssi::Rawlog rawlog + +void +rawlog_input(rawlog, str) + Irssi::Rawlog rawlog + char *str + +void +rawlog_output(rawlog, str) + Irssi::Rawlog rawlog + char *str + +void +rawlog_redirect(rawlog, str) + Irssi::Rawlog rawlog + char *str + +void +rawlog_open(rawlog, fname) + Irssi::Rawlog rawlog + char *fname + +void +rawlog_close(rawlog) + Irssi::Rawlog rawlog + +void +rawlog_save(rawlog, fname) + Irssi::Rawlog rawlog + char *fname |