summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2005-01-16 13:05:01 +0000
committerTony Vroon <chainsaw@gentoo.org>2005-01-16 13:05:01 +0000
commitbdde1bb4cf30cddf17808e294dc86c7b584c2347 (patch)
treed2d34d3be91ee5cbc2c5f35efe60fdc48fb05739 /net-irc/xchat-xsys/files
parentFixed bugs #75963 and #77094 (diff)
downloadgentoo-2-bdde1bb4cf30cddf17808e294dc86c7b584c2347.tar.gz
gentoo-2-bdde1bb4cf30cddf17808e294dc86c7b584c2347.tar.bz2
gentoo-2-bdde1bb4cf30cddf17808e294dc86c7b584c2347.zip
BMP support, 1.9.1 stable on x86. Old ebuilds cleaned.
(Portage version: 2.0.51-r13)
Diffstat (limited to 'net-irc/xchat-xsys/files')
-rw-r--r--net-irc/xchat-xsys/files/1.9.1-bmp-support.patch100
-rw-r--r--net-irc/xchat-xsys/files/digest-xchat-xsys-1.0.61
-rw-r--r--net-irc/xchat-xsys/files/digest-xchat-xsys-1.9.01
-rw-r--r--net-irc/xchat-xsys/files/digest-xchat-xsys-1.9.1-r11
4 files changed, 101 insertions, 2 deletions
diff --git a/net-irc/xchat-xsys/files/1.9.1-bmp-support.patch b/net-irc/xchat-xsys/files/1.9.1-bmp-support.patch
new file mode 100644
index 000000000000..f08767d3fc4c
--- /dev/null
+++ b/net-irc/xchat-xsys/files/1.9.1-bmp-support.patch
@@ -0,0 +1,100 @@
+--- parse.c.orig 2005-01-16 10:28:16.271149064 +0000
++++ parse.c 2005-01-16 10:38:13.400371624 +0000
+@@ -28,6 +28,45 @@
+
+ #include "xchat-plugin.h"
+
++int xs_parse_bmp(char *title, char *pos, char *time)
++{
++ char buffer[1024], *position;
++ FILE *fp = fopen("/tmp/xmms-info", "r");
++ if(fp == NULL)
++ return 1;
++
++ while(fgets(buffer, 1024, fp) != NULL)
++ {
++ if(strstr(buffer, "Position") != NULL && pos != NULL)
++ {
++ position = strstr(buffer, ":");
++ position += 2;
++ strcpy(pos, position);
++ position = strstr(pos, "\n");
++ *(position) = '\0';
++ }
++ else if(strstr(buffer, "Time") != NULL && time != NULL)
++ {
++ position = strstr(buffer, ":");
++ position += 2;
++ strcpy(time, position);
++ position = strstr(time, "\n");
++ *(position) = '\0';
++ }
++ else if(strstr(buffer, "Title") != NULL && title != NULL)
++ {
++ position = strstr(buffer, ":");
++ position += 2;
++ strcpy(title, position);
++ position = strstr(title, "\n");
++ *(position) = '\0';
++ }
++ }
++ fclose(fp);
++
++ return 0;
++}
++
+ int xs_parse_cpu(char *model, char *vendor, double *freq, char *cache, unsigned int *count)
+ {
+ char buffer[1024], *position;
+--- parse.h.orig 2005-01-16 10:36:30.070080216 +0000
++++ parse.h 2005-01-16 10:36:48.007353336 +0000
+@@ -22,6 +22,7 @@
+ #ifndef _PARSE_H_
+ #define _PARSE_H_
+
++int xs_parse_bmp(char *title, char *pos, char *time);
+ int xs_parse_cpu(char *model, char *vendor, double *freq, char *cache, unsigned int *count);
+ int xs_parse_uptime(int *weeks, int *days, int *hours, int *minutes, int *seconds);
+ int xs_parse_os(char *user, char *host, char *kernel);
+--- xsys.c.orig 2005-01-16 10:38:50.338756136 +0000
++++ xsys.c 2005-01-16 10:49:31.290316688 +0000
+@@ -46,6 +46,7 @@
+ static int disk_cb (char *word[], char *word_eol[], void *userdata);
+ static int mem_cb (char *word[], char *word_eol[], void *userdata);
+ static int video_cb (char *word[], char *word_eol[], void *userdata);
++static int bmp_cb (char *word[], char *word_eol[], void *userdata);
+
+ int xchat_plugin_init(xchat_plugin *plugin_handle, char **plugin_name,
+ char **plugin_desc, char **plugin_version, char *arg)
+@@ -80,6 +81,8 @@
+ xchat_hook_command(ph, "EMEMINFO", XCHAT_PRI_NORM, mem_cb, NULL, (void *) 1);
+ xchat_hook_command(ph, "VIDEO", XCHAT_PRI_NORM, video_cb, NULL, (void *) 0);
+ xchat_hook_command(ph, "EVIDEO", XCHAT_PRI_NORM, video_cb, NULL, (void *) 1);
++ xchat_hook_command(ph, "BMP", XCHAT_PRI_NORM, bmp_cb, NULL, (void *) 0);
++ xchat_hook_command(ph, "EBMP", XCHAT_PRI_NORM, bmp_cb, NULL, (void *) 1);
+
+ load_format();
+ xchat_printf(ph, "X-Sys 2 Loaded Succesfully");
+@@ -580,3 +583,22 @@
+ return XCHAT_EAT_ALL;
+ }
+
++static int bmp_cb(char *word[], char *word_eol[], void *userdata)
++{
++ char buffer[1024], time[16], pos[16], title[256];
++ if(xs_parse_bmp(title, pos, time) != 0)
++ {
++ xchat_printf(ph, "BMP/XMMS is not running");
++ return XCHAT_EAT_NONE;
++ }
++
++ snprintf(buffer, 1024, "%s (%s/%s)", title, pos, time);
++
++ format_output("bmp_playing", buffer);
++ if((int)userdata)
++ xchat_printf(ph, "%s", buffer);
++ else
++ xchat_commandf(ph, "say %s", buffer);
++
++ return XCHAT_EAT_ALL;
++}
diff --git a/net-irc/xchat-xsys/files/digest-xchat-xsys-1.0.6 b/net-irc/xchat-xsys/files/digest-xchat-xsys-1.0.6
deleted file mode 100644
index 24b0816ccd6e..000000000000
--- a/net-irc/xchat-xsys/files/digest-xchat-xsys-1.0.6
+++ /dev/null
@@ -1 +0,0 @@
-MD5 dc422869d02d092946d058b61f24837d xsys-1.0.6.tar.bz2 16224
diff --git a/net-irc/xchat-xsys/files/digest-xchat-xsys-1.9.0 b/net-irc/xchat-xsys/files/digest-xchat-xsys-1.9.0
deleted file mode 100644
index a9b023615b67..000000000000
--- a/net-irc/xchat-xsys/files/digest-xchat-xsys-1.9.0
+++ /dev/null
@@ -1 +0,0 @@
-MD5 7611e3c88a72c5789b11bedfbe2738a6 xsys-1.9.0.tar.bz2 8397
diff --git a/net-irc/xchat-xsys/files/digest-xchat-xsys-1.9.1-r1 b/net-irc/xchat-xsys/files/digest-xchat-xsys-1.9.1-r1
new file mode 100644
index 000000000000..27870bce7dfe
--- /dev/null
+++ b/net-irc/xchat-xsys/files/digest-xchat-xsys-1.9.1-r1
@@ -0,0 +1 @@
+MD5 1fb06c0dfc2ac280b14d705aa1ae9d63 xsys-1.9.1.tar.bz2 9679