diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2007-12-07 13:12:46 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2007-12-07 13:12:46 +0100 |
commit | 495e6bd5df9163148676821d610c9ef863326f70 (patch) | |
tree | 024adc4a159a888e779dd92520f38b22c1d08ec4 /src/plugins/fifo | |
parent | 3c8276bc5752a607f3a16e1a4a683b5f73b3db37 (diff) | |
download | weechat-495e6bd5df9163148676821d610c9ef863326f70.zip |
Many changes in IRC plugin and plugins API
Diffstat (limited to 'src/plugins/fifo')
-rw-r--r-- | src/plugins/fifo/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/plugins/fifo/Makefile.am | 2 | ||||
-rw-r--r-- | src/plugins/fifo/fifo.c | 27 | ||||
-rw-r--r-- | src/plugins/fifo/fifo.h | 27 |
4 files changed, 18 insertions, 40 deletions
diff --git a/src/plugins/fifo/CMakeLists.txt b/src/plugins/fifo/CMakeLists.txt index c20a87a75..ae7cf4545 100644 --- a/src/plugins/fifo/CMakeLists.txt +++ b/src/plugins/fifo/CMakeLists.txt @@ -14,7 +14,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -ADD_LIBRARY(fifo MODULE fifo.c fifo.h) +ADD_LIBRARY(fifo MODULE fifo.c) SET_TARGET_PROPERTIES(fifo PROPERTIES PREFIX "") TARGET_LINK_LIBRARIES(fifo) diff --git a/src/plugins/fifo/Makefile.am b/src/plugins/fifo/Makefile.am index 3a5686cda..c2d0d49fa 100644 --- a/src/plugins/fifo/Makefile.am +++ b/src/plugins/fifo/Makefile.am @@ -20,6 +20,6 @@ libdir = ${weechat_libdir}/plugins lib_LTLIBRARIES = fifo.la -fifo_la_SOURCES = fifo.c fifo.h +fifo_la_SOURCES = fifo.c fifo_la_LDFLAGS = -module fifo_la_LIBADD = $(FIFO_LFLAGS) diff --git a/src/plugins/fifo/fifo.c b/src/plugins/fifo/fifo.c index 032c18a44..fcb74a857 100644 --- a/src/plugins/fifo/fifo.c +++ b/src/plugins/fifo/fifo.c @@ -32,21 +32,26 @@ #include <fcntl.h> #include "../weechat-plugin.h" -#include "fifo.h" -static struct t_weechat_plugin *weechat_plugin = NULL; -static int fifo_fd = -1; -static struct t_hook *fifo_fd_hook = NULL; -static char *fifo_filename; -static char *fifo_unterminated = NULL; +char plugin_name[] = "fifo"; +char plugin_version[] = "0.1"; +char plugin_description[] = "Fifo plugin for WeeChat"; + +struct t_weechat_plugin *weechat_fifo_plugin = NULL; +#define weechat_plugin weechat_fifo_plugin + +int fifo_fd = -1; +struct t_hook *fifo_fd_hook = NULL; +char *fifo_filename; +char *fifo_unterminated = NULL; /* * fifo_create: create FIFO pipe for remote control */ -static void +void fifo_create () { int filename_length; @@ -113,7 +118,7 @@ fifo_create () * fifo_remove: remove FIFO pipe */ -static void +void fifo_remove () { if (fifo_fd != -1) @@ -148,7 +153,7 @@ fifo_remove () * fifo_exec: execute a command/text received by FIFO pipe */ -static void +void fifo_exec (char *text) { char *pos_msg, *pos; @@ -211,7 +216,7 @@ fifo_exec (char *text) * fifo_read: read data in FIFO pipe */ -static int +int fifo_read () { static char buffer[4096 + 2]; @@ -298,7 +303,7 @@ fifo_read () * fifo_config_cb: fifo config callback (called when fifo option is changed) */ -static int +int fifo_config_cb (void *data, char *type, char *option, char *value) { /* make C compiler happy */ diff --git a/src/plugins/fifo/fifo.h b/src/plugins/fifo/fifo.h deleted file mode 100644 index a166e9fbd..000000000 --- a/src/plugins/fifo/fifo.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2003-2007 by FlashCode <flashcode@flashtux.org> - * See README for License detail, AUTHORS for developers list. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - - -#ifndef __WEECHAT_FIFO_H -#define __WEECHAT_FIFO_H 1 - -char plugin_name[] = "fifo"; -char plugin_version[] = "0.1"; -char plugin_description[] = "Fifo plugin for WeeChat"; - -#endif /* fifo.h */ |