Remove arbitrary limits on menu sizes
Detail: When RISC_OSLib is used to generate menus using menu_new and menu_extend there are two (undocumented?) limits on the total menu size: - 64 items on a menu. Any more are silently ignored. - 1024 bytes of indirect text. Above this, any items have several bytes of random rubbish displayed in the menu entry. rlib.c.menu (r4.6) has been changed to: - remove menu_workarea which was on the stack, and caused limits. - only use malloc'd storage areas for the menu. - reduce the data copied by at least 50% by changing processing from: copy; update; copy to : realloc extend (& copy?); update; realloc shrink (no copy). - remove the limits by adding more storage dynamically. - simplify code, which reduces the object code size by about 7%. Admin: The changes have been tested on an Iyonix running RO5.23, and VRPC running RO4.39, with a large C program with about 80 menus. The only noticeable effects were beneficial. It has also been tested with artificially low ADDITEMS and ADDBYTES. Submission from Martin Avison. Version 5.87. Tagged as 'RISC_OSLib-5_87'
Showing with 115 additions and 139 deletions