Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
psusershape.c File Reference
#include <sys/stat.h>
#include <common/render.h>
#include <gvc/gvio.h>
#include <stdbool.h>
#include <stdio.h>
#include <util/alloc.h>
#include <util/gv_fopen.h>
#include <util/strcasecmp.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 223 of file psusershape.c.

Function Documentation

◆ cat_libfile()

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

Definition at line 135 of file psusershape.c.

References agwarningf(), gv_fopen(), 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 230 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 208 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 184 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 118 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 97 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 25 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 254 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 36 of file psusershape.c.

References agwarningf(), usershape_s::data, dtinsert, dtmatch, dtopen(), Dtoset, EPSF_contents, free(), gv_alloc(), gv_calloc(), gv_fopen(), 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 23 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:25

Definition at line 30 of file psusershape.c.

Referenced by user_init().

◆ N_EPSF_files

int N_EPSF_files
static

Definition at line 22 of file psusershape.c.

Referenced by user_init().