GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
write_xid.c
Go to the documentation of this file.
1
2
#include <
grass/glocale.h
>
3
4
#include "
cairodriver.h
"
5
6
void
cairo_write_xid
(
void
)
7
{
8
#if CAIRO_HAS_XLIB_XRENDER_SURFACE
9
FILE *fp;
10
char
buf[64];
11
12
fp = fopen(
ca
.
file_name
,
"w"
);
13
if
(!fp)
14
G_fatal_error
(
_
(
"Unable to open output file <%s>"
),
ca
.
file_name
);
15
16
sprintf(buf,
"0x%08lx\n"
, (
unsigned
long
)
ca
.win);
17
18
if
(fputs(buf, fp) < 0)
19
G_fatal_error
(
_
(
"Unable to write output file <%s>"
),
ca
.
file_name
);
20
21
fclose(fp);
22
#endif
23
}
24
glocale.h
G_fatal_error
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
ca
struct cairo_state ca
Definition:
cairodriver/graph.c:42
cairo_state::file_name
char * file_name
Definition:
cairodriver.h:65
cairodriver.h
GRASS cairo display driver - header file.
cairo_write_xid
void cairo_write_xid(void)
Definition:
write_xid.c:6
_
#define _(str)
Definition:
glocale.h:10
lib
cairodriver
write_xid.c
Generated on Mon May 31 2021 05:21:32 for GRASS GIS 7 Programmer's Manual by
1.8.13