diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2007-11-03 12:42:30 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2007-11-03 12:42:30 +0100 |
commit | 2e18be982f8f9dfb6924945fb545c87169587057 (patch) | |
tree | c32d5c319ddec4417f364be43f76c626e7a44b53 /src/plugins/demo | |
parent | f6ed0f2e5bee81382204c5c08592d7444b3db5a4 (diff) | |
download | weechat-2e18be982f8f9dfb6924945fb545c87169587057.zip |
Added demo plugin
Diffstat (limited to 'src/plugins/demo')
-rw-r--r-- | src/plugins/demo/CMakeLists.txt | 22 | ||||
-rw-r--r-- | src/plugins/demo/Makefile.am | 25 | ||||
-rw-r--r-- | src/plugins/demo/demo.c | 61 | ||||
-rw-r--r-- | src/plugins/demo/demo.h | 27 |
4 files changed, 135 insertions, 0 deletions
diff --git a/src/plugins/demo/CMakeLists.txt b/src/plugins/demo/CMakeLists.txt new file mode 100644 index 000000000..a8ed8da0a --- /dev/null +++ b/src/plugins/demo/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org> +# +# 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/>. +# + +ADD_LIBRARY(demo MODULE demo.c demo.h) +SET_TARGET_PROPERTIES(demo PROPERTIES PREFIX "") + +TARGET_LINK_LIBRARIES(demo) + +INSTALL(TARGETS demo LIBRARY DESTINATION lib/${PROJECT_NAME}/plugins) diff --git a/src/plugins/demo/Makefile.am b/src/plugins/demo/Makefile.am new file mode 100644 index 000000000..1947a77f8 --- /dev/null +++ b/src/plugins/demo/Makefile.am @@ -0,0 +1,25 @@ +# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org> +# +# 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/>. +# + +INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(DEMO_CFLAGS) + +libdir = ${weechat_libdir}/plugins + +lib_LTLIBRARIES = demo.la + +demo_la_SOURCES = demo.c demo.h +demo_la_LDFLAGS = -module +demo_la_LIBADD = $(DEMO_LFLAGS) diff --git a/src/plugins/demo/demo.c b/src/plugins/demo/demo.c new file mode 100644 index 000000000..3d81d4e66 --- /dev/null +++ b/src/plugins/demo/demo.c @@ -0,0 +1,61 @@ +/* + * 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/>. + */ + +/* demo.c: demo plugin for WeeChat */ + + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <stdlib.h> +#include <unistd.h> +#include <stdio.h> +#include <string.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> + +#include "../weechat-plugin.h" +#include "demo.h" + + +static struct t_weechat_plugin *weechat_plugin = NULL; + + +/* + * weechat_plugin_init: init demo plugin + */ + +int +weechat_plugin_init (struct t_weechat_plugin *plugin) +{ + weechat_plugin = plugin; + + return PLUGIN_RC_SUCCESS; +} + +/* + * weechat_plugin_end: end demo plugin + */ + +int +weechat_plugin_end () +{ + return PLUGIN_RC_SUCCESS; +} diff --git a/src/plugins/demo/demo.h b/src/plugins/demo/demo.h new file mode 100644 index 000000000..c55ece428 --- /dev/null +++ b/src/plugins/demo/demo.h @@ -0,0 +1,27 @@ +/* + * 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_DEMO_H +#define __WEECHAT_DEMO_H 1 + +char plugin_name[] = "demo"; +char plugin_version[] = "0.1"; +char plugin_description[] = "Demo plugin for WeeChat"; + +#endif /* demo.h */ |