Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
gvio.h
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#pragma once
12
13#include "gvcjob.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#ifdef GVDLL
20#ifdef GVC_EXPORTS
21#define GVIO_API __declspec(dllexport)
22#else
23#define GVIO_API __declspec(dllimport)
24#endif
25#endif
26
27#ifndef GVIO_API
28#define GVIO_API /* nothing */
29#endif
30
31 GVIO_API size_t gvwrite (GVJ_t * job, const char *s, size_t len);
32 GVIO_API int gvferror (FILE *stream);
33 GVIO_API int gvputc(GVJ_t * job, int c);
34 GVIO_API int gvputs(GVJ_t * job, const char *s);
35
36 // `gvputs`, but XML-escape the input string
37 GVIO_API int gvputs_xml(GVJ_t* job, const char *s);
38
39 // `gvputs`, C-escaping '\' and non-ASCII bytes
40 GVIO_API void gvputs_nonascii(GVJ_t* job, const char *s);
41
42 GVIO_API int gvflush (GVJ_t * job);
43
44// support for extra API misuse warnings if available
45#ifdef __GNUC__
46#define GV_PRINTF_LIKE(index, first) __attribute__((format(printf, index, first)))
47#else
48#define GV_PRINTF_LIKE(index, first) /* nothing */
49#endif
50
51 GVIO_API GV_PRINTF_LIKE(2, 3) void gvprintf(GVJ_t * job, const char *format, ...);
52
53#undef GV_PRINTF_LIKE
54
55 GVIO_API void gvprintdouble(GVJ_t * job, double num);
56 GVIO_API void gvprintpointf(GVJ_t * job, pointf p);
57 GVIO_API void gvprintpointflist(GVJ_t *job, pointf *p, size_t n);
58
59#undef GVIO_API
60
61#ifdef __cplusplus
62}
63#endif
static double len(glCompPoint p)
Definition glutils.c:150
void gvprintf(GVJ_t *job, const char *format,...)
Definition gvdevice.c:395
GVIO_API size_t gvwrite(GVJ_t *job, const char *s, size_t len)
Definition gvdevice.c:180
GVIO_API int gvputs(GVJ_t *job, const char *s)
Definition gvdevice.c:264
GVIO_API void gvprintpointflist(GVJ_t *job, pointf *p, size_t n)
Definition gvdevice.c:538
GVIO_API int gvputs_xml(GVJ_t *job, const char *s)
Definition gvdevice.c:274
GVIO_API void gvputs_nonascii(GVJ_t *job, const char *s)
Definition gvdevice.c:279
#define GVIO_API
Definition gvio.h:28
GVIO_API int gvferror(FILE *stream)
Definition gvdevice.c:254
GVIO_API int gvflush(GVJ_t *job)
Definition gvdevice.c:301
GVIO_API void gvprintpointf(GVJ_t *job, pointf p)
Definition gvdevice.c:524
GVIO_API int gvputc(GVJ_t *job, int c)
Definition gvdevice.c:291
GVIO_API const char * format
Definition gvio.h:51
GVIO_API const char GVIO_API void gvprintdouble(GVJ_t *job, double num)
Definition gvdevice.c:507
#define GV_PRINTF_LIKE(index, first)
Definition gvio.h:48
Definition grammar.c:93