When configuring with --disable-cider, the XCALLOC macro needs

to be defined in sndprint.c.
Also, strict_errorhandling needs to be set in the paranoia_parallel
cider examples to make ngspice exit for a non-cider build.
This commit is contained in:
Brian Taylor 2026-08-15 21:59:04 -07:00
parent 9de2a2c1d5
commit e297b8293f
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,2 @@
set ngbehavior=mcpsa
set strict_errorhandling

View File

@ -9,6 +9,16 @@
#if defined(HAVE_LIBSNDFILE) && defined(HAVE_LIBSAMPLERATE)
#include <sndfile.h>
#ifndef XCALLOC
#define XCALLOC(ptr, type, number) \
do { \
if ((number) && (ptr = (type *)calloc((size_t)(number), sizeof(type))) == NULL) { \
fprintf(stderr, "Out of Memory\n"); \
controlled_exit(1); \
} \
} while(0)
#endif
static int o_samplerate = 48000;
static int o_sndfmt = (SF_FORMAT_WAV | SF_FORMAT_PCM_24);
static float o_mult = 1.0;