diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-util.c | 96 | ||||
-rw-r--r-- | src/core/wee-util.h | 2 | ||||
-rw-r--r-- | src/plugins/alias/alias.c | 1 | ||||
-rw-r--r-- | src/plugins/aspell/weechat-aspell.c | 1 | ||||
-rw-r--r-- | src/plugins/charset/charset.c | 1 | ||||
-rw-r--r-- | src/plugins/demo/demo.c | 1 | ||||
-rw-r--r-- | src/plugins/fifo/fifo.c | 1 | ||||
-rw-r--r-- | src/plugins/irc/irc.c | 1 | ||||
-rw-r--r-- | src/plugins/jabber/jabber.c | 1 | ||||
-rw-r--r-- | src/plugins/logger/logger.c | 1 | ||||
-rw-r--r-- | src/plugins/plugin.c | 35 | ||||
-rw-r--r-- | src/plugins/relay/relay.c | 1 | ||||
-rw-r--r-- | src/plugins/scripts/lua/weechat-lua.c | 1 | ||||
-rw-r--r-- | src/plugins/scripts/perl/weechat-perl.c | 1 | ||||
-rw-r--r-- | src/plugins/scripts/python/weechat-python.c | 1 | ||||
-rw-r--r-- | src/plugins/scripts/ruby/weechat-ruby.c | 1 | ||||
-rw-r--r-- | src/plugins/scripts/tcl/weechat-tcl.c | 1 | ||||
-rw-r--r-- | src/plugins/trigger/trigger.c | 1 | ||||
-rw-r--r-- | src/plugins/weechat-plugin.h | 5 | ||||
-rw-r--r-- | src/plugins/xfer/xfer.c | 1 |
20 files changed, 2 insertions, 152 deletions
diff --git a/src/core/wee-util.c b/src/core/wee-util.c index 39d235f1f..1aef2ac6f 100644 --- a/src/core/wee-util.c +++ b/src/core/wee-util.c @@ -355,99 +355,3 @@ util_search_full_lib_name (const char *filename, const char *sys_directory) return name_with_ext; } - -/* - * util_weechat_version_cmp: compare 2 weechat versions - * return -1 if version1 < version2 - * +1 if version1 > version2 - * 0 if version1 = version2 - */ - -int -util_weechat_version_cmp (const char *version1, const char *version2) -{ - char *v1, *v2, *ptr_v1, *ptr_v2, *pos1, *pos2, *next1, *next2; - char *error1, *error2; - int rc; - long number1, number2; - - if (!version1 && !version2) - return 0; - if (!version1 && version2) - return -1; - if (version1 && !version2) - return 1; - - v1 = strdup (version1); - v2 = strdup (version2); - - rc = 0; - - if (v1 && v2) - { - ptr_v1 = v1; - ptr_v2 = v2; - while (ptr_v1 && ptr_v1[0] && ptr_v2 && ptr_v2[0]) - { - pos1 = ptr_v1; - while (pos1[0] && isdigit (pos1[0])) - { - pos1++; - } - pos2 = ptr_v2; - while (pos2[0] && isdigit (pos2[0])) - { - pos2++; - } - next1 = (pos1[0] == '\0') ? NULL : pos1 + 1; - next2 = (pos2[0] == '\0') ? NULL : pos2 + 1; - pos1[0] = '\0'; - pos2[0] = '\0'; - - error1 = NULL; - number1 = strtol (ptr_v1, &error1, 10); - error2 = NULL; - number2 = strtol (ptr_v2, &error2, 10); - if (error1 && !error1[0] && (!error2 || error2[0])) - { - rc = 1; - break; - } - if (error2 && !error2[0] && (!error1 || error1[0])) - { - rc = 1; - break; - } - if (error1 && !error1[0] && error2 && !error2[0]) - { - if (number1 > number2) - { - rc = 1; - break; - } - if (number1 < number2) - { - rc = -1; - break; - } - } - ptr_v1 = next1; - while (ptr_v1 && ptr_v1[0] && !isdigit (ptr_v1[0])) - { - ptr_v1++; - } - ptr_v2 = next2; - while (ptr_v2 && ptr_v2[0] && !isdigit (ptr_v2[0])) - { - ptr_v2++; - } - } - } - - if (v1) - free (v1); - if (v2) - free (v2); - - return rc; -} diff --git a/src/core/wee-util.h b/src/core/wee-util.h index 8f6ec3981..5b9d8230a 100644 --- a/src/core/wee-util.h +++ b/src/core/wee-util.h @@ -33,7 +33,5 @@ extern void util_exec_on_files (const char *directory, void *data, const char *filename)); extern char *util_search_full_lib_name (const char *filename, const char *sys_directory); -extern int util_weechat_version_cmp (const char *version1, - const char *version2); #endif /* wee-util.h */ diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c index 0b51c9bdd..fb215d1b8 100644 --- a/src/plugins/alias/alias.c +++ b/src/plugins/alias/alias.c @@ -32,7 +32,6 @@ WEECHAT_PLUGIN_NAME(ALIAS_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Alias plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_alias_plugin = NULL; diff --git a/src/plugins/aspell/weechat-aspell.c b/src/plugins/aspell/weechat-aspell.c index 98095f38a..c476c685b 100644 --- a/src/plugins/aspell/weechat-aspell.c +++ b/src/plugins/aspell/weechat-aspell.c @@ -35,7 +35,6 @@ WEECHAT_PLUGIN_NAME(ASPELL_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Aspell plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_aspell_plugin = NULL; diff --git a/src/plugins/charset/charset.c b/src/plugins/charset/charset.c index d9c48d067..a11841f1b 100644 --- a/src/plugins/charset/charset.c +++ b/src/plugins/charset/charset.c @@ -36,7 +36,6 @@ WEECHAT_PLUGIN_NAME(CHARSET_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Charset plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); #define CHARSET_CONFIG_NAME "charset" diff --git a/src/plugins/demo/demo.c b/src/plugins/demo/demo.c index 112394c79..7bd1061dc 100644 --- a/src/plugins/demo/demo.c +++ b/src/plugins/demo/demo.c @@ -37,7 +37,6 @@ WEECHAT_PLUGIN_NAME(DEMO_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Demo plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_demo_plugin = NULL; diff --git a/src/plugins/fifo/fifo.c b/src/plugins/fifo/fifo.c index 5e8fd14db..3b48be23d 100644 --- a/src/plugins/fifo/fifo.c +++ b/src/plugins/fifo/fifo.c @@ -36,7 +36,6 @@ WEECHAT_PLUGIN_NAME(FIFO_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Fifo plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_fifo_plugin = NULL; diff --git a/src/plugins/irc/irc.c b/src/plugins/irc/irc.c index d349fe7b7..46f41c1e1 100644 --- a/src/plugins/irc/irc.c +++ b/src/plugins/irc/irc.c @@ -43,7 +43,6 @@ WEECHAT_PLUGIN_NAME(IRC_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("IRC (Internet Relay Chat) plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_irc_plugin = NULL; diff --git a/src/plugins/jabber/jabber.c b/src/plugins/jabber/jabber.c index 9f8f6a348..f83de9231 100644 --- a/src/plugins/jabber/jabber.c +++ b/src/plugins/jabber/jabber.c @@ -38,7 +38,6 @@ WEECHAT_PLUGIN_NAME(JABBER_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Jabber plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_jabber_plugin = NULL; diff --git a/src/plugins/logger/logger.c b/src/plugins/logger/logger.c index 96be9608c..62d17e9e0 100644 --- a/src/plugins/logger/logger.c +++ b/src/plugins/logger/logger.c @@ -47,7 +47,6 @@ WEECHAT_PLUGIN_NAME(LOGGER_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Logger plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_logger_plugin = NULL; diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 913ebcbf9..037bb4f1a 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -156,7 +156,7 @@ plugin_load (const char *filename) char *ptr_home, *full_name, *full_name2; void *handle; char *name, *api_version, *author, *description, *version; - char *weechat_version, *license, *charset; + char *license, *charset; t_weechat_init_func *init_func; int rc, i, argc; char **argv; @@ -302,34 +302,6 @@ plugin_load (const char *filename) return NULL; } - /* look for WeeChat version required for plugin */ - weechat_version = dlsym (handle, "weechat_plugin_weechat_version"); - if (!weechat_version) - { - gui_chat_printf (NULL, - _("%sError: symbol \"%s\" not found in " - "plugin \"%s\", failed to load"), - gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], - "weechat_plugin_weechat_version", - full_name); - dlclose (handle); - free (full_name); - return NULL; - } - if (util_weechat_version_cmp (PACKAGE_VERSION, weechat_version) != 0) - { - gui_chat_printf (NULL, - _("%sError: plugin \"%s\" is compiled for WeeChat " - "%s and you are running version %s, failed to " - "load"), - gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], - full_name, - weechat_version, PACKAGE_VERSION); - dlclose (handle); - free (full_name); - return NULL; - } - /* look for plugin license */ license = dlsym (handle, "weechat_plugin_license"); if (!license) @@ -374,7 +346,6 @@ plugin_load (const char *filename) new_plugin->description = strdup (description); new_plugin->author = strdup (author); new_plugin->version = strdup (version); - new_plugin->weechat_version = strdup (weechat_version); new_plugin->license = strdup (license); new_plugin->charset = (charset) ? strdup (charset) : NULL; ptr_option = config_weechat_debug_get (name); @@ -825,8 +796,6 @@ plugin_remove (struct t_weechat_plugin *plugin) free (plugin->author); if (plugin->version) free (plugin->version); - if (plugin->weechat_version) - free (plugin->weechat_version); if (plugin->license) free (plugin->license); if (plugin->charset) @@ -1057,8 +1026,6 @@ plugin_add_to_infolist (struct t_infolist *infolist, return 0; if (!infolist_new_var_string (ptr_item, "version", plugin->version)) return 0; - if (!infolist_new_var_string (ptr_item, "weechat_version", plugin->weechat_version)) - return 0; if (!infolist_new_var_string (ptr_item, "license", plugin->license)) return 0; if (!infolist_new_var_string (ptr_item, "charset", plugin->charset)) diff --git a/src/plugins/relay/relay.c b/src/plugins/relay/relay.c index 632c2ac10..901345da5 100644 --- a/src/plugins/relay/relay.c +++ b/src/plugins/relay/relay.c @@ -36,7 +36,6 @@ WEECHAT_PLUGIN_DESCRIPTION("Network communication between WeeChat and " "remote application"); WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_relay_plugin = NULL; diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/weechat-lua.c index 7020034dc..8f19b8e97 100644 --- a/src/plugins/scripts/lua/weechat-lua.c +++ b/src/plugins/scripts/lua/weechat-lua.c @@ -37,7 +37,6 @@ WEECHAT_PLUGIN_NAME(LUA_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Lua plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_lua_plugin; diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c index ac968f930..8c9ca43a4 100644 --- a/src/plugins/scripts/perl/weechat-perl.c +++ b/src/plugins/scripts/perl/weechat-perl.c @@ -35,7 +35,6 @@ WEECHAT_PLUGIN_NAME(PERL_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Perl plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_perl_plugin = NULL; diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c index 2e8056425..19bcf9e0e 100644 --- a/src/plugins/scripts/python/weechat-python.c +++ b/src/plugins/scripts/python/weechat-python.c @@ -33,7 +33,6 @@ WEECHAT_PLUGIN_NAME(PYTHON_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Python plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_python_plugin = NULL; diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c index 5d3c7db14..b59b8b213 100644 --- a/src/plugins/scripts/ruby/weechat-ruby.c +++ b/src/plugins/scripts/ruby/weechat-ruby.c @@ -36,7 +36,6 @@ WEECHAT_PLUGIN_NAME(RUBY_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Ruby plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_ruby_plugin = NULL; diff --git a/src/plugins/scripts/tcl/weechat-tcl.c b/src/plugins/scripts/tcl/weechat-tcl.c index 3a77e418b..757652ba2 100644 --- a/src/plugins/scripts/tcl/weechat-tcl.c +++ b/src/plugins/scripts/tcl/weechat-tcl.c @@ -38,7 +38,6 @@ WEECHAT_PLUGIN_NAME(TCL_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Tcl plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("Dmitry Kobylin <fnfal@academ.tsc.ru>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_tcl_plugin = NULL; diff --git a/src/plugins/trigger/trigger.c b/src/plugins/trigger/trigger.c index e7ff0a225..0a8f75d78 100644 --- a/src/plugins/trigger/trigger.c +++ b/src/plugins/trigger/trigger.c @@ -33,7 +33,6 @@ WEECHAT_PLUGIN_NAME("trigger"); WEECHAT_PLUGIN_DESCRIPTION("Trigger plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); t_weechat_trigger *weechat_trigger_list = NULL; diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index d8bd0d8f3..53d68c1d9 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -33,7 +33,7 @@ struct t_infolist; struct t_weelist; /* API version (used to check that plugin has same API and can be loaded) */ -#define WEECHAT_PLUGIN_API_VERSION "20090608-01" +#define WEECHAT_PLUGIN_API_VERSION "20090612-01" /* macros for defining plugin infos */ #define WEECHAT_PLUGIN_NAME(__name) \ @@ -45,8 +45,6 @@ struct t_weelist; char weechat_plugin_description[] = __desc; #define WEECHAT_PLUGIN_VERSION(__version) \ char weechat_plugin_version[] = __version; -#define WEECHAT_PLUGIN_WEECHAT_VERSION(__version) \ - char weechat_plugin_weechat_version[] = __version; #define WEECHAT_PLUGIN_LICENSE(__license) \ char weechat_plugin_license[] = __license; @@ -123,7 +121,6 @@ struct t_weechat_plugin char *description; /* description */ char *author; /* author */ char *version; /* plugin version */ - char *weechat_version; /* weechat version required */ char *license; /* license */ char *charset; /* charset used by plugin */ int debug; /* debug level for plugin (0=off) */ diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index 8ebd638fc..0f12668ec 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -47,7 +47,6 @@ WEECHAT_PLUGIN_DESCRIPTION("Xfer (file transfer and direct chat) plugin for " "WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>"); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_xfer_plugin = NULL; |