GRASS GIS 8 Programmer's Manual 8.3.2(2024)-exported
Loading...
Searching...
No Matches
write_xid.c
Go to the documentation of this file.
1#include <grass/glocale.h>
2
3#include "cairodriver.h"
4
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}
GRASS cairo display driver - header file.
struct cairo_state ca
void G_fatal_error(const char *msg,...)
Print a fatal error message to stderr.
Definition gis/error.c:159
char * file_name
Definition cairodriver.h:66
void cairo_write_xid(void)
Definition write_xid.c:5