GRASS GIS 8 Programmer's Manual  8.4.0dev(2024)-761b3a08c9
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 }
GRASS cairo display driver - header file.
struct cairo_state ca
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
#define _(str)
Definition: glocale.h:10
char * file_name
Definition: cairodriver.h:66
void cairo_write_xid(void)
Definition: write_xid.c:5