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 
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
struct cairo_state ca
char * file_name
Definition: cairodriver.h:65
GRASS cairo display driver - header file.
void cairo_write_xid(void)
Definition: write_xid.c:6
#define _(str)
Definition: glocale.h:10