changeset 1138:be767bfa5c2e

examples: update C plugin
author David Demelier <markand@malikania.fr>
date Wed, 02 Feb 2022 21:51:42 +0100
parents c165e975f144
children 2e09e46de490
files examples/irccd.conf.sample examples/sample-plugin.c
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/examples/irccd.conf.sample	Wed Feb 02 21:26:12 2022 +0100
+++ b/examples/irccd.conf.sample	Wed Feb 02 21:51:42 2022 +0100
@@ -15,6 +15,7 @@
 # stdout/stderr, syslog for system logging or a unique file.
 #
 # Default is non-verbose on console
+#
 
 logs to console
 
--- a/examples/sample-plugin.c	Wed Feb 02 21:26:12 2022 +0100
+++ b/examples/sample-plugin.c	Wed Feb 02 21:51:42 2022 +0100
@@ -5,7 +5,7 @@
  * error will crash the whole daemon. It is also less convenient to share and
  * update.
  *
- *   cc myplugin.c -o myplugin.so $(pkg-config --libs --cflags irccd)
+ *   cc sample-plugin.c -o example.so $(pkg-config --libs --cflags irccd)
  *
  * All symbols exported from the file must start with the plugin file basename
  * without its extension and with every non allowed character translated to
@@ -54,11 +54,11 @@
  * because irccd does not assume they are.
  */
 
-const char **
+const char * const *
 example_get_options(void)
 {
 	/* Indicate to irccd we support options `level' and `language' */
-	static const char *keys[] = {
+	static const char * const keys[] = {
 		"level",
 		"language",
 		NULL
@@ -67,11 +67,11 @@
 	return keys;
 }
 
-const char **
+const char * const *
 example_get_templates(void)
 {
 	/* Indicate to irccd we support templates `start' and `finish' */
-	static const char *keys[] = {
+	static const char * const keys[] = {
 		"start",
 		"finish",
 		NULL