From 9f5c1819362553e135ce87f9c1afc4b82aff0ffb Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 3 Dec 2001 17:05:09 +0000 Subject: [PATCH] Added processes to be extern instead of static. Also added Irssi::processes() git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2182 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/fe-exec.c | 2 +- src/fe-common/core/fe-exec.h | 2 ++ src/perl/ui/UI.xs | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/fe-common/core/fe-exec.c b/src/fe-common/core/fe-exec.c index b8aedefa..1bac8eb6 100644 --- a/src/fe-common/core/fe-exec.c +++ b/src/fe-common/core/fe-exec.c @@ -35,7 +35,7 @@ #include #include -static GSList *processes; +GSList *processes; static int signal_exec_input; static void exec_wi_destroy(EXEC_WI_REC *rec) diff --git a/src/fe-common/core/fe-exec.h b/src/fe-common/core/fe-exec.h index e82a4c7e..bebd1f82 100644 --- a/src/fe-common/core/fe-exec.h +++ b/src/fe-common/core/fe-exec.h @@ -40,6 +40,8 @@ struct PROCESS_REC { unsigned int silent:1; /* don't print "process exited with level xx" */ }; +extern GSList *processes; + void fe_exec_init(void); void fe_exec_deinit(void); diff --git a/src/perl/ui/UI.xs b/src/perl/ui/UI.xs index 04fce9fe..c3b69900 100644 --- a/src/perl/ui/UI.xs +++ b/src/perl/ui/UI.xs @@ -70,6 +70,16 @@ MODULE = Irssi::UI PACKAGE = Irssi::UI PROTOTYPES: ENABLE +void +processes() +PREINIT: + GSList *tmp; +PPCODE: + for (tmp = processes; tmp != NULL; tmp = tmp->next) { + XPUSHs(sv_2mortal(plain_bless(tmp->data, "Irssi::UI::Process"))); + } + + void init() CODE: