[CM] Fwd: Re: S7 integrated in TIC-80, and bug reports

bil at ccrma.Stanford.EDU bil at ccrma.Stanford.EDU
Fri Feb 3 11:01:12 PST 2023

-------- Original Message --------
Subject: Re: [CM] S7 integrated in TIC-80, and bug reports
Date: 2023-02-03 10:52
 From: bil at ccrma.stanford.edu
To: David St-Hilaire <sthilaire.david at gmail.com>

> Would there be a way to give a better error message?

The error message is the third argument to error_nr.
One simple change might be to forward declare wrap_string
and set_elist_1,

static s7_pointer set_elist_1(s7_scheme *sc, s7_pointer x1);
static s7_pointer wrap_string(s7_scheme *sc, const char *str, s7_int 


static size_t local_fwrite(const void *ptr, size_t size, size_t nmemb, 
FILE *stream)
   error_nr(cur_sc, cur_sc->io_error_symbol,
            set_elist_1(cur_sc, wrap_string(cur_sc, "writing a file is 
not allowed in this version of s7", 51)));

and similarly for local_fopen.  The integer (51 above) is the length of 
error message string.

More information about the Cmdist mailing list