Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
gvplugin.c File Reference
#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <cgraph/agxbuf.h>
#include <common/types.h>
#include <gvc/gvc.h>
#include <gvc/gvplugin.h>
#include <gvc/gvcjob.h>
#include <gvc/gvcint.h>
#include <gvc/gvcproc.h>
#include <gvc/gvio.h>
#include <common/const.h>
#include <cgraph/alloc.h>
#include <cgraph/list.h>
#include <cgraph/startswith.h>
#include <cgraph/strcasecmp.h>
#include <cgraph/strview.h>
Include dependency graph for gvplugin.c:

Go to the source code of this file.

Macros

#define ELEM(x)   #x,
 

Functions

api_t gvplugin_api (const char *str)
 
char * gvplugin_api_name (api_t api)
 
bool gvplugin_install (GVC_t *gvc, api_t api, const char *typestr, int quality, gvplugin_package_t *package, gvplugin_installed_t *typeptr)
 
static void gvplugin_activate (GVC_t *gvc, api_t api, const char *typestr, const char *name, const char *plugin_path, gvplugin_installed_t *typeptr)
 
gvplugin_library_tgvplugin_library_load (GVC_t *gvc, const char *pathname)
 
gvplugin_available_tgvplugin_load (GVC_t *gvc, api_t api, const char *str, FILE *debug)
 
char * gvplugin_list (GVC_t *gvc, api_t api, const char *str)
 
char ** gvPluginList (GVC_t *gvc, const char *kind, int *sz)
 
void gvplugin_write_status (GVC_t *gvc)
 
Agraph_tgvplugin_graph (GVC_t *gvc)
 

Variables

static char * api_names [] = { APIS }
 

Macro Definition Documentation

◆ ELEM

#define ELEM (   x)    #x,

Definition at line 44 of file gvplugin.c.

Function Documentation

◆ gvplugin_activate()

static void gvplugin_activate ( GVC_t gvc,
api_t  api,
const char *  typestr,
const char *  name,
const char *  plugin_path,
gvplugin_installed_t typeptr 
)
static

Definition at line 132 of file gvplugin.c.

References GVC_s::apis, gvc, gvplugin_package_s::name, gvplugin_available_s::next, gvplugin_available_s::package, gvplugin_package_s::path, gvplugin_available_s::typeptr, and gvplugin_available_s::typestr.

Referenced by gvplugin_load().

Here is the caller graph for this function:

◆ gvplugin_api()

api_t gvplugin_api ( const char *  str)

Definition at line 50 of file gvplugin.c.

References api_names, ARRAY_SIZE, and str.

Referenced by gvplugin_package_record().

Here is the caller graph for this function:

◆ gvplugin_api_name()

char * gvplugin_api_name ( api_t  api)

Definition at line 60 of file gvplugin.c.

References api_names, ARRAY_SIZE, and NULL.

◆ gvplugin_graph()

Agraph_t * gvplugin_graph ( GVC_t gvc)

Definition at line 474 of file gvplugin.c.

References agattr(), Agdirected, AGEDGE, agedge(), agfindedge, agfindedgeattr, agfindgraphattr, agfindnode, agfindnodeattr, AGNODE, agnode(), agopen(), AGRAPH, agsubg(), agxbfree(), agxbprint(), agxbuse(), agxset(), api_names, GVC_s::apis, ARRAY_SIZE, free(), gv_strdup(), gvc, gvplugin_package_s::name, gvplugin_available_s::next, NODENAME_ESC, NULL, gvplugin_available_s::package, GVC_s::packages, render(), startswith(), and gvplugin_available_s::typestr.

Referenced by dotneato_args_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gvplugin_install()

bool gvplugin_install ( GVC_t gvc,
api_t  api,
const char *  typestr,
int  quality,
gvplugin_package_t package,
gvplugin_installed_t typeptr 
)

Definition at line 72 of file gvplugin.c.

References GVC_s::apis, gv_alloc(), gvc, gvplugin_available_s::next, NULL, gvplugin_available_s::package, gvplugin_available_s::quality, strview(), strview_cmp(), strview_eq(), type, gvplugin_available_s::typeptr, and gvplugin_available_s::typestr.

Referenced by gvconfig_plugin_install_from_library(), and gvplugin_package_record().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gvplugin_library_load()

gvplugin_library_t * gvplugin_library_load ( GVC_t gvc,
const char *  pathname 
)

Definition at line 153 of file gvplugin.c.

References agerrorf(), agwarningf(), agxbfree(), agxbprint(), agxbput(), agxbuse(), GVC_s::common, GVCOMMON_s::demand_loading, DIRSEP, free(), gv_alloc(), gvc, gvconfig_libdir(), len(), NULL, suffix, and GVCOMMON_s::verbose.

Referenced by gvplugin_load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gvplugin_list()

char * gvplugin_list ( GVC_t gvc,
api_t  api,
const char *  str 
)

Definition at line 356 of file gvplugin.c.

References agxbprint(), agxbuse(), GVC_s::apis, strview_t::data, gvc, gvplugin_package_s::name, gvplugin_available_s::next, NULL, gvplugin_available_s::package, agxbuf::size, strview_t::size, str, strview(), strview_case_eq(), type, and gvplugin_available_s::typestr.

Referenced by dotneato_args_initialize(), gvLayout(), gvLayoutJobs(), gvplugin_write_status(), gvRender(), gvRenderContext(), gvRenderData(), and gvRenderFilename().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gvplugin_load()

gvplugin_available_t * gvplugin_load ( GVC_t gvc,
api_t  api,
const char *  type,
FILE *  debug 
)

load a plugin

Parameters
debugAn optional sink to print debug comments to explaining failures

Definition at line 250 of file gvplugin.c.

References agxbfree(), agxbprint(), agxbuse(), GVC_s::api, gvplugin_api_t::api, api_names, gvplugin_library_t::apis, apis, GVC_s::apis, GVC_s::common, strview_t::data, gvc, gvplugin_activate(), gvplugin_library_load(), gvplugin_load(), gvplugin_package_s::name, gvplugin_available_s::next, NULL, gvplugin_available_s::package, gvplugin_library_t::packagename, gvplugin_package_s::path, strview_t::size, str, strview(), strview_eq(), strview_str_eq(), gvplugin_installed_t::type, gvplugin_available_s::typeptr, gvplugin_api_t::types, gvplugin_available_s::typestr, and GVCOMMON_s::verbose.

Referenced by gvjobs_output_langname(), gvlayout_select(), gvloadimage_select(), gvplugin_load(), gvrender_select(), and gvtextlayout_select().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gvplugin_write_status()

void gvplugin_write_status ( GVC_t gvc)

Definition at line 449 of file gvplugin.c.

References api_names, ARRAY_SIZE, GVC_s::common, GVC_s::config_found, GVC_s::config_path, GVCOMMON_s::demand_loading, gvc, gvplugin_list(), and GVCOMMON_s::verbose.

Referenced by gvParseArgs().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ api_names

char* api_names[] = { APIS }
static