![]() |
QPMS
Electromagnetic multiple scattering library and toolkit.
|
Growable buffer for canonical fingerprint streams. More...
#include <complex.h>#include <float.h>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>

Go to the source code of this file.
Data Structures | |
| struct | qpms_canonbuf_t |
Functions | |
| static void | qpms_canonbuf_free (qpms_canonbuf_t *b) |
| Frees the buffer contents (safe on a zero-initialised buffer). | |
| static int | qcb_reserve (qpms_canonbuf_t *b, size_t extra) |
| static int | qpms_canonbuf_printf (qpms_canonbuf_t *b, const char *fmt,...) |
| Appends a printf-formatted string; 0 on success, -1 on error. | |
| static int | qpms_canonbuf_double (qpms_canonbuf_t *b, double v) |
| Appends a double with round-trip exactness (%.17g). | |
| static int | qpms_canonbuf_cdouble (qpms_canonbuf_t *b, _Complex double v) |
| Appends a complex double as "(re,im)" with round-trip exact parts. | |
| static int | qpms_canonbuf_string (qpms_canonbuf_t *b, const char *s) |
| Appends a length-prefixed string (delimiter-safe; NULL and "" differ). | |
Growable buffer for canonical fingerprint streams.
Small header-only helper shared by the system fingerprint code (scatspec.c) and the simspec solver-spec fingerprint code (simspec.c). The buffer content is hashed with SHA-256 to obtain the fingerprint.
|
inlinestatic |
Appends a length-prefixed string (delimiter-safe; NULL and "" differ).