/**
    \fn cleanup
    \brief deallocate
*/
uint8_t ADM_flyDialog::cleanup(void)
{
#define DEL1(x)    if(x) {delete [] x;x=NULL;}
#define DEL2(x)    if(x) {delete  x;x=NULL;}
    DEL2(_yuvBuffer);
    DEL1(_rgbBufferDisplay);
    DEL2(action);

    return 1;
}
Esempio n. 2
0
//`````````````````````````````````````````````````````````
void File_Pull_Menu()
{
     int index = 1;
     char ch;
     File_menu(0);
     do{
	 _setcursortype(_NOCURSOR);
	 ch = getch();
	 if(ch == char(0))
	    ch = getch();
	 switch(ch){
	      case char(16) : break;       //ctrl-p
	      case char( 3) : break;       //ctrl-c
	      case char(19) : break;       //ctrl-s
	      case char(75) :  active_status_bar(0,1);  //<--------
			       MAINMENU(1);
			       break;

	      case char(77) :                              //--------->
			       Fore_Ground_window();
			       active_status_bar(0,3);
			       menu(list_Cap,list,size,2);
			       PROGRAMMER_Pull_Menu();
			       break;

	      case char(27) :  active_status_bar(1,1);  //FILE
			       MAINMENU(2); //FILE
			       break;
	      //====================================
	      case char(72) : index = (index == 1)    ? File_Size1 : index-1;break;   // up
	      case char(80) : index = (index == File_Size1) ? 1    : index+1;break;   //down
	      case char(13) :
			     switch(index){
				       case 1 : _setcursortype(_NORMALCURSOR);     //dir
					       DIRR();
					       active_status_bar(1,1); //
					       MAINMENU(2);

				       case 2 : _setcursortype(_NORMALCURSOR);
					       BIOS1();  //CHECK BIOS
					       active_status_bar(1,1); //
					       MAINMENU(2);

				       case 3 : _setcursortype(_NORMALCURSOR);
						SAVE();
						active_status_bar(1,1); //
						MAINMENU(2);      break;
				       case 4 : _setcursortype(_NORMALCURSOR);
						CHANGE_DIR();
						active_status_bar(1,1); //
						MAINMENU(2);
						break;
				       case 5 : _setcursortype(_NORMALCURSOR);
						DEL1(1);
						active_status_bar(1,1); //
						MAINMENU(2);        break;
				       case 6 : _setcursortype(_NORMALCURSOR);
						DEL1(2);
						active_status_bar(1,1); //
						MAINMENU(2);break;
				       case 7 : _setcursortype(_NORMALCURSOR);

						active_status_bar(1,1); //
						MAINMENU(2);   break;
				       case 8 : _setcursortype(_NORMALCURSOR);
						Msgbox();
						exit(0);break;

				}
	 }
	 active_status_bar(index-1,2); //
	 File_menu(index-1);
     } while ( ch != 13 || ch != 27 || ch != 6 || ch != 3 || ch != 19 || ch != 27 );
}