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

Re: [MiNT] trunk-09082010 file structure / content



Miro Kropacek wrote:
# ifdef M68060
                        r = 0x0000003cL;        /* 060 kernel */
# endif
# ifdef M68040
                        r = 0x00000028L;        /* 040 kernel */
# endif
# ifdef M68030
                        r = 0x0000001eL;        /* 030 kernel */
# endif

You see, it's not only awkward to see something like this but it's
also harder to read / maintain / change (imagine someone would like to
redefine meaning of these numbers -- he would need to compile four
kernels (000, 030, 040, 060) to see if he didn't break something).

I think it is a normal situation to have to recompile any version after making such a change. Furthermore, robust software has a testsuite to automate the regression checks, and good testsuites are easy to run. I agree we currently don't have a testsuite for FreeMiNT, and it is not easy for CPU specific stuff, but with good, flexible emulators, it could be possible.

And also, in this case, it would be a lot more readable to change:
	r = 0x0000003cL;        /* 060 kernel */
by
	r = 60;                 /* 060 kernel */

--
Vincent Rivière