[Frugalware-darcs] setup-current: updated skel.{c,h}

VMiklos vmiklos at frugalware.org
Thu Mar 16 17:53:33 CET 2006


[updated skel.{c,h}
VMiklos <vmiklos at frugalware.org>**20051103220513
 plus added two sample (adding a new element to the list, dump the list)
] {
hunk ./src/plugins/skel.c 4
-#include "foo.h"
+#include "skel.h"
hunk ./src/plugins/skel.c 8
-	"foo",
+	"skel",
hunk ./src/plugins/skel.c 18
-int main(void)
+int run(GList **config)
hunk ./src/plugins/skel.c 20
-	printf("foo\n");
+	data_t *data;
+
+	// sample: dump the config list
+	for (i=0; i<g_list_length(*config); i++)
+	{
+		data = g_list_nth_data((*config), i);
+		printf("detected conf data: %s (%s)\n", data->name, (char*)data->data);
+	}
+	
+	// sample: adds a "content" string titled "stuff" to the config list
+	data_t *data = data_new();
+	data->name = strdup("stuff");
+	data->data = strdup("content");
+	*config = g_list_append(*config, data);
hunk ./src/plugins/skel.h 2
-int main(void);
+int run(GList **config);
}


More information about the Frugalware-darcs mailing list