MCPcopy Create free account
hub / github.com/GenericMappingTools/gmt / PSL_command

Function PSL_command

src/postscriptlight.c:6153–6168  ·  view source on GitHub ↗

Due to the DLL boundary cross problem on Windows we are forced to have the following, otherwise defined as macros, implemented as functions. However, macros proved to be problematic too on Unixes, so now we have functions only. */

Source from the content-addressed store, hash-verified

6151 defined as macros, implemented as functions. However, macros proved to be problematic too
6152 on Unixes, so now we have functions only. */
6153int PSL_command (struct PSL_CTRL *C, const char *format, ...) {
6154 va_list args;
6155 va_start (args, format);
6156 if (C->internal.memory) { /* Send command to memory buffer */
6157 char tmp_buffer[4096] = {""}; /* Have to use this large array because sometimes we get the char encoding array, which is large. */
6158 size_t len = vsnprintf (tmp_buffer, 4096, format, args);
6159 psl_prepare_buffer (C, len);
6160 C->internal.buffer[C->internal.n] = '\0'; /* Play safe before the strcat of next line. Otherwise trash in the middle may occur */
6161 strncat (&(C->internal.buffer[C->internal.n]), tmp_buffer, len);
6162 C->internal.n += len;
6163 }
6164 else /* Write command to stream */
6165 vfprintf (C->internal.fp, format, args);
6166 va_end (args);
6167 return (0);
6168}
6169
6170int PSL_comment (struct PSL_CTRL *C, const char *format, ...) {
6171 va_list args;

Callers 15

gmtplot_map_labelFunction · 0.85
gmtplot_map_annotateFunction · 0.85
gmtplot_map_boundaryFunction · 0.85
gmtplot_timestampFunction · 0.85
gmtplot_echo_commandFunction · 0.85
gmtplot_draw_mag_roseFunction · 0.85
gmtplot_draw_dir_roseFunction · 0.85
gmtplot_encodefontFunction · 0.85
gmtplot_geo_polygonFunction · 0.85
gmtplot_circle_pen_polyFunction · 0.85

Calls 1

psl_prepare_bufferFunction · 0.85

Tested by

no test coverage detected