MCPcopy Create free account
hub / github.com/KaisenAmin/c_std / plot_get_size

Function plot_get_size

plot/plot.c:2026–2036  ·  view source on GitHub ↗

* @brief Get the plot's output dimensions, in pixels. * * The read-side counterpart of `plot_set_size`. * * @param plot The plot. NULL is a no-op. * @param width If non-NULL, receives the width. * @param height If non-NULL, receives the height. */

Source from the content-addressed store, hash-verified

2024 in front, so the text continues an unquoted cell. */
2025static bool plot_csv_write_text(FILE* f, const char* text, bool prefix_done) {
2026 bool quote = strpbrk(text, ",\"\r\n") != NULL;
2027 if (!quote) {
2028 return fputs(text, f) >= 0;
2029 }
2030 if (prefix_done) {
2031 /* "x_" + a label that needs quoting: drop the characters that would
2032 need it rather than emit a half-quoted cell */
2033 for (const char* p = text; *p; ++p) {
2034 if (!strchr(",\"\r\n", *p) && fputc(*p, f) == EOF) {
2035 return false;
2036 }
2037 }
2038 return true;
2039 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected