[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] XaAES crash errors



Paul Wratt wrote:
The question: how do I pass "char *line" through to an intermediate
function that can then pass "&line" correctly. Would passing "*line"
be enough..

Things are not so simple, that *, ** and & are not here by chance.
We can't answer this question without knowing the context. It seems you want to split a function into 2 functions, which is probably good.

You should post here the relevant elements of the function in question and we will answer on a concrete example.

But we must keep in mind that writing C programs is complicated.
With a basic knowledge of any programming language, it is possible to read and understand most C code (except some language elements which are tricky).

Writing C code is another story. It is usually quite difficult for C beginners to manage to compile a program. And when it finally compiles, they say "Hoorah !" but most of the time the program is full of bugs, and it crashes at runtime or does a wrong thing. The C language is even more evil: sometimes it seems the program does the right thing, but actually it writes to illegal memory, so it works by chance and it is trashing something else which will crash later in a incomprehensible way...

I just want to say that refactoring a complex code as you are doing require solid C skills, there are good chances that you will break something away without seeing the effects. Then it will be a headache to find bugs...

So you should really begin by improving your C knowledge, as it has already been told here.
Well, this is just an advice.

--
Vincent Rivière