##############################################################################
#                                                                            #
# IAR ARM ANSI C/C++ Compiler V4.42A/W32 EVALUATION    14/Jan/2011  23:28:05 #
# Copyright 1999-2005 IAR Systems. All rights reserved.                      #
#                                                                            #
#    Cpu mode        =  interwork                                            #
#    Endian          =  little                                               #
#    Stack alignment =  4                                                    #
#    Source file     =  D:\pasha\elf\googlecode\MySMSYS\Mss3\CreateMenu.cpp  #
#    Command line    =  D:\pasha\elf\googlecode\MySMSYS\Mss3\CreateMenu.cpp  #
#                       -D NEWSGOLD -D ELKA -D LANG_EN -lcN                  #
#                       D:\pasha\elf\googlecode\MySMSYS\Mss3\Release_ELKA_EN #
#                       \List\ -o D:\pasha\elf\googlecode\MySMSYS\Mss3\Relea #
#                       se_ELKA_EN\Obj\ -s9 --no_unroll --cpu_mode arm       #
#                       --endian little --cpu ARM926EJ-S --stack_align 4     #
#                       --interwork -e --fpu None --eec++ --dlib_config      #
#                       "D:\pasha\Embedded Workbench 4.0                     #
#                       Evaluation2\ARM\LIB\dl5tpainl8n.h" -I                #
#                       "D:\pasha\Embedded Workbench 4.0                     #
#                       Evaluation2\ARM\INC\" --inline_threshold=2           #
#    List file       =  D:\pasha\elf\googlecode\MySMSYS\Mss3\Release_ELKA_EN #
#                       \List\CreateMenu.lst                                 #
#    Object file     =  D:\pasha\elf\googlecode\MySMSYS\Mss3\Release_ELKA_EN #
#                       \Obj\CreateMenu.r79                                  #
#                                                                            #
#                                                                            #
##############################################################################

D:\pasha\elf\googlecode\MySMSYS\Mss3\CreateMenu.cpp
      1          #include "include.h"
      2          #include "CreateMenu.h"
      3          
      4          
      5          
      6          int CreateMenu(const ML_MENU_DESC *menu, const HEADER_DESC *hdr, int start_item, int n_items, void *user_pointer)
      7          {
      8            void *ma=malloc_adr();
      9            void *gui=GetMultiLinesMenuGUI(ma, mfree_adr());
     10            SetMenuToGUI(gui, menu);
     11            SetMenuItemCount(gui, n_items);
     12            MenuSetUserPointer(gui, user_pointer);
     13            SetCursorToMenuItem(gui, start_item);
     14            patch_header(hdr);
     15            SetHeaderToMenu(gui, hdr, ma);
     16            return CreateGUI(gui);
     17          }
     18          
     19          int CreateMenu(const MENU_DESC *menu, const HEADER_DESC *hdr, int start_item, int n_items, void *user_pointer)
     20          {
     21            void *ma=malloc_adr();
     22            void *gui=GetMenuGUI(ma, mfree_adr());
     23            SetMenuToGUI(gui, menu);
     24            SetMenuItemCount(gui, n_items);
     25            MenuSetUserPointer(gui, user_pointer);
     26            SetCursorToMenuItem(gui, start_item);
     27            patch_header(hdr);
     28            SetHeaderToMenu(gui, hdr, ma);
     29            return CreateGUI(gui);
     30          }
     31          
     32          
     33          int CreateMenu(const ML_MENU_DESC *menu, const HEADER_DESC *hdr, WSHDR *hdr_t, int start_item, int n_items, void *user_pointer)
     34          {
     35            void *ma=malloc_adr();
     36            void *mf=mfree_adr();
     37            void *gui=GetMultiLinesMenuGUI(ma, mf);
     38            SetMenuToGUI(gui, menu);
     39            SetMenuItemCount(gui, n_items);
     40            MenuSetUserPointer(gui, user_pointer);
     41            SetCursorToMenuItem(gui, start_item);
     42            patch_header(hdr);
     43            SetHeaderToMenu(gui, hdr, ma);
     44            SetHeaderText(GetHeaderPointer(gui), hdr_t, ma, mf);
     45            return CreateGUI(gui);
     46          }
     47          
     48          int CreateMenu(const MENU_DESC *menu, const HEADER_DESC *hdr, WSHDR *hdr_t, int start_item, int n_items, void *user_pointer)
     49          {
     50            void *ma=malloc_adr();
     51            void *mf=mfree_adr();
     52            void *gui=GetMenuGUI(ma, mf);
     53            SetMenuToGUI(gui, menu);
     54            SetMenuItemCount(gui, n_items);
     55            MenuSetUserPointer(gui, user_pointer);
     56            SetCursorToMenuItem(gui, start_item);
     57            patch_header(hdr);
     58            SetHeaderToMenu(gui, hdr, ma);
     59            SetHeaderText(GetHeaderPointer(gui), hdr_t, ma, mf);
     60            return CreateGUI(gui);
     61          }
     62          
     63          
     64          int CreateMenu30or2(const ML_MENU_DESC *menu, const HEADER_DESC *hdr, WSHDR *hdr_t, int start_item, int n_items, void *user_pointer)
     65          {
     66            void *ma=malloc_adr();
     67            void *mf=mfree_adr();
     68            void *gui=GetMultiLinesMenuGUI(ma, mf);
     69            SetMenuToGUI(gui, menu);
     70            SetMenuItemCount(gui, n_items);
     71            MenuSetUserPointer(gui, user_pointer);
     72            SetCursorToMenuItem(gui, start_item);
     73            patch_option_header(hdr);
     74            SetHeaderToMenu(gui, hdr, ma);
     75            SetHeaderText(GetHeaderPointer(gui), hdr_t, ma, mf);
     76            return CreateGUI_30or2(gui);
     77          }
     78          
     79          int CreateMenu30or2(const MENU_DESC *menu, const HEADER_DESC *hdr, WSHDR *hdr_t, int start_item, int n_items, void *user_pointer)
     80          {
     81            void *ma=malloc_adr();
     82            void *mf=mfree_adr();
     83            void *gui=GetMenuGUI(ma, mf);
     84            SetMenuToGUI(gui, menu);
     85            SetMenuItemCount(gui, n_items);
     86            MenuSetUserPointer(gui, user_pointer);
     87            SetCursorToMenuItem(gui, start_item);
     88            patch_option_header(hdr);
     89            SetHeaderToMenu(gui, hdr, ma);
     90            SetHeaderText(GetHeaderPointer(gui), hdr_t, ma, mf);
     91            return CreateGUI_30or2(gui);
     92          }
     93          
     94          int CreateMenu30or2(const ML_MENU_DESC *menu, const HEADER_DESC *hdr, int start_item, int n_items, void *user_pointer)
     95          {
     96            void *ma=malloc_adr();
     97            void *gui=GetMultiLinesMenuGUI(ma, mfree_adr());
     98            SetMenuToGUI(gui, menu);
     99            SetMenuItemCount(gui, n_items);
    100            MenuSetUserPointer(gui, user_pointer);
    101            SetCursorToMenuItem(gui, start_item);
    102            patch_option_header(hdr);
    103            SetHeaderToMenu(gui, hdr, ma);
    104            return CreateGUI_30or2(gui);
    105          }
    106          
    107          int CreateMenu30or2(const MENU_DESC *menu, const HEADER_DESC *hdr, int start_item, int n_items, void *user_pointer)
    108          {
    109            void *ma=malloc_adr();
    110            void *gui=GetMenuGUI(ma, mfree_adr());
    111            SetMenuToGUI(gui, menu);
    112            SetMenuItemCount(gui, n_items);
    113            MenuSetUserPointer(gui, user_pointer);
    114            SetCursorToMenuItem(gui, start_item);
    115            patch_option_header(hdr);
    116            SetHeaderToMenu(gui, hdr, ma);
    117            return CreateGUI_30or2(gui);
    118          }
    119          
    120          
    121          

   Maximum stack usage in bytes:

     Function                       CSTACK
     --------                       ------
     CreateMenu(MENU_DESC const *, HEADER_DESC const *, WSHDR *, int, int, void *)
                                       40
     CreateMenu(MENU_DESC const *, HEADER_DESC const *, int, int, void *)
                                       32
     CreateMenu(ML_MENU_DESC const *, HEADER_DESC const *, WSHDR *, int, int, void *)
                                       40
     CreateMenu(ML_MENU_DESC const *, HEADER_DESC const *, int, int, void *)
                                       32
     CreateMenu30or2(MENU_DESC const *, HEADER_DESC const *, WSHDR *, int, int, void *)
                                       40
     CreateMenu30or2(MENU_DESC const *, HEADER_DESC const *, int, int, void *)
                                       32
     CreateMenu30or2(ML_MENU_DESC const *, HEADER_DESC const *, WSHDR *, int, int, void *)
                                       40
     CreateMenu30or2(ML_MENU_DESC const *, HEADER_DESC const *, int, int, void *)
                                       32
     patch_option_header(HEADER_DESC const *)
                                       12


   Segment part sizes:

     Function/Label                 Bytes
     --------------                 -----
     patch_option_header(HEADER_DESC const *)
                                      68
     CreateMenu(ML_MENU_DESC const *, HEADER_DESC const *, int, int, void *)
                                     164
     CreateMenu(MENU_DESC const *, HEADER_DESC const *, int, int, void *)
                                     164
     CreateMenu(ML_MENU_DESC const *, HEADER_DESC const *, WSHDR *, int, int, void *)
                                     192
     CreateMenu(MENU_DESC const *, HEADER_DESC const *, WSHDR *, int, int, void *)
                                     192
     CreateMenu30or2(ML_MENU_DESC const *, HEADER_DESC const *, WSHDR *, int, int, void *)
                                     160
     CreateMenu30or2(MENU_DESC const *, HEADER_DESC const *, WSHDR *, int, int, void *)
                                     160
     CreateMenu30or2(ML_MENU_DESC const *, HEADER_DESC const *, int, int, void *)
                                     132
     CreateMenu30or2(MENU_DESC const *, HEADER_DESC const *, int, int, void *)
                                     132
      Others                          44

 
 1 408 bytes in segment CODE
 
 1 296 bytes of CODE memory (+ 112 bytes shared)

Errors: none
Warnings: none
