Aros/Developer/Docs/Libraries/MUIMaster

Introduction
All muimaster library offsets after MUI_MakeObjectA are incorrect. There should be 4 private entries between MUI_MakeObjectA and MUI_Layout. NOTE: after MUI_Layout, not MUI_MakeObjectA, I was blind this time :) (Bernd Roesch noticed this in 2006, not much has happened..). You can always have multiple .conf files that get used depending on the specific port, or you could modify the build process to preprocess the files before parsing them, or...

This breaks all native m68k MUI custom classes (usually by corrupting the stack or crashing in some graphics library region routines, no wonder my debugging attempts didn't make any sense)

So, whats the solution without breaking all existing ports? Inject 4 fake entries just for the m68k port? and the PPC one too... even better, add an ifdef for AROS pre-ABIv1. I thought .conf files don't support port specific changes? (muimaster.conf needs 4 empty lines after MUI_Layout).

Can you do '#ifdef' in *.conf files?!

And, what about the AROS_LHx macros that have the offset numbers in them? The offset numbers can be macros themselves. As for .conf files, I don't think you can (Staf?), but you could preprocess them with the normal preprocessor (again, Staf? :) No, but you can specify the conffile option to build_module. You should be able to do something like in the mmakefile.src (untested).

ifeq($(AROS_TARGET_CPU), m68k) CONFFILE := muimaster_m68k.conf else CONFFILE := muimaster.conf endif

%build_module ...\ conffile=$(CONFFILE)

Or this ;-)

ifeq($(AROS_TARGET_CPU), i386) CONFFILE := muimaster_i386.conf else CONFFILE := muimaster.conf endif