naev 0.11.5
plugin.c File Reference

Handles plugins to augment data. More...

#include "plugin.h"
#include <pcre2.h>
#include "log.h"
#include "array.h"
#include "nfile.h"
#include "nxml.h"
#include "physfs_archiver_blacklist.h"

Go to the source code of this file.

Macros

#define PCRE2_CODE_UNIT_WIDTH   8
 

Functions

static int plugin_parse (plugin_t *plg, const char *file, const char *path)
 Parses a plugin description file.
 
static int plugin_cmp (const void *a, const void *b)
 For qsort on plugins.
 
int plugin_init (void)
 Initialize and loads all the available plugins.
 
void plugin_exit (void)
 Exits the plugin stuff.
 
const char * plugin_name (const plugin_t *plg)
 Tries to tget the name of a plugin.
 
int plugin_check (void)
 Checks to see if the plugins are self-declared compatible with Naev.
 
const plugin_tplugin_list (void)
 Returns the list of all the plugins.
 

Variables

static plugin_tplugins
 

Detailed Description

Handles plugins to augment data.

Definition in file plugin.c.

Macro Definition Documentation

◆ PCRE2_CODE_UNIT_WIDTH

#define PCRE2_CODE_UNIT_WIDTH   8

Definition at line 17 of file plugin.c.

Function Documentation

◆ plugin_check()

int plugin_check ( void )

Checks to see if the plugins are self-declared compatible with Naev.

Returns
Number of incompatible plugins.

Definition at line 230 of file plugin.c.

◆ plugin_cmp()

static int plugin_cmp ( const void * a,
const void * b )
static

For qsort on plugins.

Definition at line 97 of file plugin.c.

◆ plugin_exit()

void plugin_exit ( void )

Exits the plugin stuff.

Definition at line 195 of file plugin.c.

◆ plugin_init()

int plugin_init ( void )

Initialize and loads all the available plugins.

Returns
0 on success.

Definition at line 115 of file plugin.c.

◆ plugin_list()

const plugin_t * plugin_list ( void )

Returns the list of all the plugins.

Returns
List of the loaded plugins.

Definition at line 281 of file plugin.c.

◆ plugin_name()

const char * plugin_name ( const plugin_t * plg)

Tries to tget the name of a plugin.

Parameters
plgPlugin to try to get name of.
Returns
Name of the plugin.

Definition at line 218 of file plugin.c.

◆ plugin_parse()

static int plugin_parse ( plugin_t * plg,
const char * file,
const char * path )
static

Parses a plugin description file.

Definition at line 31 of file plugin.c.

Variable Documentation

◆ plugins

plugin_t* plugins
static

Definition at line 26 of file plugin.c.