Graphviz 14.1.2~dev.20260118.1035
Loading...
Searching...
No Matches
gv_tcl_init.c
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (c) 2011 AT&T Intellectual Property
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * https://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors: Details at https://graphviz.org
9 *************************************************************************/
10
11#include "config.h"
12
13#include "../tcl-compat.h"
14#include <tcl.h>
15#include <gvc/gvc.h>
16#include <gvc/gvplugin.h>
17#include <gvc/gvcjob.h>
18#include <gvc/gvcint.h>
19#include "gv_channel.h"
20
21static size_t gv_string_writer(GVJ_t *job, const char *s, size_t len)
22{
23 // clamp to TCL_SIZE_MAX
25 Tcl_AppendToObj((Tcl_Obj*)(job->output_file), s, l);
26 return (size_t)l;
27}
28
29static size_t gv_channel_writer(GVJ_t *job, const char *s, size_t len)
30{
31 // clamp to TCL_SIZE_MAX
33 return (size_t)Tcl_Write((Tcl_Channel)(job->output_file), s, l);
34}
35
40
45
static double len(glCompPoint p)
Definition glutils.c:138
node NULL
Definition grammar.y:181
static GVC_t * gvc
Definition gv.cpp:27
language-specific bindings API
static size_t gv_channel_writer(GVJ_t *job, const char *s, size_t len)
Definition gv_tcl_init.c:29
void gv_channel_writer_init(GVC_t *gvc)
Definition gv_tcl_init.c:41
void gv_writer_reset(GVC_t *gvc)
Definition gv_tcl_init.c:46
static size_t gv_string_writer(GVJ_t *job, const char *s, size_t len)
Definition gv_tcl_init.c:21
void gv_string_writer_init(GVC_t *gvc)
Definition gv_tcl_init.c:36
Graphviz context library.
Definition gvcint.h:81
size_t(* write_fn)(GVJ_t *job, const char *s, size_t len)
Definition gvcint.h:104
FILE * output_file
Definition gvcjob.h:277
#define TCL_SIZE_MAX
Definition tcl-compat.h:18
#define Tcl_Size
Definition tcl-compat.h:33
Definition grammar.c:90