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