Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
refstr.c File Reference

API: cgraph.h, cghdr.h. More...

#include <cgraph/cghdr.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <util/alloc.h>
Include dependency graph for refstr.c:

Go to the source code of this file.

Data Structures

struct  refstr_t
 

Functions

static Dict_trefdict (Agraph_t *g)
 
int agstrclose (Agraph_t *g)
 
static refstr_trefsymbind (Dict_t *strdict, const char *s)
 
static char * refstrbind (Dict_t *strdict, const char *s)
 
char * agstrbind (Agraph_t *g, const char *s)
 
static char * agstrdup_internal (Agraph_t *g, const char *s, bool is_html)
 
char * agstrdup (Agraph_t *g, const char *s)
 returns a pointer to a reference-counted copy of the argument string, creating one if necessary
 
char * agstrdup_html (Agraph_t *g, const char *s)
 
int agstrfree (Agraph_t *g, const char *s)
 
int aghtmlstr (const char *s)
 
void agmarkhtmlstr (char *s)
 

Variables

static Dtdisc_t Refstrdisc
 
static Dict_tRefdict_default
 

Function Documentation

◆ agmarkhtmlstr()

void agmarkhtmlstr ( char *  s)

Definition at line 174 of file refstr.c.

References refstr_t::is_html, NULL, and store().

Referenced by agcopyattr().

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

◆ agstrclose()

int agstrclose ( Agraph_t g)

Definition at line 64 of file refstr.c.

References agdtclose(), and refdict().

Referenced by agclose().

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

◆ agstrdup_internal()

static char * agstrdup_internal ( Agraph_t g,
const char *  s,
bool  is_html 
)
static

Definition at line 101 of file refstr.c.

References dtinsert, gv_calloc(), refstr_t::is_html, malloc(), NULL, refstr_t::refcnt, refdict(), refsymbind(), refstr_t::s, and refstr_t::store.

Referenced by agstrdup(), and agstrdup_html().

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

◆ refdict()

static Dict_t * refdict ( Agraph_t g)
static

Definition at line 50 of file refstr.c.

References agdtopen(), Agraph_s::clos, Dttree, NULL, Refdict_default, Refstrdisc, and Agclos_s::strdict.

Referenced by agstrbind(), agstrclose(), agstrdup_internal(), and agstrfree().

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

◆ refstrbind()

static char * refstrbind ( Dict_t strdict,
const char *  s 
)
static

Definition at line 86 of file refstr.c.

References NULL, refsymbind(), and refstr_t::s.

Referenced by agstrbind().

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

◆ refsymbind()

static refstr_t * refsymbind ( Dict_t strdict,
const char *  s 
)
static

Definition at line 69 of file refstr.c.

References dtsearch, and refstr_t::s.

Referenced by agstrdup_internal(), agstrfree(), and refstrbind().

Here is the caller graph for this function:

Variable Documentation

◆ Refdict_default

Dict_t* Refdict_default
static

Definition at line 43 of file refstr.c.

Referenced by refdict().

◆ Refstrdisc

Dtdisc_t Refstrdisc
static
Initial value:
= {
offsetof(refstr_t, s),
-1,
0,
}
void free(void *)
node NULL
Definition grammar.y:163
Definition grammar.c:93

Definition at line 34 of file refstr.c.

Referenced by refdict().