Fixed rust, named the libraries sdk's, better examples
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "../../../include/plug.h"
|
||||
#include "dim_sdk.h"
|
||||
|
||||
PLUG_INFO("Example plugin", "0.0.0", "GPLv3")
|
||||
PLUG_INFO("Example plugin", "0.0.1", "GPLv3")
|
||||
|
||||
typedef struct plug_t {
|
||||
char* some_data;
|
||||
@@ -16,7 +16,6 @@ plug_t* p = {0};
|
||||
void plug_init() {
|
||||
p = malloc(sizeof(plug_t));
|
||||
assert(p != NULL && "Buy more ram KEKW");
|
||||
p->some_data = "hi :3";
|
||||
p->count = 0;
|
||||
|
||||
printf("Hello from plugin");
|
||||
@@ -31,7 +30,7 @@ void plug_post_reload(void *state) {
|
||||
}
|
||||
|
||||
void plug_poll(char *buf, size_t len) {
|
||||
snprintf(buf, len, "%s (%d)", p->some_data, p->count++);
|
||||
snprintf(buf, len, "Hello from C! (%d)", p->count++);
|
||||
}
|
||||
|
||||
void plug_free() {
|
||||
|
||||
Reference in New Issue
Block a user