Mail Archives: djgpp/1996/11/28/13:34:11
I'm using DJGPP v2. A function I'm coding keeps generating page
faults. So I checked out the FAQ, and tried the suggestion of setting
the `_CRT0_FLAG_NULLOK' bit in `_crt0_startup_flags' in my main()
funtion. It didn't stop the page faults.
Here is the function that is doing this:
(matrix is just a typedef for an array, vector is a structure, FixedMul
is inlined)
void xform_vector(matrix m, vector svect, vector *result)
{
result->x = FixedMul(m[0][0], svect.x) +
FixedMul(m[0][1], svect.y) +
FixedMul(m[0][2], svect.z) + m[0][3];
... (more of the same)
}
And I'm calling the code like this:
(cube is an array of vectors)
xform_vector(transmatrix, cube[i], &vtemp);
Any ideas of what is going on?
Aaron
- Raw text -