Subversion Repositories Kolibri OS

Rev

Rev 7192 | Rev 7200 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. #define MEMSIZE 4096 * 50
  2.  
  3. //===================================================//
  4. //                                                   //
  5. //                       LIB                         //
  6. //                                                   //
  7. //===================================================//
  8.  
  9. #include "../lib/file_system.h"
  10. #include "../lib/list_box.h"
  11. #include "../lib/gui.h"
  12. #include "../lib/random.h"
  13. #include "../lib/kfont.h"
  14.  
  15. #include "../lib/obj/libio.h"
  16. #include "../lib/obj/libimg.h"
  17. #include "../lib/obj/libini.h"
  18. #include "../lib/obj/proc_lib.h"
  19. #include "../lib/obj/box_lib.h"
  20.  
  21. #include "../lib/patterns/libimg_load_skin.h"
  22. #include "../lib/patterns/simple_open_dialog.h"
  23.  
  24. //===================================================//
  25. //                                                   //
  26. //                       DATA                        //
  27. //                                                   //
  28. //===================================================//
  29.  
  30. //simple open dialog data
  31. char default_dir[] = "/rd/1";
  32. od_filter filter2 = { 15, "MP3\0WAV\0XM\0\0" };
  33.  
  34. #define ABOUT_MESSAGE "Pixie Player v2.8
  35.  
  36. A tiny music folder player.
  37. Supports MP3, WAV, XM audio file formats.
  38.  
  39. Controls:
  40. Open file: O key
  41. Play/Stop: Space or P key
  42. Start playing selected file: Enter
  43. Goto next/previous track: Ctrl + Left/Right
  44. Change sound volume: Left/Right key
  45. Remove from the list: Delete
  46. Repeat: R
  47. Shuffle: S
  48. Mute: M
  49.  
  50. kolibri-n.org & aspero.pro"
  51.  
  52. scroll_bar scroll1 = { 5,200,398,44,0,2,115,15,0,0xeeeeee,0xBBBbbb,0xeeeeee,
  53.         0,0,0,0,0,0,0,0,0,0,0,0,0,1,1};
  54.  
  55. proc_info Form;
  56. llist list;
  57.  
  58. char pixie_ini_path[4096];
  59. char work_folder[4096];
  60. char current_filename[256];
  61.  
  62. enum {
  63.         BUTTON_WINDOW_CLOSE = 1,
  64.         BUTTON_WINDOW_MINIMIZE,
  65.         BUTTON_WINDOW_REDUCE,
  66.         BUTTON_PLAYBACK_PLAY_PAUSE = 10,
  67.         BUTTON_PLAYBACK_PREV,
  68.         BUTTON_PLAYBACK_NEXT,
  69.         BUTTON_REPEAT,
  70.         BUTTON_SHUFFLE,
  71.         BUTTON_OPEN_DIALOG,
  72.         BUTTON_SHOW_VOLUME
  73. };
  74.  
  75. int player_run_id;
  76. int notify_run_id;
  77.  
  78. bool repeat;
  79. bool shuffle;
  80.  
  81. int current_playing_file_n=0;
  82.  
  83. word win_x_normal, win_y_normal;
  84. word win_x_small, win_y_small;
  85.  
  86. byte window_mode;
  87. enum {
  88.         WINDOW_MODE_NORMAL,
  89.         WINDOW_MODE_SMALL
  90. };
  91.  
  92. byte playback_mode;
  93. enum {
  94.         PLAYBACK_MODE_STOPED,
  95.         PLAYBACK_MODE_PLAYING
  96. };
  97.  
  98. #define LAST_FOLDER_EXISTS 1
  99.  
  100. //===================================================//
  101. //                                                   //
  102. //                       CODE                        //
  103. //                                                   //
  104. //===================================================//
  105.  
  106. #include "get_files_list.h"
  107. #include "settings.h"
  108.  
  109. void LoadLibraries()
  110. {
  111.         load_dll(boxlib, #box_lib_init,0);
  112.         load_dll(libio, #libio_init,1);
  113.         load_dll(libimg, #libimg_init,1);
  114.         load_dll(libini, #lib_init,1);
  115.         load_dll(Proc_lib, #OpenDialog_init,0);
  116.         OpenDialog_init stdcall (#o_dialog);
  117. }
  118.  
  119. void main()
  120. {
  121.         int tempstr;
  122.         tempstr = abspath("pixie.ini");
  123.         strcpy(#pixie_ini_path, tempstr);
  124.         list.SetFont(8, 16, 13);
  125.         LoadLibraries();
  126.         LoadIniConfig();
  127.         if (work_folder) param=LAST_FOLDER_EXISTS;
  128.         if (!param) notify("'Pixie Player\nPress O key to open MP3/WAV/XM file' -St");
  129.         kfont.init(DEFAULT_FONT);      
  130.         SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
  131.         loop()
  132.         {
  133.           WaitEventTimeout(10);
  134.           switch(EAX & 0xFF) {
  135.                 case evMouse:
  136.                         if (!CheckActiveProcess(Form.ID)) break;
  137.                         mouse.get();
  138.                         scrollbar_v_mouse (#scroll1);
  139.                         if (list.first != scroll1.position)
  140.                         {
  141.                                 list.first = scroll1.position;
  142.                                 DrawPlayList();
  143.                                 break;
  144.                         }
  145.                         if (list.MouseOver(mouse.x, mouse.y))
  146.                         {
  147.                                 if (mouse.vert) && (list.MouseScroll(mouse.vert)) DrawPlayList();
  148.                                 if (mouse.dblclick) EventStartPlayingSelectedItem();
  149.                                 if (mouse.down) && (mouse.key&MOUSE_LEFT)
  150.                                         && (list.ProcessMouse(mouse.x, mouse.y)) DrawPlayList();
  151.                                 if (mouse.down) && (mouse.key&MOUSE_RIGHT) CreateThread(#EventShowAbout,#menu_stak+4092);
  152.                         }
  153.                         if(mouse.key&MOUSE_LEFT) && (mouse.x<14)
  154.                                 && (window_mode == WINDOW_MODE_SMALL) EventDragWindow();
  155.                         break;
  156.                 case evButton:
  157.                         switch(GetButtonID()) {
  158.                                 case BUTTON_WINDOW_CLOSE: EventExitApp(); break;
  159.                                 case BUTTON_WINDOW_MINIMIZE: MinimizeWindow(); break;
  160.                                 case BUTTON_WINDOW_REDUCE: EventChangeWindowMode(); break;
  161.                                 case BUTTON_PLAYBACK_PREV: EventPlaybackPrevious();     break;
  162.                                 case BUTTON_PLAYBACK_NEXT: EventPlaybackNext(); break;
  163.                                 case BUTTON_PLAYBACK_PLAY_PAUSE: EventPlayAndPause(); break;
  164.                                 case BUTTON_REPEAT: EventRepeatClick(); break;
  165.                                 case BUTTON_SHUFFLE: EventShuffleClick(); break;
  166.                                 case BUTTON_OPEN_DIALOG: EventFileDialogOpen(); break;
  167.                                 case BUTTON_SHOW_VOLUME: RunProgram("/sys/@VOLUME", NULL); break;
  168.                         }
  169.                         break;   
  170.                 case evKey:
  171.                         GetKeys();
  172.                         if (key_modifier&KEY_LCTRL) || (key_modifier&KEY_RCTRL) {
  173.                                 if (key_scancode==SCAN_CODE_LEFT) EventPlaybackPrevious();
  174.                                 if (key_scancode==SCAN_CODE_RIGHT) EventPlaybackNext();
  175.                                 break;
  176.                         }              
  177.                         if (key_scancode==SCAN_CODE_KEY_O) EventFileDialogOpen();
  178.                         if (key_scancode==SCAN_CODE_KEY_M) RunProgram("/sys/@VOLUME", "m");
  179.                         if (key_scancode==SCAN_CODE_KEY_R) EventRepeatClick();
  180.                         if (key_scancode==SCAN_CODE_KEY_S) EventShuffleClick();
  181.                         if (key_scancode==SCAN_CODE_RIGHT) RunProgram("/sys/@VOLUME", "+");
  182.                         if (key_scancode==SCAN_CODE_LEFT)  RunProgram("/sys/@VOLUME", "-");
  183.                         if (key_scancode==SCAN_CODE_ENTER) EventStartPlayingSelectedItem();
  184.                         if (key_scancode==SCAN_CODE_DEL) EventDeleteItem();
  185.                         if (key_scancode==SCAN_CODE_KEY_P)||(key_scancode==SCAN_CODE_SPACE) EventPlayAndPause();
  186.                         if (list.ProcessKey(key_scancode)) DrawPlayList();
  187.                         break;
  188.                 case evReDraw:
  189.                         if (window_mode == WINDOW_MODE_NORMAL)
  190.                                 DefineDragableWindow(win_x_normal, win_y_normal, skin.w - 1, skin.h + list.h-1);
  191.                         if (window_mode == WINDOW_MODE_SMALL)
  192.                                 DefineDragableWindow(win_x_small, win_y_small, WIN_W_SMALL, WIN_H_SMALL);
  193.                         draw_window();
  194.                         if (param[0]) {
  195.                                 if (param==LAST_FOLDER_EXISTS) EventOpenFolder(NULL);
  196.                                 else EventOpenFolder(#param);
  197.                                 param[0] = NULL;
  198.                         }
  199.                         break;
  200.                 default:
  201.                         EventCheckSongFinished();
  202.           }
  203.   }
  204. }
  205.  
  206.  
  207. void DrawPlayList()
  208. {
  209.         int i;
  210.         int yyy;
  211.         int kfont_width;
  212.         char temp_filename[4096];
  213.         dword text_color, bg_color;
  214.         for (i=0; i<list.visible; i++;)
  215.         {
  216.                 strcpy(#temp_filename, files_mas[i + list.first] * 304 + buf + 72);
  217.                 temp_filename[strrchr(#temp_filename, '.')-1] = '\0';
  218.                 //if (strlen(#temp_filename)>47) strcpy(#temp_filename+44, "...");
  219.                
  220.                 yyy = i*list.item_h+list.y;
  221.                
  222.                 //this is selected file
  223.                 if (list.cur_y - list.first == i)
  224.                 {
  225.                         if (i>=list.count) continue;
  226.                         bg_color = theme.color_list_active_bg;
  227.                         text_color = theme.color_list_text;
  228.                 }
  229.                 //this is not selected file
  230.                 else
  231.                 {
  232.                         if (i>=list.count) continue;
  233.                         bg_color = theme.color_list_bg;
  234.                         text_color = theme.color_list_text;
  235.                 }
  236.                 //this is cur_y playing file
  237.                 if (i + list.first == current_playing_file_n)
  238.                 && (playback_mode == PLAYBACK_MODE_PLAYING)
  239.                 {
  240.                         text_color = theme.color_list_active_text;
  241.                 }
  242.                 DrawBar(list.x, yyy, list.w, list.item_h, bg_color);
  243.                 kfont_width = kfont.WriteIntoWindow(6, yyy+list.text_y, bg_color,
  244.                         text_color, list.font_type, #temp_filename);
  245.                 if (kfont_width>skin.w-15) DrawBar(skin.w-1, yyy, 1, list.item_h, theme.color_list_border);
  246.         }
  247.         DrawBar(list.x,list.visible * list.item_h + list.y, list.w,
  248.                 -list.visible * list.item_h + list.h, theme.color_list_bg);
  249.         DrawScroller();
  250. }
  251.  
  252.  
  253. void draw_window() {
  254.         GetProcessInfo(#Form, SelfInfo);
  255.         DrawTopPanel();
  256.         IF (Form.status_window>=2) return;
  257.         if (window_mode == WINDOW_MODE_NORMAL)
  258.         {
  259.                 DrawPlayList();
  260.                 DrawRectangle(0, skin.h-1, skin.w-1, list.h+1, theme.color_list_border);
  261.         }
  262. }
  263.  
  264. void DrawTopPanel()
  265. {
  266.         int kfont_width;
  267.         int button_y;
  268.         //Mode depended
  269.         if (window_mode == WINDOW_MODE_NORMAL)
  270.         {
  271.                 button_y = 46;
  272.                 img_draw stdcall(skin.image, 0, 0, skin.w, skin.h, 0, 0);
  273.                 if (playback_mode != PLAYBACK_MODE_STOPED)
  274.                         img_draw stdcall(skin.image, 46, button_y, 41, 21, skin.w+1, WIN_H_SMALL+1);
  275.                 if (repeat)
  276.                         img_draw stdcall(skin.image, 177, button_y+2, 17,17,skin.w+43, WIN_H_SMALL+1);
  277.                 if (shuffle)
  278.                         img_draw stdcall(skin.image, 196, button_y+2, 17,17, skin.w+62, WIN_H_SMALL+1);
  279.  
  280.                 if (!work_folder) DrawPixieTitle("Pixie");
  281.                 else DrawPixieTitle(#work_folder + strrchr(#work_folder, '/'));
  282.                 kfont_width = kfont.WriteIntoWindow(8, 24, theme.color_top_panel_bg,
  283.                         theme.color_top_panel_song_name, list.font_type, #current_filename);
  284.                 if (kfont_width>skin.w-15) DrawBar(skin.w-1, 24, 1, list.item_h, theme.color_list_border);
  285.                 //Playing control buttons
  286.                 DefineHiddenButton(7, button_y, 38, 20, BUTTON_PLAYBACK_PREV);
  287.                 DefineHiddenButton(47, button_y, 38, 20, BUTTON_PLAYBACK_PLAY_PAUSE);
  288.                 DefineHiddenButton(87, button_y, 38, 20, BUTTON_PLAYBACK_NEXT);
  289.                 //Window control buttons
  290.                 DefineHiddenButton(Form.width - 27, 1, 26, 15, BUTTON_WINDOW_CLOSE);
  291.                 DefineHiddenButton(Form.width - 55, 1, 26, 15, BUTTON_WINDOW_MINIMIZE);
  292.                 DefineHiddenButton(Form.width - 83, 1, 26, 15, BUTTON_WINDOW_REDUCE);
  293.                 //Other buttons
  294.                 DefineHiddenButton(Form.width - 53, button_y, 22, 20, BUTTON_OPEN_DIALOG);
  295.                 DefineHiddenButton(Form.width - 29, button_y, 22, 20, BUTTON_SHOW_VOLUME);
  296.                 DefineHiddenButton(178, button_y+3, 17, 16, BUTTON_REPEAT);
  297.                 DefineHiddenButton(197, button_y+3, 17, 16, BUTTON_SHUFFLE);
  298.         }
  299.         else if (window_mode == WINDOW_MODE_SMALL)
  300.         {
  301.                 button_y = 7;
  302.                 img_draw stdcall(skin.image, 0, 0, WIN_W_SMALL, WIN_H_SMALL, skin.w-1, 0);
  303.                 if (playback_mode != PLAYBACK_MODE_STOPED)
  304.                         img_draw stdcall(skin.image, 46, button_y-1, 27, 19, skin.w+83, WIN_H_SMALL+1);
  305.                 DefineHiddenButton(0, 0, WIN_W_SMALL, WIN_H_SMALL, 99 + BT_NOFRAME);
  306.                 //Playing control buttons
  307.                 DefineHiddenButton(20, button_y, 24, 16, BUTTON_PLAYBACK_PREV);
  308.                 DefineHiddenButton(46, button_y, 24, 16, BUTTON_PLAYBACK_PLAY_PAUSE);
  309.                 DefineHiddenButton(72, button_y, 24, 16, BUTTON_PLAYBACK_NEXT);
  310.                 //Window control buttons
  311.                 DefineHiddenButton(Form.width - 20, 1, 19, 13, BUTTON_WINDOW_CLOSE);
  312.                 DefineHiddenButton(Form.width - 20, 16, 19, 13, BUTTON_WINDOW_REDUCE);
  313.         }
  314. }
  315.  
  316.  
  317. void DrawScroller()
  318. {
  319.         scroll1.max_area = list.count;
  320.         scroll1.cur_area = list.visible;
  321.         scroll1.position = list.first;
  322.         scroll1.all_redraw = 0;
  323.         scroll1.start_x = skin.w - scroll1.size_x-1;
  324.         scroll1.start_y = list.y-1;
  325.         scroll1.size_y = list.h+2;
  326.         if (list.count > list.visible) scrollbar_v_draw(#scroll1);
  327. }
  328.  
  329. void DrawPixieTitle(dword _title)
  330. {
  331.         kfont.WriteIntoWindow(8, 5, theme.color_top_panel_bg,
  332.                 theme.color_top_panel_folder_name, list.font_type, _title);
  333. }
  334.  
  335. //===================================================//
  336. //                                                   //
  337. //                     EVENTS                        //
  338. //                                                   //
  339. //===================================================//
  340.  
  341.  
  342. void EventOpenFolder(dword _open_path)
  343. {
  344.         if (!_open_path)
  345.         {
  346.                 OpenDirectory(#work_folder);
  347.         }
  348.         else
  349.         {
  350.                 strcpy(#work_folder, _open_path);
  351.                 work_folder[strrchr(#work_folder, '/')-1]='\0';
  352.                 OpenDirectory(#work_folder);
  353.                 SetOpenedFileFirst(_open_path);
  354.         }
  355.         list.SetSizes(1, skin.h, skin.w-1, 22*15, 22);
  356.         if (list.count <= list.visible)
  357.         {
  358.                 list.h = list.count * list.item_h;
  359.                 list.visible = list.count;
  360.                 list.w -= 1;
  361.         }
  362.         else
  363.         {
  364.                 list.w -= scroll1.size_x;
  365.         }
  366.         if (window_mode==WINDOW_MODE_NORMAL) MoveSize(OLD, OLD, OLD, skin.h + list.h);
  367.         list.KeyHome();
  368.         current_playing_file_n=0;
  369.         EventStopPlaying();
  370.         if (_open_path) EventStartPlaying();   
  371. }
  372.  
  373.  
  374. void EventStopPlaying()
  375. {
  376.         if (player_run_id) player_run_id = KillProcess(player_run_id);
  377.         if (notify_run_id) notify_run_id = KillProcess(notify_run_id);
  378.         playback_mode = PLAYBACK_MODE_STOPED;
  379.         DrawTopPanel();
  380.         DrawPlayList();
  381. }
  382.  
  383.  
  384. void EventStartPlaying()
  385. {
  386.         word i;
  387.         char item_path[4096];
  388.         char notify_message[512];
  389.         EventStopPlaying();
  390.         if (current_playing_file_n >= list.count) {
  391.                 current_playing_file_n = list.count-1;
  392.                 return;
  393.         }
  394.         if (current_playing_file_n < 0) {
  395.                 current_playing_file_n = 0;
  396.                 return;
  397.         }
  398.         playback_mode = PLAYBACK_MODE_PLAYING;
  399.         strlcpy(#current_filename, Getcur_yItemName(), sizeof(current_filename));
  400.         sprintf(#item_path,"-h %s/%s",#work_folder,#current_filename);
  401.         current_filename[strrchr(#current_filename, '.')-1] = '\0';
  402.         DrawPlayList();
  403.         DrawTopPanel();
  404.         player_run_id = RunProgram("/sys/media/ac97snd", #item_path);  
  405.         sprintf(#notify_message,"'Now playing:\n%s' -St",#current_filename);
  406.         if (!repeat) && (window_mode==WINDOW_MODE_SMALL)
  407.         {
  408.                 for (i=2; i<strlen(#notify_message)-6; i++)
  409.                 {
  410.                         //replace ' char to avoid @notify misunderstood
  411.                         if (notify_message[i]=='\'') notify_message[i]=96;
  412.                 }
  413.                 notify_run_id = notify(#notify_message);
  414.         }
  415. }
  416.  
  417.  
  418. void EventPlayAndPause()
  419. {
  420.         if (playback_mode == PLAYBACK_MODE_PLAYING)
  421.         {
  422.                 playback_mode = PLAYBACK_MODE_STOPED;
  423.                 EventStopPlaying();
  424.         }
  425.         else
  426.         {
  427.                 playback_mode = PLAYBACK_MODE_PLAYING;
  428.                 EventStartPlaying();
  429.         }
  430. }
  431.  
  432.  
  433. void EventChangeWindowMode()
  434. {
  435.         if (window_mode == WINDOW_MODE_NORMAL)
  436.         {
  437.                 window_mode = WINDOW_MODE_SMALL;
  438.                 win_x_normal = Form.left;
  439.                 win_y_normal = Form.top;
  440.                 MoveSize(OLD, OLD, WIN_W_SMALL-1, WIN_H_SMALL-1);
  441.                 MoveSize(OLD, win_y_small, OLD, OLD);
  442.                 MoveSize(win_x_small, OLD, OLD, OLD);
  443.         }
  444.         else
  445.         {
  446.                 window_mode = WINDOW_MODE_NORMAL;
  447.                 win_x_small = Form.left;
  448.                 win_y_small = Form.top;
  449.                 MoveSize(win_x_normal, win_y_normal, skin.w -1 ,skin.h + list.h);
  450.         }
  451. }
  452.  
  453. void EventExitApp()
  454. {
  455.         EventStopPlaying();
  456.         SaveIniConfig();
  457.         ExitProcess();
  458. }
  459.  
  460. void EventPlaybackPrevious()
  461. {
  462.         if (shuffle) current_playing_file_n = random(list.count);
  463.         else current_playing_file_n--;
  464.         EventStartPlaying();
  465. }
  466.  
  467. void EventPlaybackNext()
  468. {
  469.         if (shuffle) current_playing_file_n = random(list.count);
  470.         else current_playing_file_n++;
  471.         EventStartPlaying();
  472. }
  473.  
  474. void EventStartPlayingSelectedItem()
  475. {
  476.         current_playing_file_n=list.cur_y;
  477.         EventStartPlaying();
  478. }
  479.  
  480. void EventFileDialogOpen()
  481. {
  482.         OpenDialog_start stdcall (#o_dialog);
  483.         if (o_dialog.status==1) EventOpenFolder(#openfile_path);
  484. }
  485.  
  486. void EventCheckSongFinished()
  487. {
  488.         if (playback_mode == PLAYBACK_MODE_PLAYING)
  489.         && (!GetProcessSlot(player_run_id)) {
  490.                 if (repeat) EventStartPlaying();
  491.                 else EventPlaybackNext();
  492.         }
  493. }
  494.  
  495. void EventRepeatClick()
  496. {
  497.         repeat ^= 1;
  498.         DrawTopPanel();
  499. }
  500.  
  501. void EventShuffleClick()
  502. {
  503.         shuffle ^= 1;
  504.         DrawTopPanel();
  505. }
  506.  
  507. void EventDeleteItem()
  508. {
  509.         int i;
  510.         if (list.cur_y == current_playing_file_n) EventStopPlaying();
  511.         for (i=list.cur_y; i<list.count; i++) files_mas[i] = files_mas[i+1];
  512.         list.count--;
  513.         if (i + list.first <= current_playing_file_n) current_playing_file_n--;
  514.         list.CheckDoesValuesOkey();
  515.         if (list.count <= list.visible)
  516.         {
  517.                 list.h = list.count * list.item_h;
  518.                 list.visible = list.count;
  519.                 list.w -= 1;
  520.                 if (window_mode==WINDOW_MODE_NORMAL) MoveSize(OLD, OLD, OLD, skin.h + list.h);
  521.         }
  522.         else DrawPlayList();
  523. }
  524.  
  525. void EventShowAbout()
  526. {
  527.         proc_info pop_up;
  528.         loop() switch(WaitEvent())
  529.         {
  530.                 case evButton:
  531.                         ExitProcess();
  532.                         break;
  533.                 case evKey:
  534.                         GetKeys();
  535.                         if (key_scancode == SCAN_CODE_ESC) ExitProcess();
  536.                         break;
  537.                 case evReDraw:
  538.                         DefineDragableWindow(150, 200, 400, 346);
  539.                         GetProcessInfo(#pop_up, SelfInfo);
  540.                         DrawBar(0, 0, pop_up.width, pop_up.height, theme.color_top_panel_bg);
  541.                         DrawRectangle(0, 0, pop_up.width, pop_up.height, theme.color_list_border);
  542.                         WriteTextLines(10, 10, 0x90, theme.color_top_panel_song_name, ABOUT_MESSAGE, 19);
  543.  
  544.                         DefineHiddenButton(pop_up.width - 27, 1, 26, 15, BUTTON_WINDOW_CLOSE);
  545.                         img_draw stdcall(skin.image, pop_up.width-28, 0, 28, 18, skin.w - 29, 0);
  546.                         DrawCaptButton(pop_up.width-10-80, pop_up.height - 34, 80, 24, 2,
  547.                           theme.color_list_active_bg, theme.color_top_panel_song_name, "Cool");
  548.         }
  549. }
  550.  
  551.  
  552. stop:
  553.  
  554. char menu_stak[4096];