mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
remove deprecated defines
- PERL_STATIC_LIBS (was not tested anymore) - HAVE_GMODULE (always required) - HAVE_STATIC_IRC - HAVE_STATIC_PERL - HAVE_SOCKS (was not working properly) - USE_GREGEX (we use it)
This commit is contained in:
parent
3a5f93bbcc
commit
883510a3fd
@ -515,12 +515,12 @@ Ctrl-X - set the next server in list active
|
||||
|
||||
<p><strong>SOCKS</strong></p>
|
||||
|
||||
<p>Irssi can be compiled with socks support (<code>--with-socks</code> option to configure), which requires “dante” and routes all connections through the proxy specified in the system-wide /etc/socks.conf. This method is known to have issues in Mac OS X.</p>
|
||||
<p>Using <a href="https://github.com/rofl0r/proxychains-ng">proxychains-ng</a> is recommended for using irssi with a socks proxy.</p>
|
||||
|
||||
<p>Irssi does not support socks proxy natively.</p>
|
||||
|
||||
<p>Note that <code>/SET proxy</code> settings don’t have anything to do with socks.</p>
|
||||
|
||||
<p>Using <a href="https://github.com/rofl0r/proxychains-ng">proxychains-ng</a> is recommended over recompiling irssi.</p>
|
||||
|
||||
<p><strong>Others</strong></p>
|
||||
|
||||
<p>IRC bouncers usually work like IRC servers, and want a password. You can give it with:</p>
|
||||
@ -683,4 +683,4 @@ Ctrl-X - set the next server in list active
|
||||
/STATUSBAR <name> REMOVE <item>
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>For statusbar scripts, the item name is usually equivalent to the script name. The documentation of the script ought to tell you if this is not the case. For example, to add mail.pl before the window activity item, use: <code>/STATUSBAR window ADD -before act mail</code>.</p>
|
||||
<p>For statusbar scripts, the item name is usually equivalent to the script name. The documentation of the script ought to tell you if this is not the case. For example, to add mail.pl before the window activity item, use: <code>/STATUSBAR window ADD -before act mail</code>.</p>
|
||||
|
@ -578,15 +578,12 @@ Irssi proxy works fine with other IRC clients as well.
|
||||
|
||||
SOCKS
|
||||
|
||||
Irssi can be compiled with socks support (--with-socks option to configure),
|
||||
which requires “dante” and routes all connections through the proxy specified
|
||||
in the system-wide /etc/socks.conf. This method is known to have issues in Mac
|
||||
OS X.
|
||||
Using [4]proxychains-ng is recommended for using irssi with a socks proxy.
|
||||
|
||||
Irssi does not support socks proxy natively.
|
||||
|
||||
Note that /SET proxy settings don’t have anything to do with socks.
|
||||
|
||||
Using [4]proxychains-ng is recommended over recompiling irssi.
|
||||
|
||||
Others
|
||||
|
||||
IRC bouncers usually work like IRC servers, and want a password. You can give
|
||||
|
@ -32,7 +32,6 @@ want_fuzzer = get_option('with-fuzzer') == 'yes'
|
||||
fuzzer_lib = get_option('with-fuzzer-lib')
|
||||
fuzzer_link_language = get_option('fuzzer-link-language')
|
||||
want_proxy = get_option('with-proxy') == 'yes'
|
||||
want_gregex = get_option('disable-gregex') != 'yes'
|
||||
|
||||
require_capsicum = get_option('with-capsicum') == 'yes'
|
||||
want_capsicum = get_option('with-capsicum') != 'no'
|
||||
@ -519,9 +518,8 @@ conf = configuration_data()
|
||||
|
||||
conf.set('HAVE_CAPSICUM', have_capsicum, description : 'Build with Capsicum support')
|
||||
conf.set('HAVE_GMODULE', true)
|
||||
conf.set('HAVE_SOCKS', false, description : 'Build with socks support')
|
||||
conf.set('TERM_TRUECOLOR', true)
|
||||
conf.set('USE_GREGEX', want_gregex, description : 'use GRegex for regular expressions')
|
||||
conf.set('USE_GREGEX', true)
|
||||
conf.set10('_DARWIN_USE_64_BIT_INODE', true, description : 'Enable large inode numbers on Mac OS X 10.5.')
|
||||
conf.set_quoted('FHS_PREFIX', get_option('fhs-prefix'))
|
||||
|
||||
@ -626,7 +624,6 @@ if have_perl
|
||||
endif
|
||||
message('Install prefix ................... : ' + get_option('prefix'))
|
||||
message('')
|
||||
message('Building with GRegex ............. : ' + want_gregex.to_string('yes', 'no'))
|
||||
message('Building with Capsicum ........... : ' + have_capsicum.to_string('yes', 'no'))
|
||||
message('Building with utf8proc ........... : ' + have_libutf8proc.to_string('yes', 'no'))
|
||||
message('Building with OTR support ........ : ' + have_otr.to_string('yes', 'no'))
|
||||
|
@ -7,7 +7,6 @@ option('with-proxy', type : 'combo', description : 'Build irssi-proxy',
|
||||
option('with-perl-lib', type : 'string', description : 'Specify where to install the Perl libraries for Irssi')
|
||||
option('with-perl', type : 'combo', description : 'Build with Perl support', choices : ['auto', 'yes', 'no'])
|
||||
option('with-otr', type : 'combo', description : 'Build with OTR support', choices : ['auto', 'yes', 'no'])
|
||||
option('disable-gregex', type : 'combo', description : 'Build without GRegex (fall back to regex.h)', choices : ['no', 'yes'])
|
||||
option('disable-utf8proc', type : 'combo', description : 'Build without Julia\'s utf8proc', choices : ['auto', 'yes', 'no'])
|
||||
option('with-capsicum', type : 'combo', description : 'Build with Capsicum support', choices : ['auto', 'yes', 'no'])
|
||||
option('static-dependency', type : 'combo', description : 'Request static dependencies', choices : ['no', 'yes'])
|
||||
|
@ -37,9 +37,7 @@
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <glib.h>
|
||||
#ifdef HAVE_GMODULE
|
||||
# include <gmodule.h>
|
||||
#endif
|
||||
#include <gmodule.h>
|
||||
|
||||
typedef guint64 uoff_t;
|
||||
#define PRIuUOFF_T G_GUINT64_FORMAT
|
||||
|
@ -1,99 +0,0 @@
|
||||
#include <irssi/src/core/iregex.h>
|
||||
|
||||
Regex *
|
||||
i_regex_new (const gchar *pattern,
|
||||
GRegexCompileFlags compile_options,
|
||||
GRegexMatchFlags match_options,
|
||||
GError **error)
|
||||
{
|
||||
Regex *regex;
|
||||
char *errbuf;
|
||||
int cflags;
|
||||
int errcode, errbuf_len;
|
||||
|
||||
regex = g_new0(Regex, 1);
|
||||
cflags = REG_EXTENDED;
|
||||
if (compile_options & G_REGEX_CASELESS)
|
||||
cflags |= REG_ICASE;
|
||||
if (compile_options & G_REGEX_MULTILINE)
|
||||
cflags |= REG_NEWLINE;
|
||||
if (match_options & G_REGEX_MATCH_NOTBOL)
|
||||
cflags |= REG_NOTBOL;
|
||||
if (match_options & G_REGEX_MATCH_NOTEOL)
|
||||
cflags |= REG_NOTEOL;
|
||||
|
||||
errcode = regcomp(regex, pattern, cflags);
|
||||
if (errcode != 0) {
|
||||
errbuf_len = regerror(errcode, regex, 0, 0);
|
||||
errbuf = g_malloc(errbuf_len);
|
||||
regerror(errcode, regex, errbuf, errbuf_len);
|
||||
g_set_error(error, G_REGEX_ERROR, errcode, "%s", errbuf);
|
||||
g_free(errbuf);
|
||||
g_free(regex);
|
||||
return NULL;
|
||||
} else {
|
||||
return regex;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
i_regex_unref (Regex *regex)
|
||||
{
|
||||
regfree(regex);
|
||||
g_free(regex);
|
||||
}
|
||||
|
||||
gboolean
|
||||
i_regex_match (const Regex *regex,
|
||||
const gchar *string,
|
||||
GRegexMatchFlags match_options,
|
||||
MatchInfo **match_info)
|
||||
{
|
||||
int groups;
|
||||
int eflags;
|
||||
|
||||
g_return_val_if_fail(regex != NULL, FALSE);
|
||||
|
||||
if (match_info != NULL) {
|
||||
groups = 1 + regex->re_nsub;
|
||||
*match_info = g_new0(MatchInfo, groups);
|
||||
} else {
|
||||
groups = 0;
|
||||
}
|
||||
|
||||
eflags = 0;
|
||||
if (match_options & G_REGEX_MATCH_NOTBOL)
|
||||
eflags |= REG_NOTBOL;
|
||||
if (match_options & G_REGEX_MATCH_NOTEOL)
|
||||
eflags |= REG_NOTEOL;
|
||||
|
||||
return regexec(regex, string, groups, groups ? *match_info : NULL, eflags) == 0;
|
||||
}
|
||||
|
||||
gboolean
|
||||
i_match_info_fetch_pos (const MatchInfo *match_info,
|
||||
gint match_num,
|
||||
gint *start_pos,
|
||||
gint *end_pos)
|
||||
{
|
||||
if (start_pos != NULL)
|
||||
*start_pos = match_info[match_num].rm_so;
|
||||
if (end_pos != NULL)
|
||||
*end_pos = match_info[match_num].rm_eo;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
i_match_info_matches (const MatchInfo *match_info)
|
||||
{
|
||||
g_return_val_if_fail(match_info != NULL, FALSE);
|
||||
|
||||
return match_info[0].rm_so != -1;
|
||||
}
|
||||
|
||||
void
|
||||
i_match_info_free (MatchInfo *match_info)
|
||||
{
|
||||
g_free(match_info);
|
||||
}
|
@ -3,20 +3,10 @@
|
||||
|
||||
#include <irssi/src/common.h>
|
||||
|
||||
#ifdef USE_GREGEX
|
||||
|
||||
#include <glib.h>
|
||||
typedef GRegex Regex;
|
||||
typedef struct _MatchInfo MatchInfo;
|
||||
|
||||
#else
|
||||
|
||||
#include <regex.h>
|
||||
typedef regex_t Regex;
|
||||
typedef regmatch_t MatchInfo;
|
||||
|
||||
#endif
|
||||
|
||||
gboolean
|
||||
i_match_info_matches (const MatchInfo *match_info);
|
||||
|
||||
|
@ -1,11 +1,5 @@
|
||||
# this file is part of irssi
|
||||
|
||||
if want_gregex
|
||||
regex_impl = files('iregex-gregex.c')
|
||||
else
|
||||
regex_impl = files('iregex-regexh.c')
|
||||
endif
|
||||
|
||||
if have_capsicum
|
||||
core_capsicum_source = files('capsicum.c')
|
||||
else
|
||||
@ -24,6 +18,7 @@ libcore_a = static_library('core',
|
||||
'core.c',
|
||||
'expandos.c',
|
||||
'ignore.c',
|
||||
'iregex-gregex.c',
|
||||
'levels.c',
|
||||
'line-split.c',
|
||||
'log-away.c',
|
||||
@ -58,7 +53,6 @@ libcore_a = static_library('core',
|
||||
'write-buffer.c',
|
||||
)
|
||||
+ core_capsicum_source
|
||||
+ regex_impl
|
||||
+ [
|
||||
default_config_h,
|
||||
irssi_version_h,
|
||||
|
@ -27,8 +27,6 @@
|
||||
#include <irssi/src/core/commands.h>
|
||||
#include <irssi/src/core/misc.h>
|
||||
|
||||
#ifdef HAVE_GMODULE
|
||||
|
||||
/* Returns the module name without path, "lib" prefix or ".so" suffix */
|
||||
static char *module_get_name(const char *path, int *start, int *end)
|
||||
{
|
||||
@ -395,15 +393,6 @@ static void module_file_deinit_gmodule(MODULE_FILE_REC *file)
|
||||
g_module_close(file->gmodule);
|
||||
}
|
||||
|
||||
#else /* !HAVE_GMODULE - modules are not supported */
|
||||
|
||||
int module_load(const char *path, char **prefixes)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void module_file_unload(MODULE_FILE_REC *file)
|
||||
{
|
||||
MODULE_REC *root;
|
||||
@ -414,10 +403,8 @@ void module_file_unload(MODULE_FILE_REC *file)
|
||||
if (file->initialized)
|
||||
signal_emit("module unloaded", 2, file->root, file);
|
||||
|
||||
#ifdef HAVE_GMODULE
|
||||
if (file->gmodule != NULL)
|
||||
module_file_deinit_gmodule(file);
|
||||
#endif
|
||||
|
||||
g_free(file->name);
|
||||
g_free(file->defined_module_name);
|
||||
|
@ -16,13 +16,7 @@
|
||||
#define MODULE_DATA(rec) \
|
||||
g_hash_table_lookup((rec)->module_data, MODULE_NAME)
|
||||
|
||||
|
||||
#ifdef HAVE_GMODULE
|
||||
# define MODULE_IS_STATIC(rec) \
|
||||
((rec)->gmodule == NULL)
|
||||
#else
|
||||
# define MODULE_IS_STATIC(rec) TRUE
|
||||
#endif
|
||||
#define MODULE_IS_STATIC(rec) ((rec)->gmodule == NULL)
|
||||
|
||||
#define MODULE_ABICHECK(fn_modulename) \
|
||||
void fn_modulename ## _abicheck(int *version) \
|
||||
@ -45,9 +39,7 @@ typedef struct {
|
||||
char *defined_module_name;
|
||||
void (*module_deinit) (void);
|
||||
|
||||
#ifdef HAVE_GMODULE
|
||||
GModule *gmodule; /* static, if NULL */
|
||||
#endif
|
||||
unsigned int initialized:1;
|
||||
} MODULE_FILE_REC;
|
||||
|
||||
|
@ -1,15 +1,11 @@
|
||||
#ifndef IRSSI_CORE_NETWORK_H
|
||||
#define IRSSI_CORE_NETWORK_H
|
||||
|
||||
#ifdef HAVE_SOCKS_H
|
||||
#include <socks.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
# include <netdb.h>
|
||||
# include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#ifndef AF_INET6
|
||||
# ifdef PF_INET6
|
||||
|
@ -29,8 +29,6 @@
|
||||
|
||||
#include <irssi/src/fe-common/core/printtext.h>
|
||||
|
||||
#ifdef HAVE_GMODULE
|
||||
|
||||
static void sig_module_error(void *number, const char *data,
|
||||
const char *rootmodule, const char *submodule)
|
||||
{
|
||||
@ -271,22 +269,3 @@ void fe_modules_deinit(void)
|
||||
command_unbind("load", (SIGNAL_FUNC) cmd_load);
|
||||
command_unbind("unload", (SIGNAL_FUNC) cmd_unload);
|
||||
}
|
||||
|
||||
#else /* !HAVE_GMODULE */
|
||||
|
||||
static void cmd_load(const char *data)
|
||||
{
|
||||
printtext(NULL, NULL, MSGLEVEL_CLIENTERROR,
|
||||
"Dynamic modules loading not supported");
|
||||
}
|
||||
|
||||
void fe_modules_init(void)
|
||||
{
|
||||
command_bind("load", NULL, (SIGNAL_FUNC) cmd_load);
|
||||
}
|
||||
|
||||
void fe_modules_deinit(void)
|
||||
{
|
||||
command_unbind("load", (SIGNAL_FUNC) cmd_load);
|
||||
}
|
||||
#endif
|
||||
|
@ -30,11 +30,6 @@
|
||||
#include <irssi/src/fe-common/irc/fe-irc-server.h>
|
||||
#include <irssi/src/fe-common/irc/fe-irc-channels.h>
|
||||
|
||||
#ifdef HAVE_STATIC_IRC
|
||||
void fe_irc_modules_init(void);
|
||||
void fe_irc_modules_deinit(void);
|
||||
#endif
|
||||
|
||||
void fe_irc_queries_init(void);
|
||||
void fe_irc_queries_deinit(void);
|
||||
|
||||
@ -105,18 +100,10 @@ void fe_common_irc_init(void)
|
||||
|
||||
settings_check();
|
||||
module_register("irc", "fe-common");
|
||||
|
||||
#ifdef HAVE_STATIC_IRC
|
||||
fe_irc_modules_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
void fe_common_irc_deinit(void)
|
||||
{
|
||||
#ifdef HAVE_STATIC_IRC
|
||||
fe_irc_modules_deinit();
|
||||
#endif
|
||||
|
||||
fe_irc_channels_deinit();
|
||||
fe_irc_queries_deinit();
|
||||
fe_irc_messages_deinit();
|
||||
|
@ -1,6 +0,0 @@
|
||||
#ifdef HAVE_STATIC_IRC
|
||||
void fe_irc_dcc_init(void);void fe_irc_notifylist_init(void);
|
||||
void fe_irc_notifylist_deinit(void);void fe_irc_dcc_deinit(void);
|
||||
void fe_irc_modules_init(void) { fe_irc_dcc_init(); fe_irc_notifylist_init(); }
|
||||
void fe_irc_modules_deinit(void) { fe_irc_notifylist_deinit(); fe_irc_dcc_deinit(); }
|
||||
#endif
|
@ -20,8 +20,6 @@ libfe_common_irc_a = static_library('fe_common_irc',
|
||||
'fe-whois.c',
|
||||
'irc-completion.c',
|
||||
'module-formats.c',
|
||||
|
||||
'irc-modules.c',
|
||||
),
|
||||
include_directories : rootinc,
|
||||
implicit_include_directories : false,
|
||||
|
@ -26,16 +26,6 @@
|
||||
#include <irssi/src/core/settings.h>
|
||||
#include <irssi/src/core/core.h>
|
||||
|
||||
#ifdef HAVE_STATIC_PERL
|
||||
void perl_core_init(void);
|
||||
void perl_core_deinit(void);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STATIC_IRC
|
||||
void irc_init(void);
|
||||
void irc_deinit(void);
|
||||
#endif
|
||||
|
||||
static GMainLoop *main_loop;
|
||||
static char *autoload_module;
|
||||
static int reload;
|
||||
@ -73,19 +63,12 @@ void noui_init(void)
|
||||
|
||||
irssi_gui = IRSSI_GUI_NONE;
|
||||
core_init();
|
||||
#ifdef HAVE_STATIC_IRC
|
||||
irc_init();
|
||||
#endif
|
||||
|
||||
module_register("core", "fe-none");
|
||||
|
||||
signal_add("reload", (SIGNAL_FUNC) sig_reload);
|
||||
signal_add("gui exit", (SIGNAL_FUNC) sig_exit);
|
||||
|
||||
#ifdef HAVE_STATIC_PERL
|
||||
perl_core_init();
|
||||
#endif
|
||||
|
||||
autoload_modules();
|
||||
|
||||
signal_emit("irssi init finished", 0);
|
||||
@ -93,15 +76,8 @@ void noui_init(void)
|
||||
|
||||
void noui_deinit(void)
|
||||
{
|
||||
#ifdef HAVE_STATIC_PERL
|
||||
perl_core_deinit();
|
||||
#endif
|
||||
|
||||
signal_remove("reload", (SIGNAL_FUNC) sig_reload);
|
||||
signal_remove("gui exit", (SIGNAL_FUNC) sig_exit);
|
||||
#ifdef HAVE_STATIC_IRC
|
||||
irc_deinit();
|
||||
#endif
|
||||
core_deinit();
|
||||
}
|
||||
|
||||
@ -118,9 +94,6 @@ int main(int argc, char **argv)
|
||||
args_execute(argc, argv);
|
||||
core_preinit(argv[0]);
|
||||
|
||||
#ifdef HAVE_SOCKS
|
||||
SOCKSinit(argv[0]);
|
||||
#endif
|
||||
noui_init();
|
||||
|
||||
if (autoload_module == NULL)
|
||||
|
@ -46,27 +46,6 @@
|
||||
#include <signal.h>
|
||||
#include <locale.h>
|
||||
|
||||
#ifdef HAVE_STATIC_PERL
|
||||
void perl_core_init(void);
|
||||
void perl_core_deinit(void);
|
||||
|
||||
void fe_perl_init(void);
|
||||
void fe_perl_deinit(void);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STATIC_OTR
|
||||
void otr_core_init(void);
|
||||
void otr_core_deinit(void);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STATIC_IRC
|
||||
void irc_init(void);
|
||||
void irc_deinit(void);
|
||||
|
||||
void fe_common_irc_init(void);
|
||||
void fe_common_irc_deinit(void);
|
||||
#endif
|
||||
|
||||
void gui_expandos_init(void);
|
||||
void gui_expandos_deinit(void);
|
||||
|
||||
@ -170,13 +149,7 @@ static void textui_init(void)
|
||||
|
||||
irssi_gui = IRSSI_GUI_TEXT;
|
||||
core_init();
|
||||
#ifdef HAVE_STATIC_IRC
|
||||
irc_init();
|
||||
#endif
|
||||
fe_common_core_init();
|
||||
#ifdef HAVE_STATIC_IRC
|
||||
fe_common_irc_init();
|
||||
#endif
|
||||
|
||||
theme_register(gui_text_formats);
|
||||
signal_add("settings userinfo changed", (SIGNAL_FUNC) sig_settings_userinfo_changed);
|
||||
@ -222,15 +195,6 @@ static void textui_finish_init(void)
|
||||
|
||||
module_register("core", "fe-text");
|
||||
|
||||
#ifdef HAVE_STATIC_PERL
|
||||
perl_core_init();
|
||||
fe_perl_init();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STATIC_OTR
|
||||
otr_core_init();
|
||||
#endif
|
||||
|
||||
dirty_check();
|
||||
|
||||
/* Temporarily raise the fatal level to abort on config errors. */
|
||||
@ -273,15 +237,6 @@ static void textui_deinit(void)
|
||||
while (modules != NULL)
|
||||
module_unload(modules->data);
|
||||
|
||||
#ifdef HAVE_STATIC_PERL
|
||||
perl_core_deinit();
|
||||
fe_perl_deinit();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STATIC_OTR
|
||||
otr_core_deinit();
|
||||
#endif
|
||||
|
||||
dirty_check(); /* one last time to print any quit messages */
|
||||
signal_remove("settings userinfo changed", (SIGNAL_FUNC) sig_settings_userinfo_changed);
|
||||
signal_remove("module autoload", (SIGNAL_FUNC) sig_autoload_modules);
|
||||
@ -307,13 +262,7 @@ static void textui_deinit(void)
|
||||
|
||||
theme_unregister();
|
||||
|
||||
#ifdef HAVE_STATIC_IRC
|
||||
fe_common_irc_deinit();
|
||||
#endif
|
||||
fe_common_core_deinit();
|
||||
#ifdef HAVE_STATIC_IRC
|
||||
irc_deinit();
|
||||
#endif
|
||||
core_deinit();
|
||||
}
|
||||
|
||||
@ -354,10 +303,6 @@ int main(int argc, char **argv)
|
||||
|
||||
check_files();
|
||||
|
||||
#ifdef HAVE_SOCKS
|
||||
SOCKSinit(argv[0]);
|
||||
#endif
|
||||
|
||||
/* setlocale() must be called at the beginning before any calls that
|
||||
affect it, especially regexps seem to break if they're generated
|
||||
before this call.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef IRSSI_IRC_DCC_DCC_QUEUE_H_
|
||||
#define IRSSI_IRC_DCC_DCC_QUEUE_H_
|
||||
#ifndef IRSSI_IRC_DCC_DCC_QUEUE_H
|
||||
#define IRSSI_IRC_DCC_DCC_QUEUE_H
|
||||
|
||||
#include <irssi/src/irc/dcc/dcc-chat.h>
|
||||
|
||||
|
@ -1,7 +0,0 @@
|
||||
#ifdef HAVE_STATIC_IRC
|
||||
void irc_core_init(void); void irc_core_deinit(void);
|
||||
void irc_dcc_init(void);void irc_flood_init(void);void irc_notifylist_init(void);
|
||||
void irc_notifylist_deinit(void);void irc_flood_deinit(void);void irc_dcc_deinit(void);
|
||||
void irc_init(void) { irc_core_init(); irc_dcc_init(); irc_flood_init(); irc_notifylist_init(); }
|
||||
void irc_deinit(void) { irc_notifylist_deinit(); irc_flood_deinit(); irc_dcc_deinit(); irc_core_deinit(); }
|
||||
#endif
|
@ -1,9 +1,7 @@
|
||||
# NOTE: this is printed through printf()-like function,
|
||||
# so no extra percent characters.
|
||||
|
||||
# %%d : must be first - 1 if perl libraries are to be linked
|
||||
# statically with irssi binary, 0 if not
|
||||
# %%s : must be second - use Irssi; use Irssi::Irc; etc..
|
||||
# %%s : use Irssi; use Irssi::Irc; etc..
|
||||
package Irssi::Core;
|
||||
|
||||
use Symbol;
|
||||
@ -15,7 +13,7 @@ $SIG{__WARN__} = sub {
|
||||
};
|
||||
|
||||
sub is_static {
|
||||
return %d;
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub destroy {
|
||||
|
@ -30,7 +30,6 @@ libperl_core_sm = shared_module('perl_core',
|
||||
c_args : [
|
||||
def_scriptdir,
|
||||
def_perl_use_lib,
|
||||
'-D' + 'PERL_STATIC_LIBS' + '=' + 0.to_string(),
|
||||
],
|
||||
include_directories : [ rootinc ] + [ generated_files_inc ],
|
||||
implicit_include_directories : false,
|
||||
|
@ -77,31 +77,10 @@ static void perl_script_destroy(PERL_SCRIPT_REC *script)
|
||||
|
||||
extern void boot_DynaLoader(pTHX_ CV* cv);
|
||||
|
||||
#if PERL_STATIC_LIBS == 1
|
||||
extern void boot_Irssi(pTHX_ CV *cv);
|
||||
|
||||
XS(boot_Irssi_Core)
|
||||
{
|
||||
dXSARGS;
|
||||
PERL_UNUSED_VAR(items);
|
||||
|
||||
irssi_callXS(boot_Irssi, cv, mark);
|
||||
irssi_boot(Irc);
|
||||
irssi_boot(UI);
|
||||
irssi_boot(TextUI);
|
||||
/* Make sure to keep this in line with perl_scripts_deinit below. */
|
||||
XSRETURN_YES;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void xs_init(pTHX)
|
||||
{
|
||||
dXSUB_SYS;
|
||||
|
||||
#if PERL_STATIC_LIBS == 1
|
||||
newXS("Irssi::Core::boot_Irssi_Core", boot_Irssi_Core, __FILE__);
|
||||
#endif
|
||||
|
||||
/* boot the dynaloader too, if we want to use some
|
||||
other dynamic modules.. */
|
||||
newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, __FILE__);
|
||||
@ -120,14 +99,11 @@ void perl_scripts_init(void)
|
||||
perl_construct(my_perl);
|
||||
|
||||
perl_parse(my_perl, xs_init, G_N_ELEMENTS(perl_args)-1, perl_args, NULL);
|
||||
#if PERL_STATIC_LIBS == 1
|
||||
perl_eval_pv("Irssi::Core::->boot_Irssi_Core(0.9);", TRUE);
|
||||
#endif
|
||||
|
||||
perl_common_start();
|
||||
|
||||
use_code = perl_get_use_list();
|
||||
code = g_strdup_printf(irssi_core_code, PERL_STATIC_LIBS, use_code);
|
||||
code = g_strdup_printf(irssi_core_code, use_code);
|
||||
perl_eval_pv(code, TRUE);
|
||||
|
||||
g_free(code);
|
||||
@ -153,17 +129,6 @@ void perl_scripts_deinit(void)
|
||||
/* Unload all perl libraries loaded with dynaloader */
|
||||
perl_eval_pv("foreach my $lib (@DynaLoader::dl_modules) { if ($lib =~ /^Irssi\\b/) { $lib .= '::deinit();'; eval $lib; } }", TRUE);
|
||||
|
||||
#if PERL_STATIC_LIBS == 1
|
||||
/* If perl is statically built we should manually deinit the modules
|
||||
which are booted in boot_Irssi_Core above */
|
||||
perl_eval_pv("foreach my $lib (qw("
|
||||
"Irssi" " "
|
||||
"Irssi::Irc" " "
|
||||
"Irssi::UI" " "
|
||||
"Irssi::TextUI"
|
||||
")) { eval $lib . '::deinit();'; }", TRUE);
|
||||
#endif
|
||||
|
||||
/* We could unload all libraries .. but this crashes with some
|
||||
libraries, probably because we don't call some deinit function..
|
||||
Anyway, this would free some memory with /SCRIPT RESET, but it
|
||||
|
Loading…
Reference in New Issue
Block a user