Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
psusershape.c File Reference
#include <sys/stat.h>
#include <cgraph/alloc.h>
#include <common/render.h>
#include <gvc/gvio.h>
#include <cgraph/strcasecmp.h>
#include <stdbool.h>
#include <stdio.h>
Include dependency graph for psusershape.c:

Go to the source code of this file.

Enumerations

enum  { ASCII , LATIN1 , NONLATIN }
 

Functions

static void ps_image_free (void *shape)
 
static usershape_tuser_init (const char *str)
 
void epsf_init (node_t *n)
 
void epsf_free (node_t *n)
 
void cat_libfile (GVJ_t *job, const char **arglib, const char **stdlib)
 
void epsf_emit_body (GVJ_t *job, usershape_t *us)
 
void epsf_define (GVJ_t *job)
 
static int charsetOf (char *s)
 
char * ps_string (char *ins, int chset)
 

Variables

static int N_EPSF_files
 
static Dict_tEPSF_contents
 
static Dtdisc_t ImageDictDisc
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ASCII 
LATIN1 
NONLATIN 

Definition at line 222 of file psusershape.c.

Function Documentation

◆ cat_libfile()

void cat_libfile ( GVJ_t job,
const char **  arglib,
const char **  stdlib 
)

Definition at line 134 of file psusershape.c.

References agwarningf(), gvputs(), gvwrite(), and safefile().

Referenced by lasi_begin_graph(), lasi_end_page(), psgen_begin_graph(), and psgen_end_page().

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

◆ charsetOf()

static int charsetOf ( char *  s)
static

Definition at line 229 of file psusershape.c.

References ASCII, LATIN1, and NONLATIN.

Referenced by ps_string().

Here is the caller graph for this function:

◆ epsf_define()

void epsf_define ( GVJ_t job)

Definition at line 207 of file psusershape.c.

References dtfirst, dtnext, EPSF_contents, epsf_emit_body(), gvprintf(), and gvputs().

Referenced by lasi_begin_graph(), and psgen_begin_graph().

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

◆ epsf_emit_body()

void epsf_emit_body ( GVJ_t job,
usershape_t us 
)

Definition at line 183 of file psusershape.c.

References usershape_s::data, and gvputc().

Referenced by core_loadimage_ps(), epsf_define(), and lasi_loadimage_ps().

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

◆ epsf_free()

void epsf_free ( node_t n)

Definition at line 117 of file psusershape.c.

References free(), and ND_shape_info.

Here is the call graph for this function:

◆ epsf_init()

void epsf_init ( node_t n)

Definition at line 96 of file psusershape.c.

References agget(), agnameof(), agwarningf(), dx, dy, gv_alloc(), usershape_s::h, epsf_s::macro_id, usershape_s::macro_id, ND_height, ND_shape_info, ND_width, epsf_s::offset, PS2INCH, safefile(), str, user_init(), usershape_s::w, pointf_s::x, usershape_s::x, pointf_s::y, and usershape_s::y.

Referenced by shapeOf().

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

◆ ps_image_free()

static void ps_image_free ( void *  shape)
static

Definition at line 24 of file psusershape.c.

References usershape_s::data, and free().

Here is the call graph for this function:

◆ ps_string()

char * ps_string ( char *  ins,
int  chset 
)

Definition at line 253 of file psusershape.c.

References agwarningf(), agxbputc(), agxbuse(), ASCII, CHAR_LATIN1, CHAR_UTF8, charsetOf(), free(), ins(), LATIN1, LPAREN, NONLATIN, RPAREN, and utf8ToLatin1().

Referenced by lasi_begin_anchor(), lasi_begin_graph(), psgen_begin_anchor(), psgen_begin_graph(), and psgen_textspan().

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

◆ user_init()

static usershape_t * user_init ( const char *  str)
static

Definition at line 35 of file psusershape.c.

References agwarningf(), usershape_s::data, dtinsert, dtmatch, dtopen(), Dtoset, EPSF_contents, free(), gv_alloc(), gv_calloc(), usershape_s::h, ImageDictDisc, usershape_s::macro_id, usershape_s::must_inline, N_EPSF_files, usershape_s::name, NULL, str, usershape_s::w, usershape_s::x, and usershape_s::y.

Referenced by epsf_init().

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

Variable Documentation

◆ EPSF_contents

Dict_t* EPSF_contents
static

Definition at line 22 of file psusershape.c.

Referenced by epsf_define(), and user_init().

◆ ImageDictDisc

Dtdisc_t ImageDictDisc
static
Initial value:
= {
.key = offsetof(usershape_t, name),
.size = -1,
.freef = ps_image_free,
}
static void ps_image_free(void *shape)
Definition psusershape.c:24

Definition at line 29 of file psusershape.c.

Referenced by user_init().

◆ N_EPSF_files

int N_EPSF_files
static

Definition at line 21 of file psusershape.c.

Referenced by user_init().