As approved by Stefan, I moved the history (hs_xxx), alarm (al_xxx) and elog (el_xxx) functions out of midas.c into separate files. Commited as revision 3665. This change should be transparent to all users. K.O.