#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <uv.h>
#include "plugin.h"
Go to the source code of this file.
◆ init_plugin_function
typedef void(* init_plugin_function) () |
Definition at line 9 of file main.c.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 15 of file main.c.
17 fprintf(stderr,
"Usage: %s [plugin1] [plugin2] ...\n",
argv[0]);
23 fprintf(stderr,
"Loading %s\n",
argv[argc]);
25 fprintf(stderr,
"Error: %s\n",
uv_dlerror(lib));
30 if (
uv_dlsym(lib,
"initialize", (
void **) &init_plugin)) {
31 fprintf(stderr,
"dlsym error: %s\n",
uv_dlerror(lib));
void * malloc(size_t size)
static static fork const void static count static fd const char const char static newpath char char argv
void(* init_plugin_function)()
UV_EXTERN int uv_dlopen(const char *filename, uv_lib_t *lib)
UV_EXTERN int uv_dlsym(uv_lib_t *lib, const char *name, void **ptr)
UV_EXTERN const char * uv_dlerror(const uv_lib_t *lib)
References argv, malloc(), uv_dlerror(), uv_dlopen(), and uv_dlsym().
◆ mfp_register()
void mfp_register |
( |
const char * |
name | ) |
|
Definition at line 11 of file main.c.
12 fprintf(stderr,
"Registered plugin \"%s\"\n",
name);
Referenced by initialize().