On 8/15/22 08:29, Jaime Oliver wrote:
The specific error I'm getting right now is that it is reading that number 32 as 29. Again, this same code works fine in all other OSs I've tried.
I'm assuming the issue is in the pow() function and all the typecasting (int), (double) as Chris suggested?
[...]
int readbarfile(int a[][8], FILE *f) { int i, ii, j, jj, strsize, temp; char * line = NULL; size_t len = 0; ssize_t read; char ss[10]; temp=j=0;
ii=0; while ((read = getline(&line, &len, f)) != -1) {
[...]
my suggestion for a completely different approach: rather than brewing your own file-reader: how about using [text] (or whatever existing object you prefer) to parse the file contents into an atom list and then use only messages to set the internal state of your object?
in general this makes your object much more flexible, e.g. you can write patches that do not need your "barfile" *at all, but instead store the entire configuration in the patch.
gfasmdr IOhannes