void cmove(int n,char a,char b,char c) { static int times=0; if(n==1) { times++; printf("%d times: Move %d from tower %c to %c\n",times,1,a,c); } else { cmove(n-1,a,c,b); times++; printf("%d times: Move %d from tower %c to %c\n",times,n,a,c); cmove(n-1,b,a,c); } }
int main(void) { int n; scanf("%d",&n); cmove(n,'a','b','c'); system("pause"); }
void eTPEditDialog::init_eTPEditDialog() { setText(_("Transponder Edit")); cmove( ePoint( 120, 150 ) ); cresize( eSize( 460, 300 ) ); tpWidget=new eTransponderWidget(this, 1, eTransponderWidget::deliverySatellite| eTransponderWidget::flagNoSat| eTransponderWidget::flagNoInv); tpWidget->resize( eSize( 460, 130 ) ); tpWidget->load(); tpWidget->setTransponder( tp ); tpWidget->move( ePoint(0,-40) ); save=new eButton( this ); save->setText(_("save")); save->setShortcut("green"); save->setShortcutPixmap("green"); save->setHelpText(_("save changes and return")); save->move(ePoint( 10, getClientSize().height()-80) ); save->resize( eSize( 220, 40 ) ); save->loadDeco(); CONNECT( save->selected, eTPEditDialog::savePressed ); eStatusBar *sbar = new eStatusBar(this); sbar->move( ePoint( 0, getClientSize().height()-30) ); sbar->resize( eSize( getClientSize().width(), 30 ) ); sbar->loadDeco(); setHelpID(63); }
RunApp::RunApp (): eWindow (0) { //setText(_("Running script")); printf ("%s is running, please wait\n", Executable); setText (eString ().sprintf ("%s is running, please wait", Executable)); cmove (ePoint (50, 100)); cresize (eSize (630, 400)); bClose = new eButton (this); bClose->setText (_("Close")); bClose->setShortcut ("green"); bClose->setShortcutPixmap ("green"); bClose->move (ePoint (440, 10)); bClose->resize (eSize (170, 40)); bClose->loadDeco (); bClose->hide (); CONNECT (bClose->selected, RunApp::accept); /* bCancel=new eButton(this); bCancel->loadDeco(); bCancel->setText(_("abort")); bCancel->move(ePoint(210, 220)); bCancel->resize(eSize(170, 40)); bCancel->setHelpText(_("ignore changes and return")); CONNECT( bCancel->selected, RunApp::onCancel ); */ lState = new eLabel (this); lState->setName ("state"); lState->move (ePoint (0, 0)); lState->resize (eSize (630, 400)); }
void LIRGenerator::do_AttemptUpdate(Intrinsic* x) { assert(x->number_of_arguments() == 3, "wrong type"); LIRItem obj (x->argument_at(0), this); // AtomicLong object LIRItem cmp_value (x->argument_at(1), this); // value to compare with field LIRItem new_value (x->argument_at(2), this); // replace field with new_value if it matches cmp_value // compare value must be in rdx,eax (hi,lo); may be destroyed by cmpxchg8 instruction cmp_value.load_item_force(FrameMap::long0_opr); // new value must be in rcx,ebx (hi,lo) new_value.load_item_force(FrameMap::long1_opr); // object pointer register is overwritten with field address obj.load_item(); // generate compare-and-swap; produces zero condition if swap occurs int value_offset = sun_misc_AtomicLongCSImpl::value_offset(); LIR_Opr addr = new_pointer_register(); __ leal(LIR_OprFact::address(new LIR_Address(obj.result(), value_offset, T_LONG)), addr); LIR_Opr t1 = LIR_OprFact::illegalOpr; // no temp needed LIR_Opr t2 = LIR_OprFact::illegalOpr; // no temp needed __ cas_long(addr, cmp_value.result(), new_value.result(), t1, t2); // generate conditional move of boolean result LIR_Opr result = rlock_result(x); __ cmove(lir_cond_equal, LIR_OprFact::intConst(1), LIR_OprFact::intConst(0), result, T_LONG); }
SetupRdg::SetupRdg (): eWindow (0) { SetupRdg::GetCFG (); int fd = eSkin::getActive ()->queryValue ("fontsize", 16); int s_y = 130, h_x = 250; eLabel *l; setText (dgettext("plisetup", "Radegast setup")); cmove (ePoint (720 / 2 - h_x, 120)); cresize (eSize (h_x * 2, 380)); ok = new eButton (this); ok->setText (dgettext("plisetup", "Save")); ok->setShortcut ("green"); ok->setShortcutPixmap ("green"); ok->move (ePoint (10, 270)); ok->resize (eSize (150, 40)); ok->setHelpText (dgettext("plisetup", "Save changes and return")); ok->loadDeco (); CONNECT (ok->selected, SetupRdg::okPressed); abort = new eButton (this); abort->setShortcut ("red"); abort->setShortcutPixmap ("red"); abort->loadDeco (); abort->setText (dgettext("plisetup", "Abort")); abort->move (ePoint (180, 270)); abort->resize (eSize (150, 40)); abort->setHelpText (dgettext("plisetup", "Ignore changes and return")); CONNECT (abort->selected, SetupRdg::abortPressed); defaults = new eButton (this); defaults->setShortcut ("blue"); defaults->setShortcutPixmap ("blue"); defaults->loadDeco (); defaults->setText (dgettext("plisetup", "defaults")); defaults->move (ePoint (180 + 170, 270)); defaults->resize (eSize (150, 40)); defaults->setHelpText (dgettext("plisetup", "Load good defaults for local CS")); CONNECT (defaults->selected, SetupRdg::defaultsPressed); statusbar = new eStatusBar (this); statusbar->move (ePoint (0, clientrect.height () - 60)); statusbar->resize (eSize (clientrect.width (), 50)); statusbar->loadDeco (); }
void LIRGenerator::do_CompareAndSwap(Intrinsic* x, ValueType* type) { assert(x->number_of_arguments() == 4, "wrong type"); LIRItem obj (x->argument_at(0), this); // object LIRItem offset(x->argument_at(1), this); // offset of field LIRItem cmp (x->argument_at(2), this); // value to compare with field LIRItem val (x->argument_at(3), this); // replace field with val if matches cmp // Use temps to avoid kills LIR_Opr t1 = FrameMap::G1_opr; LIR_Opr t2 = FrameMap::G3_opr; LIR_Opr addr = new_pointer_register(); // get address of field obj.load_item(); offset.load_item(); cmp.load_item(); val.load_item(); __ add(obj.result(), offset.result(), addr); if (type == objectType) { // Write-barrier needed for Object fields. pre_barrier(obj.result(), false, NULL); } if (type == objectType) __ cas_obj(addr, cmp.result(), val.result(), t1, t2); else if (type == intType) __ cas_int(addr, cmp.result(), val.result(), t1, t2); else if (type == longType) __ cas_long(addr, cmp.result(), val.result(), t1, t2); else { ShouldNotReachHere(); } // generate conditional move of boolean result LIR_Opr result = rlock_result(x); __ cmove(lir_cond_equal, LIR_OprFact::intConst(1), LIR_OprFact::intConst(0), result); if (type == objectType) { // Write-barrier needed for Object fields. #ifdef PRECISE_CARDMARK post_barrier(addr, val.result()); #else post_barrier(obj.result(), val.result()); #endif // PRECISE_CARDMARK } }
void LIRGenerator::do_AttemptUpdate(Intrinsic* x) { assert(x->number_of_arguments() == 3, "wrong type"); LIRItem obj (x->argument_at(0), this); // AtomicLong object LIRItem cmp_value (x->argument_at(1), this); // value to compare with field LIRItem new_value (x->argument_at(2), this); // replace field with new_value if it matches cmp_value obj.load_item(); cmp_value.load_item(); new_value.load_item(); // generate compare-and-swap and produce zero condition if swap occurs int value_offset = sun_misc_AtomicLongCSImpl::value_offset(); LIR_Opr addr = FrameMap::O7_opr; __ add(obj.result(), LIR_OprFact::intConst(value_offset), addr); LIR_Opr t1 = FrameMap::G1_opr; // temp for 64-bit value LIR_Opr t2 = FrameMap::G3_opr; // temp for 64-bit value __ cas_long(addr, cmp_value.result(), new_value.result(), t1, t2); // generate conditional move of boolean result LIR_Opr result = rlock_result(x); __ cmove(lir_cond_equal, LIR_OprFact::intConst(1), LIR_OprFact::intConst(0), result); }
Bool findplay(Play *p, Rack *r) { /* Find the best possible play given rack 'r', * store it in 'p', return whether or not one * was found. */ Word w; wordclear(&w); p->score = -1; if(firstmove) { /* just find the biggest scoring word, * don't worry too much about where to put it. */ ana(root, &w, r, p); p->pos = CENTRE; } else cmove(p,r); return p->score >= 0; }
void LIRGenerator::do_CompareAndSwap(Intrinsic* x, ValueType* type) { assert(x->number_of_arguments() == 4, "wrong type"); LIRItem obj (x->argument_at(0), this); // object LIRItem offset(x->argument_at(1), this); // offset of field LIRItem cmp (x->argument_at(2), this); // value to compare with field LIRItem val (x->argument_at(3), this); // replace field with val if matches cmp assert(obj.type()->tag() == objectTag, "invalid type"); // In 64bit the type can be long, sparc doesn't have this assert // assert(offset.type()->tag() == intTag, "invalid type"); assert(cmp.type()->tag() == type->tag(), "invalid type"); assert(val.type()->tag() == type->tag(), "invalid type"); // get address of field obj.load_item(); offset.load_nonconstant(); if (type == objectType) { cmp.load_item_force(FrameMap::rax_oop_opr); val.load_item(); } else if (type == intType) { cmp.load_item_force(FrameMap::rax_opr); val.load_item(); } else if (type == longType) { cmp.load_item_force(FrameMap::long0_opr); val.load_item_force(FrameMap::long1_opr); } else { ShouldNotReachHere(); } LIR_Opr addr = new_pointer_register(); LIR_Address* a; if(offset.result()->is_constant()) { a = new LIR_Address(obj.result(), NOT_LP64(offset.result()->as_constant_ptr()->as_jint()) LP64_ONLY((int)offset.result()->as_constant_ptr()->as_jlong()), as_BasicType(type)); } else { a = new LIR_Address(obj.result(), offset.result(), LIR_Address::times_1, 0, as_BasicType(type)); } __ leal(LIR_OprFact::address(a), addr); if (type == objectType) { // Write-barrier needed for Object fields. // Do the pre-write barrier, if any. pre_barrier(addr, false, NULL); } LIR_Opr ill = LIR_OprFact::illegalOpr; // for convenience if (type == objectType) __ cas_obj(addr, cmp.result(), val.result(), ill, ill); else if (type == intType) __ cas_int(addr, cmp.result(), val.result(), ill, ill); else if (type == longType) __ cas_long(addr, cmp.result(), val.result(), ill, ill); else { ShouldNotReachHere(); } // generate conditional move of boolean result LIR_Opr result = rlock_result(x); __ cmove(lir_cond_equal, LIR_OprFact::intConst(1), LIR_OprFact::intConst(0), result, as_BasicType(type)); if (type == objectType) { // Write-barrier needed for Object fields. // Seems to be precise post_barrier(addr, val.result()); } }
void eSatEditDialog::init_eSatEditDialog() { setText(_("Satellite Edit")); cmove(ePoint(100,100)); cresize(eSize(470,360)); name = new eTextInputField(this); name->move(ePoint(10,10)); name->resize(eSize(clientrect.size().width()-20, 35)); name->setHelpText(_("press ok to change satellite name")); name->setMaxChars(50); name->loadDeco(); name->setText( tp->name ); name->setUseableChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,/()-°"); eLabel *l = new eLabel(this); l->move( ePoint(10, 55) ); l->resize( eSize(250, 35) ); l->setText(_("Orbital Position:")); OrbitalPos = new eNumber( this, 1, 0, 3600, 4, 0, 0, l); OrbitalPos->setHelpText(_("enter orbital position without dot (19.2\xC2\xB0 = 192)")); OrbitalPos->move( ePoint(270, 55) ); OrbitalPos->resize( eSize(70, 35) ); OrbitalPos->loadDeco(); OrbitalPos->setNumber( abs(tp->orbital_position) ); direction = new eComboBox( this, 2, 0 ); direction->move( ePoint(350,55) ); direction->resize( eSize (110, 35) ); direction->setHelpText(_("press ok to change direction")); direction->loadDeco(); new eListBoxEntryText( *direction, _("East"), (void*)0, 0, _("East") ); new eListBoxEntryText( *direction, _("West"), (void*)1, 0, _("West") ); direction->setCurrent( (void*) (tp->orbital_position<0) ); eSize cwidth=eSize(clientrect.width()-20,30); doNetworkSearch = new eCheckbox(this); doNetworkSearch->move(ePoint(10,95)); doNetworkSearch->resize( cwidth ); doNetworkSearch->setText(_("Network search")); doNetworkSearch->setHelpText(_("scan Network Information Table(s)\nthis is recommend")); doNetworkSearch->setCheck( tp->scanflags&eDVBScanController::flagNetworkSearch ); useONIT = new eCheckbox(this); useONIT->move(ePoint(10, 135)); useONIT->resize( cwidth ); useONIT->setText(_("Extended networks search")); useONIT->setHelpText(_("scan NITs of other transponders\nthis is slower, but sometimes needed)")); useONIT->setCheck( tp->scanflags&eDVBScanController::flagUseONIT ); useBAT = new eCheckbox(this); useBAT->move(ePoint(10,175) ); useBAT->resize( cwidth ); useBAT->setText(_("Use BAT")); useBAT->setHelpText(_("use Provider DVB Bouquet Tables if exist")); useBAT->setCheck(tp->scanflags&eDVBScanController::flagUseBAT?1:0 ); save = new eButton(this); save->setText(_("save")); save->move( ePoint(10,255) ); save->resize( eSize( 200, 40 )); save->loadDeco(); save->setShortcut("green"); save->setShortcutPixmap("green"); save->setHelpText(_("save changes and return")); CONNECT(save->selected, eSatEditDialog::savePressed ); sbar=new eStatusBar(this); sbar->move( ePoint(0, clientrect.height()-50) ); sbar->resize( eSize( clientrect.width(), 50) ); sbar->loadDeco(); }
void ENgrabSetup::init_ENgrabSetup() { setText(_("Ngrab Server")); cmove(ePoint(170, 146)); cresize(eSize(390, 310)); struct in_addr sinet_address; int nsrvport; int de[4]; int fd=eSkin::getActive()->queryValue("fontsize", 20); if ( eConfig::getInstance()->getKey("/elitedvb/network/nserver", sinet_address.s_addr) ) sinet_address.s_addr = 0xC0A80028; // 192.168.0.40 if ( eConfig::getInstance()->getKey("/elitedvb/network/nservport", nsrvport ) ) nsrvport = 4000; eLabel *l=new eLabel(this); l->setText("Srv IP:"); l->move(ePoint(20, 20)); l->resize(eSize(140, fd+4)); eNumber::unpack(sinet_address.s_addr, de); inet_address=new eNumber(this, 4, 0, 255, 3, de, 0, l); inet_address->move(ePoint(160, 20)); inet_address->resize(eSize(200, fd+10)); inet_address->setFlags(eNumber::flagDrawPoints); inet_address->setHelpText(_("enter IP Adress of the Ngrab Server (0..9, left, right)")); inet_address->loadDeco(); l=new eLabel(this); l->setText("Srv Port:"); l->move(ePoint(20, 60)); l->resize(eSize(140, fd+4)); srvport=new eNumber(this, 1, 0, 9999, 4, &nsrvport, 0, l); srvport->move(ePoint(160, 60)); srvport->resize(eSize(200, fd+10)); srvport->setFlags(eNumber::flagDrawPoints); srvport->setHelpText(_("enter ngrab server port (standard is 4000)")); srvport->loadDeco(); l=new eLabel(this); l->setText("Srv MAC:"); l->move(ePoint(20,100)); l->resize(eSize(140, fd+4)); serverMAC=new eTextInputField(this); serverMAC->move(ePoint(160,100)); serverMAC->resize(eSize(200, fd+10)); serverMAC->setHelpText(_("enter MAC address of server (for wake on lan)")); serverMAC->setUseableChars("01234567890abcdefABCDEF:"); serverMAC->setMaxChars(17); serverMAC->loadDeco(); char* sMAC=0; if ( eConfig::getInstance()->getKey("/elitedvb/network/hwaddress", sMAC ) ) serverMAC->setText("00:00:00:00:00:00"); else { serverMAC->setText(sMAC); free(sMAC); } bServerMAC=new eButton(this); bServerMAC->move(ePoint(20,150)); bServerMAC->resize(eSize(340,40)); bServerMAC->setShortcut("blue"); bServerMAC->setShortcutPixmap("blue"); bServerMAC->setText(_("detect MAC Adress")); bServerMAC->setHelpText(_("try to autodetect server MAC address")); bServerMAC->loadDeco(); CONNECT( bServerMAC->selected, ENgrabSetup::detectMAC ); ok=new eButton(this); ok->setText(_("save")); ok->setShortcut("green"); ok->setShortcutPixmap("green"); ok->move(ePoint(20, 210)); ok->resize(eSize(220, 40)); ok->setHelpText(_("save changes and return")); ok->loadDeco(); CONNECT(ok->selected, ENgrabSetup::okPressed); statusbar=new eStatusBar(this); statusbar->move( ePoint(0, clientrect.height()-50 ) ); statusbar->resize( eSize( clientrect.width(), 50) ); statusbar->loadDeco(); setHelpID(91); }
void eExpertSetup::init_eExpertSetup() { cmove(ePoint(135, 100)); int showlogo=0; if ( eConfig::getInstance()->getKey("/ezap/extra/showlogo", showlogo) ) eConfig::getInstance()->setKey("/ezap/extra/showlogo", showlogo); int logChannelName=0; if ( eConfig::getInstance()->getKey("/ezap/extra/logChannelName", logChannelName) ) eConfig::getInstance()->setKey("/ezap/extra/logChannelName", logChannelName); int lockWebIf=1; if ( eConfig::getInstance()->getKey("/ezap/webif/lockWebIf", lockWebIf) ) eConfig::getInstance()->setKey("/ezap/webif/lockWebIf", lockWebIf); int showSatPos=1; if ( eConfig::getInstance()->getKey("/extras/showSatPos", showSatPos) ) eConfig::getInstance()->setKey("/extras/showSatPos", showSatPos); int entry=0; #ifndef DISABLE_NETWORK if (eSystemInfo::getInstance()->hasNetwork()) { CONNECT((new eListBoxEntryMenu(&list, _("Communication Setup"), eString().sprintf("(%d) %s", ++entry, _("open communication setup")) ))->selected, eExpertSetup::communication_setup); CONNECT((new eListBoxEntryMenu(&list, _("Ngrab Streaming Setup"), eString().sprintf("(%d) %s", ++entry, _("open ngrab server setup")) ))->selected, eExpertSetup::ngrab_setup); switch (eSystemInfo::getInstance()->getHwType()) { case eSystemInfo::DM7020: case eSystemInfo::DM600PVR: case eSystemInfo::DM500PLUS: break; default: CONNECT((new eListBoxEntryMenu(&list, _("Software Update"), eString().sprintf("(%d) %s", ++entry, _("open software update")) ))->selected, eExpertSetup::software_update); } } int startSamba=1; if ( eConfig::getInstance()->getKey("/elitedvb/network/samba", startSamba) ) eConfig::getInstance()->setKey("/elitedvb/network/samba", startSamba); #endif CONNECT((new eListBoxEntryMenu(&list, _("Remote Control"), eString().sprintf("(%d) %s", ++entry, _("open remote control setup")) ))->selected, eExpertSetup::rc_setup); #ifndef DISABLE_HDD #ifndef DISABLE_FILE CONNECT((new eListBoxEntryMenu(&list, _("Swap Manager"), eString().sprintf("(%d) %s", ++entry, _("open swapspace setup")) ))->selected, eExpertSetup::swapmanager); #endif #endif if ( eSystemInfo::getInstance()->getHwType() >= eSystemInfo::DM7000 ) CONNECT((new eListBoxEntryMenu(&list, _("Factory reset"), eString().sprintf("(%d) %s", ++entry, _("all settings will set to factory defaults")) ))->selected, eExpertSetup::factory_reset); CONNECT((new eListBoxEntryMenu(&list, _("EPG settings"), eString().sprintf("(%d) %s", ++entry, _("open EPG settings")) ))->selected, eExpertSetup::setup_epgcache); new eListBoxEntryMenuSeparator(&list, eSkin::getActive()->queryImage("listbox.separator"), 0, true ); #ifdef ENABLE_IPKG CONNECT((new eListBoxEntryMenu(&list, _("package manager"), eString().sprintf("(%d) %s", ++entry, _("open package manager")) ))->selected, eExpertSetup::setup_ipkg); new eListBoxEntryMenuSeparator(&list, eSkin::getActive()->queryImage("listbox.separator"), 0, true ); #endif list.setFlags(list.getFlags()|eListBoxBase::flagNoPageMovement); #ifndef DISABLE_FILE if ( eSystemInfo::getInstance()->canRecordTS() && !eDVB::getInstance()->recorder ) { record_split_size = new eListBoxEntryMulti(&list, _("record split size (left, right)")); record_split_size->add(" 650MB >", 650*1024); record_split_size->add("< 700MB >", 700*1024); record_split_size->add("< 800MB >", 800*1024); record_split_size->add("< 1GB >", 1024*1024); record_split_size->add("< 1,5GB >", 1536*1024); record_split_size->add("< 2GB >", 2*1024*1024); record_split_size->add("< 4GB >", 4*1024*1024); record_split_size->add("< 8GB >", 8*1024*1024); record_split_size->add("< 16GB ", 16*1024*1024); int splitsize=0; if (eConfig::getInstance()->getKey("/extras/record_splitsize", splitsize)) splitsize=1024*1024; // 1G record_split_size->setCurrent(splitsize); CONNECT( list.selchanged, eExpertSetup::selChanged ); } // Timeroffset (Anfang) timeroffsetstart = new eListBoxEntryMulti( &list, (_("Change timer offset [start] (left, right)"))); for (int i = 0; i <= 10; i++) timeroffsetstart->add( (eString)(i ? " ":"< ") + eString().sprintf(_("Timer offset [start] %d min"), i) + (eString)(i < 10 ? " >":" "), i); int offsetstart=0; if (eConfig::getInstance()->getKey("/enigma/timeroffset", offsetstart) ) offsetstart=0; // 0 Minutes timeroffsetstart->setCurrent(offsetstart); CONNECT(list.selchanged, eExpertSetup::startoffsetChanged ); // Timeroffset (Ende) timeroffsetend = new eListBoxEntryMulti( &list, (_("Change timer offset [end] (left, right)"))); for (int i = 0; i <= 10; i++) timeroffsetend->add( (eString)(i ? " ":"< ") + eString().sprintf(_("Timer offset [end] %d min"), i) + (eString)(i < 10 ? " >":" "), i); int offsetend=0; if (eConfig::getInstance()->getKey("/enigma/timeroffset2", offsetend) ) offsetend=0; // 0 Minutes timeroffsetend->setCurrent(offsetend); CONNECT(list.selchanged, eExpertSetup::endoffsetChanged ); timerenddefaultaction = new eListBoxEntryMulti( &list, _("Default action on timer end (left, right)")); timerenddefaultaction->add( eString().sprintf("%s: %s%s",_("Action on timer end"),_("Nothing")," >").c_str(), 0 ); if ( eSystemInfo::getInstance()->canShutdown() ) { timerenddefaultaction->add( eString().sprintf("< %s: %s >", _("Action on timer end"), _("Standby")).c_str(), ePlaylistEntry::doGoSleep ); timerenddefaultaction->add( eString().sprintf("< %s: %s", _("Action on timer end"), _("Shutdown")).c_str(), ePlaylistEntry::doShutdown ); } else { timerenddefaultaction->add( eString().sprintf("< %s: %s", _("Action on timer end"), _("Standby")).c_str(), ePlaylistEntry::doGoSleep ); } int defaultaction = 0; if (eConfig::getInstance()->getKey("/enigma/timerenddefaultaction", defaultaction) ) defaultaction = 0; timerenddefaultaction->setCurrent(defaultaction); CONNECT(list.selchanged, eExpertSetup::timerenddefaultactionChanged ); new eListBoxEntryMenuSeparator(&list, eSkin::getActive()->queryImage("listbox.separator"), 0, true ); new eListBoxEntryCheck(&list, _("disable AC3 recording"), "/enigma/noac3recording", _("don't record AC3 audio track")); new eListBoxEntryCheck(&list, _("disable teletext recording"), "/enigma/nottxrecording", _("don't record teletext track")); new eListBoxEntryCheck(&list, _("disable timestamp detection"), "/enigma/notimestampdetect", _("don't try to detect duration from DVB timestamps when replaying recordings")); new eListBoxEntryMenuSeparator(&list, eSkin::getActive()->queryImage("listbox.separator"), 0, true ); #endif if ( eSystemInfo::getInstance()->getHwType() >= eSystemInfo::DM7000 ) CONNECT((new eListBoxEntryCheck(&list,_("Enable fast zapping"),"/elitedvb/extra/fastzapping",_("enables faster zapping.. but with visible sync")))->selected, eExpertSetup::fastZappingChanged ); CONNECT((new eListBoxEntryCheck(&list, _("Use http authentification"), "/ezap/webif/lockWebIf", _("enables the http (user/password) authentification")))->selected, eExpertSetup::reinitializeHTTPServer ); CONNECT((new eListBoxEntryCheck(&list, _("Don't open serial port"), "/ezap/extra/disableSerialOutput", _("don't write debug messages to /dev/tts/0")))->selected, eExpertSetup::reinitializeHTTPServer ); new eListBoxEntryCheck(&list, _("Auto bouquet change"), "/elitedvb/extra/autobouquetchange", _("change into next bouquet when end of current bouquet is reached")); new eListBoxEntryCheck(&list, _("Auto reconnect cahandler"), "/elitedvb/extra/cahandlerReconnect", _("try to reconnect when an external cahandler connection was lost")); #ifndef DISABLE_NETWORK if ( eSystemInfo::getInstance()->getHwType() == eSystemInfo::DM7000 || eSystemInfo::getInstance()->getHwType() == eSystemInfo::DM7020) new eListBoxEntryCheck(&list, _("Enable file sharing"), "/elitedvb/network/samba", _("start file sharing(samba) on startup")); #endif #ifndef TUXTXT_CFG_STANDALONE CONNECT((new eListBoxEntryCheck(&list, _("Disable teletext caching"), "/ezap/extra/teletext_caching", _("don't cache teletext pages in background")))->selected, eExpertSetup::tuxtxtCachingChanged ); #endif new eListBoxEntryCheck(&list, _("Disable internal teletext"), "/ezap/teletext/use_external", _("use external tuxtxt plugin")); new eListBoxEntryCheck(&list, _("Enable Zapping History"), "/elitedvb/extra/extzapping", _("don't care about actual mode when zapping in history list")); if ( eSystemInfo::getInstance()->getHwType() < eSystemInfo::DM5600 ) new eListBoxEntryCheck(&list, _("Disable Standby"), "/extras/fastshutdown", _("Box goes directly into Deep-Standby")); #ifdef ENABLE_MHW_EPG int mhwepg=1; if ( eConfig::getInstance()->getKey("/extras/mhwepg", mhwepg) ) eConfig::getInstance()->setKey("/extras/mhwepg", mhwepg); new eListBoxEntryCheck(&list, _("Enable MHW EPG"), "/extras/mhwepg", _("Mediahighway EPG, activate swap space when using with multiple operators")); #endif #ifdef HAVE_DREAMBOX_HARDWARE if ( eSystemInfo::getInstance()->getHwType() == eSystemInfo::DM7000 ) { int corefilesDisable = 0; if (access("/var/etc/.no_corefiles", R_OK) == 0) corefilesDisable = 1; eConfig::getInstance()->setKey("/extras/corefiles_disable", corefilesDisable); new eListBoxEntryMenuSeparator(&list, eSkin::getActive()->queryImage("listbox.separator"), 0, true ); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Disable CoreFiles"), "/extras/corefiles_disable", _("don't create 'Corefiles' after an Enigma crash")))->selected, eExpertSetup::fileToggle,"/var/etc/.no_corefiles"); #ifdef ENABLE_EXPERT_WEBIF int dontMountHDD = 0; if (access("/var/etc/.dont_mount_hdd", R_OK) == 0) dontMountHDD = 1; eConfig::getInstance()->setKey("/extras/dont_mount_hdd", dontMountHDD); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Disable HDD mount"), "/extras/dont_mount_hdd", _("don't mount the HDD via 'rcS'")))->selected, eExpertSetup::fileToggle,"/var/etc/.dont_mount_hdd"); #endif } #endif #ifndef DISABLE_FILE int autoplay=1; if ( eConfig::getInstance()->getKey("/ezap/extra/autoplay", autoplay) ) eConfig::getInstance()->setKey("/ezap/extra/autoplay", autoplay); new eListBoxEntryCheck(&list, _("Enable Filemode Autoplay"), "/ezap/extra/autoplay", _("continue playing last selected movie when entering Filemode")); #endif #ifdef HAVE_DBOX_HARDWARE new eListBoxEntryMenuSeparator(&list, eSkin::getActive()->queryImage("listbox.separator"), 0, true ); //Boot-info int bootInfo = 0; if (access("/var/etc/.boot_info", R_OK) == 0) bootInfo = 1; eConfig::getInstance()->setKey("/extras/bootinfo", bootInfo); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Show Boot-Info"), "/extras/bootinfo", _("Show Boot-Infos (IP, etc.)")))->selected, eExpertSetup::fileToggle,"/var/etc/.boot_info"); //HW-Sections int hwSectionsDisable = 0; if (access("/var/etc/.hw_sections", R_OK) == 0) hwSectionsDisable = 1; eConfig::getInstance()->setKey("/extras/hw_sections_disable", hwSectionsDisable); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Disable HW_Sections"), "/extras/hw_sections_disable", _("don't use hardware section filtering")))->selected, eExpertSetup::fileToggle,"/var/etc/.hw_sections"); //Watchdog int watchdogDisable = 0; if (access("/var/etc/.no_watchdog", R_OK) == 0) watchdogDisable = 1; eConfig::getInstance()->setKey("/extras/watchdog_disable", watchdogDisable); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Disable Watchdog"), "/extras/watchdog_disable", _("don't use the Watchdog")))->selected, eExpertSetup::fileToggle,"/var/etc/.no_watchdog"); //ENX-Watchdog - Philips and Sagem if ( eSystemInfo::getInstance()->getHwType() != eSystemInfo::dbox2Nokia ) { int enxWatchdogDisable = 0; if (access("/var/etc/.no_enxwatchdog", R_OK) == 0) enxWatchdogDisable = 1; eConfig::getInstance()->setKey("/extras/enxwatchdog_disable", enxWatchdogDisable); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Disable ENX-Watchdog"), "/extras/enxwatchdog_disable", _("don't use the ENX-Watchdog")))->selected, eExpertSetup::fileToggle,"/var/etc/.no_enxwatchdog"); } //SPTS-Recording int sptsMode = 0; if (access("/var/etc/.spts_mode", R_OK) == 0) sptsMode = 1; eConfig::getInstance()->setKey("/extras/spts_mode", sptsMode); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Enable SPTS-Mode"), "/extras/spts_mode", _("use SPTS-Mode (enables TS-recording)")))->selected, eExpertSetup::fileToggle,"/var/etc/.spts_mode"); //File I/O-Options int OSyncDisable = 0; if (access("/var/etc/.no_o_sync", R_OK) == 0) OSyncDisable = 1; eConfig::getInstance()->setKey("/extras/O_SYNC_disable", OSyncDisable); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Disable O_SYNC"), "/extras/O_SYNC_disable", _("The file/recording is not opened for synchronous I/O")))->selected, eExpertSetup::fileToggle,"/var/etc/.no_o_sync"); #endif setHelpID(92); }
void eOSDExpertSetup::init_eOSDExpertSetup() { cmove(ePoint(170, 115)); int showosd=1; if ( eConfig::getInstance()->getKey("/ezap/osd/showOSDOnSwitchService", showosd) ) eConfig::getInstance()->setKey("/ezap/osd/showOSDOnSwitchService", showosd); list.setFlags(list.getFlags()|eListBoxBase::flagNoPageMovement); timeout_infobar = new eListBoxEntryMulti(&list, _("infobar timeout (left, right)")); timeout_infobar->add((eString)" " + eString().sprintf(_("Infobar timeout %d sec"), 2) + (eString)" >", 2); timeout_infobar->add((eString)"< " + eString().sprintf(_("Infobar timeout %d sec"), 3) + (eString)" >", 3); timeout_infobar->add((eString)"< " + eString().sprintf(_("Infobar timeout %d sec"), 4) + (eString)" >", 4); timeout_infobar->add((eString)"< " + eString().sprintf(_("Infobar timeout %d sec"), 5) + (eString)" >", 5); timeout_infobar->add((eString)"< " + eString().sprintf(_("Infobar timeout %d sec"), 6) + (eString)" >", 6); timeout_infobar->add((eString)"< " + eString().sprintf(_("Infobar timeout %d sec"), 7) + (eString)" >", 7); timeout_infobar->add((eString)"< " + eString().sprintf(_("Infobar timeout %d sec"), 8) + (eString)" >", 8); timeout_infobar->add((eString)"< " + eString().sprintf(_("Infobar timeout %d sec"), 9) + (eString)" >", 9); timeout_infobar->add((eString)"< " + eString().sprintf(_("Infobar timeout %d sec"), 10) + (eString)" >", 10); timeout_infobar->add((eString)"< " + eString().sprintf(_("Infobar timeout %d sec"), 11) + (eString)" >", 11); timeout_infobar->add((eString)"< " + eString().sprintf(_("Infobar timeout %d sec"), 12) + (eString)" ", 12); int timeoutInfobar = 6; eConfig::getInstance()->getKey("/enigma/timeoutInfobar", timeoutInfobar); timeout_infobar->setCurrent(timeoutInfobar); CONNECT( list.selchanged, eOSDExpertSetup::selInfobarChanged ); timeout_volumebar = new eListBoxEntryMulti(&list, _("volumebar timeout (left, right)")); timeout_volumebar->add((eString)" " + eString().sprintf(_("volumebar timeout %d.%d sec"), 0, 5) + (eString)" >", 500); timeout_volumebar->add((eString)"< " + eString().sprintf(_("volumebar timeout %d.%d sec"), 1, 0) + (eString)" >", 1000); timeout_volumebar->add((eString)"< " + eString().sprintf(_("volumebar timeout %d.%d sec"), 1, 5) + (eString)" >", 1500); timeout_volumebar->add((eString)"< " + eString().sprintf(_("volumebar timeout %d.%d sec"), 2, 0) + (eString)" >", 2000); timeout_volumebar->add((eString)"< " + eString().sprintf(_("volumebar timeout %d.%d sec"), 2, 5) + (eString)" >", 2500); timeout_volumebar->add((eString)"< " + eString().sprintf(_("volumebar timeout %d.%d sec"), 3, 0) + (eString)" >", 3000); timeout_volumebar->add((eString)"< " + eString().sprintf(_("volumebar timeout %d.%d sec"), 3, 5) + (eString)" >", 3500); timeout_volumebar->add((eString)"< " + eString().sprintf(_("volumebar timeout %d.%d sec"), 4, 0) + (eString)" >", 4000); timeout_volumebar->add((eString)"< " + eString().sprintf(_("volumebar timeout %d.%d sec"), 4, 5) + (eString)" >", 4500); timeout_volumebar->add((eString)"< " + eString().sprintf(_("volumebar timeout %d.%d sec"), 5, 0) + (eString)" >", 5000); timeout_volumebar->add((eString)"< " + eString().sprintf(_("volumebar timeout %d.%d sec"), 5, 5) + (eString)" >", 5500); timeout_volumebar->add((eString)"< " + eString().sprintf(_("volumebar timeout %d.%d sec"), 6, 0) + (eString)" ", 6000); int timeoutVolumebar = 2000; eConfig::getInstance()->getKey("/enigma/timeoutVolumebar", timeoutVolumebar); timeout_volumebar->setCurrent(timeoutVolumebar); CONNECT( list.selchanged, eOSDExpertSetup::selVolumebarChanged ); timeout_keypressed = new eListBoxEntryMulti(&list, _("channel numbers timeout (left, right)")); timeout_keypressed->add((eString)" " + eString().sprintf(_("keypressed timeout %d.%d sec"), 0, 5) + (eString)" >", 500); timeout_keypressed->add((eString)"< " + eString().sprintf(_("keypressed timeout %d.%d sec"), 1, 0) + (eString)" >", 1000); timeout_keypressed->add((eString)"< " + eString().sprintf(_("keypressed timeout %d.%d sec"), 1, 5) + (eString)" >", 1500); timeout_keypressed->add((eString)"< " + eString().sprintf(_("keypressed timeout %d.%d sec"), 2, 0) + (eString)" >", 2000); timeout_keypressed->add((eString)"< " + eString().sprintf(_("keypressed timeout %d.%d sec"), 2, 5) + (eString)" >", 2500); timeout_keypressed->add((eString)"< " + eString().sprintf(_("keypressed timeout %d.%d sec"), 3, 0) + (eString)" >", 3000); timeout_keypressed->add((eString)"< " + eString().sprintf(_("keypressed timeout %d.%d sec"), 3, 5) + (eString)" >", 3500); timeout_keypressed->add((eString)"< " + eString().sprintf(_("keypressed timeout %d.%d sec"), 4, 0) + (eString)" >", 4000); timeout_keypressed->add((eString)"< " + eString().sprintf(_("keypressed timeout %d.%d sec"), 4, 5) + (eString)" >", 4500); timeout_keypressed->add((eString)"< " + eString().sprintf(_("keypressed timeout %d.%d sec"), 5, 0) + (eString)" >", 5000); timeout_keypressed->add((eString)"< " + eString().sprintf(_("keypressed timeout %d.%d sec"), 5, 5) + (eString)" >", 5500); timeout_keypressed->add((eString)"< " + eString().sprintf(_("keypressed timeout %d.%d sec"), 6, 0) + (eString)" ", 6000); int timeoutKeypressed = 2000; eConfig::getInstance()->getKey("/enigma/channelKeypressedInitDelay", timeoutKeypressed); timeout_keypressed->setCurrent(timeoutKeypressed); CONNECT( list.selchanged, eOSDExpertSetup::selChannelKeypressedInitDelayChanged ); new eListBoxEntryCheck(&list, _("show infobar on service switch"), "/ezap/osd/showOSDOnSwitchService", _("show infobar when switching to another service")); CONNECT((new eListBoxEntryCheck(&list,_("Serviceselector help buttons"),"/ezap/serviceselector/showButtons",_("show colored help buttons in service selector")))->selected, eOSDExpertSetup::colorbuttonsChanged ); if ( eSystemInfo::getInstance()->getFEType() == eSystemInfo::feSatellite) new eListBoxEntryCheck(&list, _("Show Sat position"), "/extras/showSatPos", _("show sat position in the infobar")); new eListBoxEntryCheck(&list, _("Skip confirmations"), "/elitedvb/extra/profimode", _("enable/disable confirmations")); new eListBoxEntryCheck(&list, _("Hide error windows"), "/elitedvb/extra/hideerror", _("don't show zap error messages")); new eListBoxEntryCheck(&list, _("Auto show Infobar"), "/ezap/osd/showOSDOnEITUpdate", _("always show infobar when new event info is avail")); new eListBoxEntryCheck(&list, _("Show remaining Time"), "/ezap/osd/showCurrentRemaining", _("show event remaining time in the infobar")); new eListBoxEntryCheck(&list, _("Hide shortcut icons"), "/ezap/osd/hideshortcuts", _("hide shortcut icons in menus")); }
int eWidget::setProperty(const eString &prop, const eString &value) { if (prop=="position") { int v[2], e[2]={0, 0}; if (parent) { e[0]=parent->clientrect.width(); e[1]=parent->clientrect.height(); } int err=parse(value.c_str(), v, e, 2); if (err) return err; move(ePoint(v[0], v[1])); } else if (prop=="cposition") { int v[2], e[2]; e[0]=e[1]=0; if (parent) { e[0]=parent->clientrect.width(); e[1]=parent->clientrect.height(); } int err=parse(value.c_str(), v, e, 2); if (err) return err; cmove(ePoint(v[0], v[1])); } else if (prop=="size") { int v[2], e[2]; e[0]=e[1]=0; if (parent) { e[0]=parent->clientrect.width()-position.x(); e[1]=parent->clientrect.height()-position.y(); } int err=parse(value.c_str(), v, e, 2); if (err) return err; resize(eSize(v[0], v[1])); } else if (prop=="csize") { int v[2], e[2]; e[0]=e[1]=0; if (parent) { e[0]=parent->clientrect.width()-position.x(); e[1]=parent->clientrect.height()-position.y(); } int err=parse(value.c_str(), v, e, 2); if (err) return err; cresize(eSize(v[0], v[1])); } else if (prop=="text") /* { eString text; std::string::const_iterator p(value.begin()); while(*p) { if (*p=='\\') { switch (*(++p)) { case 'n': text+='\n'; break; case 'r': text+='\r'; break; case 't': text+='\t'; break; case 'b': text+='\b'; break; case '\\': text+='\\'; break; default: text+='?'; break; } } else text+=*p; p++; } setText(text); }*/ setText(::gettext(value.c_str())); else if (prop=="helptext") setHelpText(::gettext(value.c_str())); else if (prop=="font") setFont(eSkin::getActive()->queryFont(value)); else if (prop=="name") name=value; else if (prop=="pixmap") { setPixmap(eSkin::getActive()->queryImage(value)); if (pixmap) pixmap->uncompressdata(); } else if (prop=="foregroundColor") setForegroundColor(eSkin::getActive()->queryColor(value)); else if (prop=="backgroundColor") setBackgroundColor(eSkin::getActive()->queryColor(value)); else if (prop=="shortcut") setShortcut(value); else if (prop=="shortcutFocus") setShortcutFocus(parent ? parent->search(value) : 0); else { eFatal("skin property %s does not exist", prop.c_str()); return -ENOENT; } return 0; }
void eTOnlineDialog::init_eTOnlineDialog(eString Login) { setText("T - Online"); cmove(ePoint(140,140)); cresize(eSize(450,270)); eLabel *l = new eLabel(this); l->move(ePoint(10,10)); l->resize(eSize(220,30)); l->setText("Anschlusskennung:"); Kennung = new eTextInputField(this,l); Kennung->move(ePoint(230,10)); Kennung->resize(eSize(200,35)); Kennung->setMaxChars(12); Kennung->setUseableChars("1234567890"); Kennung->loadDeco(); Kennung->setHelpText("Anschlusskennung eingeben mit OK (12 Stellen)"); Kennung->setEditHelpText("Anschlusskennung eingeben (0..9, ok)"); l = new eLabel(this); l->move(ePoint(10,60)); l->resize(eSize(220,30)); l->setText("T-Online Nummer:"); tOnlineNummer = new eTextInputField(this,l); tOnlineNummer->move(ePoint(230,60)); tOnlineNummer->resize(eSize(200,35)); tOnlineNummer->setMaxChars(12); tOnlineNummer->setUseableChars("1234567890"); tOnlineNummer->loadDeco(); tOnlineNummer->setHelpText("T-Online Nummer eingeben mit OK (12 Stellen)"); tOnlineNummer->setEditHelpText("T-Online Nummer eingeben (0..9, ok)"); l = new eLabel(this); l->move(ePoint(10,110)); l->resize(eSize(220,30)); l->setText("Mitbenutzernummer:"); Mitbenutzer = new eTextInputField(this,l); Mitbenutzer->move(ePoint(230,110)); Mitbenutzer->resize(eSize(70,35)); Mitbenutzer->setMaxChars(4); Mitbenutzer->setUseableChars("1234567890"); Mitbenutzer->loadDeco(); Mitbenutzer->setHelpText("Mitbenutzernummer eingeben mit OK (4 Stellen)"); Mitbenutzer->setEditHelpText("Mitbenutzernummer eingeben (0..9, ok)"); ok = new eButton(this); ok->move(ePoint(10,160)); ok->resize(eSize(170,40)); ok->setShortcut("green"); ok->setShortcutPixmap("green"); ok->setText("speichern"); ok->setHelpText("Daten übernehmen und Fenster schliessen"); ok->loadDeco(); CONNECT(ok->selected, eWidget::accept); sbar = new eStatusBar(this); sbar->move( ePoint(0, clientrect.height()-50) ); sbar->resize( eSize( clientrect.width(), 50) ); sbar->loadDeco(); if (Login) { unsigned int pos1 = Login.find("#"), pos2 = Login.find("@"); if ( pos1 != eString::npos && pos2 != eString::npos ) { Kennung->setText(Login.left(12)); tOnlineNummer->setText(Login.mid(12,12)); Mitbenutzer->setText(Login.mid(pos1+1,4)); } } }
void eParentalSetup::init_eParentalSetup() { setText(_("Parental setup")); cmove(ePoint(170, 136)); cresize(eSize(400, 280)); loadSettings(); parentallock=new eCheckbox(this, sparentallock, 1); parentallock->setText(_("Parental lock")); parentallock->move(ePoint(20, 20)); parentallock->resize(eSize(200, 30)); parentallock->setHelpText(_("enable/disable parental lock")); CONNECT(parentallock->checked, eParentalSetup::plockChecked ); changeParentalPin = new eButton(this); changeParentalPin->setText(_("change PIN")); changeParentalPin->move( ePoint( 230, 15 ) ); changeParentalPin->resize( eSize(160, 40) ); changeParentalPin->setHelpText(_("change Parental PIN (ok)")); changeParentalPin->loadDeco(); CONNECT(changeParentalPin->selected_id, eParentalSetup::changePin ); if ( !sparentallock ) changeParentalPin->hide(); setuplock=new eCheckbox(this, ssetuplock, 1); setuplock->setText(_("Setup lock")); setuplock->move(ePoint(20, 70)); setuplock->resize(eSize(200, 30)); setuplock->setHelpText(_("enable/disable setup lock")); CONNECT(setuplock->checked, eParentalSetup::slockChecked ); changeSetupPin = new eButton(this); changeSetupPin->setText(_("change PIN")); changeSetupPin->move( ePoint( 230, 65 ) ); changeSetupPin->resize( eSize(160, 40) ); changeSetupPin->setHelpText(_("change Setup PIN (ok)")); changeSetupPin->loadDeco(); CONNECT(changeSetupPin->selected_id, eParentalSetup::changePin ); if ( !ssetuplock ) changeSetupPin->hide(); hidelocked=new eCheckbox(this, shidelocked, 1); hidelocked->setText(_("Hide locked services")); hidelocked->move(ePoint(20, 120)); hidelocked->resize(eSize(370, 30)); hidelocked->setHelpText(_("don't show locked services in any list")); hidelocked->loadDeco(); CONNECT(hidelocked->checked, eParentalSetup::hidelockChecked ); if ( !sparentallock ) hidelocked->hide(); ok=new eButton(this); ok->setText(_("save")); ok->setShortcut("green"); ok->setShortcutPixmap("green"); ok->move(ePoint(20, 175)); ok->resize(eSize(220, 40)); ok->setHelpText(_("save changes and return")); ok->loadDeco(); CONNECT(ok->selected, eParentalSetup::okPressed); statusbar=new eStatusBar(this); statusbar->move( ePoint(0, clientrect.height()-50 ) ); statusbar->resize( eSize( clientrect.width(), 50) ); statusbar->loadDeco(); setHelpID(93); }
void LIR_Assembler::emit_op2(LIR_Op2* op) { switch (op->code()) { case lir_cmp: comp_op(op->condition(), op->in_opr1(), op->in_opr2(), op); break; case lir_cmp_l2i: case lir_cmp_fd2i: case lir_ucmp_fd2i: comp_fl2i(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op); break; case lir_cmove: cmove(op->condition(),op->in_opr1(),op->in_opr2(),op->tmp_opr(),op->result_opr()); break; case lir_shl: case lir_shr: case lir_ushr: if (op->in_opr2()->is_constant()) { shift_op(op->code(), op->in_opr1(), op->in_opr2()->as_constant_ptr()->as_jint(), op->result_opr()); } else { shift_op(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op->tmp_opr()); } break; case lir_add: case lir_sub: case lir_mul: case lir_mul_strictfp: case lir_div: case lir_div_strictfp: case lir_rem: arith_op( op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op->info()); break; case lir_abs: case lir_sqrt: case lir_sin: case lir_tan: case lir_cos: case lir_log: case lir_log10: intrinsic_op(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op); break; case lir_logic_and: case lir_logic_or: case lir_logic_xor: logic_op( op->code(), op->in_opr1(), op->in_opr2(), op->result_opr()); break; case lir_throw: case lir_unwind: throw_op(op->in_opr2(),op->in_opr1(),op->info(),op->code()==lir_unwind); break; default: Unimplemented(); break; } }
void LIR_Assembler::emit_op2(LIR_Op2* op) { switch (op->code()) { case lir_cmp: if (op->info() != NULL) { assert(op->in_opr1()->is_address() || op->in_opr2()->is_address(), "shouldn't be codeemitinfo for non-address operands"); add_debug_info_for_null_check_here(op->info()); // exception possible } comp_op(op->condition(), op->in_opr1(), op->in_opr2(), op); break; case lir_cmp_l2i: case lir_cmp_fd2i: case lir_ucmp_fd2i: comp_fl2i(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op); break; case lir_cmove: cmove(op->condition(), op->in_opr1(), op->in_opr2(), op->result_opr(), op->type()); break; case lir_shl: case lir_shr: case lir_ushr: if (op->in_opr2()->is_constant()) { shift_op(op->code(), op->in_opr1(), op->in_opr2()->as_constant_ptr()->as_jint(), op->result_opr()); } else { shift_op(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op->tmp1_opr()); } break; case lir_add: case lir_sub: case lir_mul: case lir_mul_strictfp: case lir_div: case lir_div_strictfp: case lir_rem: assert(op->fpu_pop_count() < 2, ""); arith_op( op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op->info(), op->fpu_pop_count() == 1); break; case lir_abs: case lir_sqrt: case lir_sin: case lir_tan: case lir_cos: case lir_log10: intrinsic_op(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op); break; case lir_logic_and: case lir_logic_or: case lir_logic_xor: logic_op( op->code(), op->in_opr1(), op->in_opr2(), op->result_opr()); break; case lir_throw: throw_op(op->in_opr1(), op->in_opr2(), op->info()); break; case lir_xadd: case lir_xchg: atomic_op(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op->tmp1_opr()); break; default: Unimplemented(); break; } }
eZapEmuSetup::eZapEmuSetup (): eWindow (0) { int i; #ifdef DEBUG printf ("eZapEmuSetup::eZapEmuSetup()\n"); #endif Serial = NULL; RC->read (); setText (_(TITLE)); cmove (ePoint (170, 150)); cresize (eSize (390, 350)); int fd = eSkin::getActive ()->queryValue ("fontsize", 16); #ifdef OLD_CODE RC->Enabled = eZapEmuSetup::EmuEnabled (); RC->StartServer = eZapEmuSetup::EmuStartServer (); RC->StartDhcp = eZapEmuSetup::EmuStartDhcp (); RC->v_SelectedEmu = eZapEmuSetup::WichEmu (); #endif eLabel *l = new eLabel (this); l->setText (_("Select Emu:")); l->move (ePoint (10, 10)); l->resize (eSize (200, fd + 4)); eListBoxEntryText *entrys[10]; SelectedEmu = new eListBox < eListBoxEntryText > (this, l); SelectedEmu->loadDeco (); SelectedEmu->setFlags (eListBox < eListBoxEntryText >::flagNoUpDownMovement); SelectedEmu->move (ePoint (160, 10)); SelectedEmu->resize (eSize (200, 35)); for (i = 0; i < RC->no_emu; i++) { // printf ("R:(%s) i=%i\n", EMU[i], i); entrys[i] = new eListBoxEntryText (SelectedEmu, EMU[i], (void *) i); } SelectedEmu->setCurrent (entrys[RC->v_SelectedEmu]); SelectedEmu->setHelpText (_("choose emu ( left, right )")); CONNECT (SelectedEmu->selected, eZapEmuSetup::EmuSetup); eLabel *l2 = new eLabel (this); l2->setText (_("Select Server:")); l2->move (ePoint (10, 50)); l2->resize (eSize (200, fd + 4)); eListBoxEntryText *entrys2[10]; SelectedCrdsrv = new eListBox < eListBoxEntryText > (this, l); SelectedCrdsrv->loadDeco (); SelectedCrdsrv->setFlags (eListBox < eListBoxEntryText >::flagNoUpDownMovement); SelectedCrdsrv->move (ePoint (160, 50)); SelectedCrdsrv->resize (eSize (200, 35)); for (i = 0; i < RC->no_crdsrv; i++) { // printf ("R:(%s) i=%i\n", CRDSRV[i], i); entrys2[i] = new eListBoxEntryText (SelectedCrdsrv, CRDSRV[i], (void *) i); } SelectedCrdsrv->setCurrent (entrys2[RC->v_SelectedCrdsrv]); SelectedCrdsrv->setHelpText (_("choose card server ( left, right )")); CONNECT (SelectedCrdsrv->selected, eZapEmuSetup::EmuSetup); #ifdef NOT_ANY_MORE eEmuEnabled = new eCheckbox (this, Enabled, 1); eEmuEnabled->setText (_("Emu")); eEmuEnabled->move (ePoint (10, 50)); eEmuEnabled->resize (eSize (fd + 4 + 150, fd + 4)); eEmuEnabled->setHelpText (_("enable/disable emu")); CONNECT (eEmuEnabled->checked, eZapEmuSetup::EmuEnabledChanged); #endif keyupdate = new eButton (this); keyupdate->setShortcut ("blue"); keyupdate->setShortcutPixmap ("blue"); keyupdate->setText (_("Key setting")); keyupdate->move (ePoint (20, 90)); keyupdate->resize (eSize (170, 40)); keyupdate->setHelpText (_("Launch the key update and convert plugin")); keyupdate->loadDeco (); CONNECT (keyupdate->selected, eZapEmuSetup::keyupdatePressed); #ifdef NOT_ANY_MORE softcam2all = new eButton (this); softcam2all->setText (_("Soft -> all")); softcam2all->setShortcut ("yellow"); softcam2all->setShortcutPixmap ("yellow"); softcam2all->move (ePoint (20, 100)); softcam2all->resize (eSize (170, 40)); softcam2all->setHelpText (_("Convert SoftCam.Key to all other key formats")); softcam2all->loadDeco (); CONNECT (softcam2all->selected, eZapEmuSetup::softcam2allPressed); #endif v_CardInfo = CardInfo (); if (v_CardInfo == 0) { cardinfo = new eButton (this); cardinfo->setShortcut ("yellow"); cardinfo->setShortcutPixmap ("yellow"); cardinfo->setText (_("Card info")); cardinfo->move (ePoint (210, 90)); cardinfo->resize (eSize (170, 40)); cardinfo->setHelpText (_("Show some info of seca card")); cardinfo->loadDeco (); CONNECT (cardinfo->selected, eZapEmuSetup::cardinfoPressed); } #ifdef NOT_ANY_MORE extraset = new eButton (this); extraset->setShortcut ("1"); extraset->setShortcutPixmap ("1"); extraset->setText (_("Extra Setup")); extraset->move (ePoint (20, 220)); extraset->resize (eSize (170, 40)); extraset->setHelpText (_("Enter the extra setup menu")); extraset->loadDeco (); CONNECT (extraset->selected, eZapEmuSetup::ExtraSettings); v_IpInfo = IpInfo (); if (v_IpInfo == 0) { ipinfo = new eButton (this); ipinfo->setShortcut ("2"); ipinfo->setShortcutPixmap ("2"); ipinfo->setText (_("DHCP info")); ipinfo->move (ePoint (210, 220)); ipinfo->resize (eSize (170, 40)); ipinfo->setHelpText (_("Show some info of seca card")); ipinfo->loadDeco (); CONNECT (ipinfo->selected, eZapEmuSetup::ipinfoPressed); } #endif ok = new eButton (this); ok->setText (_("save")); ok->setShortcut ("green"); ok->setShortcutPixmap ("green"); ok->move (ePoint (20, 270)); ok->resize (eSize (170, 40)); ok->setHelpText (_("save changes and return")); ok->loadDeco (); CONNECT (ok->selected, eZapEmuSetup::okPressed); abort = new eButton (this); abort->setShortcut ("red"); abort->setShortcutPixmap ("red"); abort->loadDeco (); abort->setText (_("abort")); abort->move (ePoint (210, 270)); abort->resize (eSize (170, 40)); abort->setHelpText (_("ignore changes and return")); CONNECT (abort->selected, eZapEmuSetup::abortPressed); statusbar = new eStatusBar (this); statusbar->move (ePoint (0, clientrect.height () - 30)); statusbar->resize (eSize (clientrect.width (), 30)); statusbar->loadDeco (); }
BitrateDialog::BitrateDialog(): eWindow(1), startTimer(eApp) { const int dlgWidth = 350; int fd = eSkin::getActive()->queryValue("fontsize", 20); int dlgHeight = 4 * fd; unsigned int tvsystem = 1; eConfig::getInstance()->getKey("/elitedvb/video/tvsystem", tvsystem); cmove(ePoint(58, ((tvsystem == 2) ? 440 : 490) - dlgHeight)); cresize(eSize(dlgWidth, dlgHeight)); setText("Bitrate Viewer v1.4"); eLabel *lbl = new eLabel(this); lbl->move(ePoint(10, 10)); lbl->resize(eSize(50, fd + 6)); lbl->setText("kb/s:"); lbl = new eLabel(this); lbl->move(ePoint(60, 10)); lbl->resize(eSize(70, fd + 6)); lbl->setText("Current"); lbl->setAlign(eTextPara::dirRight); lbl = new eLabel(this); lbl->move(ePoint(140, 10)); lbl->resize(eSize(60, fd + 6)); lbl->setText("Min"); lbl->setAlign(eTextPara::dirRight); lbl = new eLabel(this); lbl->move(ePoint(210, 10)); lbl->resize(eSize(60, fd + 6)); lbl->setText("Ave"); lbl->setAlign(eTextPara::dirRight); lbl = new eLabel(this); lbl->move(ePoint(280, 10)); lbl->resize(eSize(60, fd + 6)); lbl->setText("Max"); lbl->setAlign(eTextPara::dirRight); lbl = new eLabel(this); lbl->move(ePoint(10, 10+fd)); lbl->resize(eSize(50, fd + 6)); lbl->setText("Video:"); lbl = new eLabel(this); lbl->move(ePoint(10, 10 + fd * 2)); lbl->resize(eSize(50, fd + 6)); lbl->setText("Audio:"); currVal = new eLabel(this); currVal->move(ePoint(70, 10+fd)); currVal->resize(eSize(60, fd + 6)); currVal->setAlign(eTextPara::dirRight); minVal = new eLabel(this); minVal->move(ePoint(140, 10+fd)); minVal->resize(eSize(60, fd + 6)); minVal->setAlign(eTextPara::dirRight); avrgVal = new eLabel(this); avrgVal->move(ePoint(210, 10+fd)); avrgVal->resize(eSize(60, fd + 6)); avrgVal->setAlign(eTextPara::dirRight); maxVal = new eLabel(this); maxVal->move(ePoint(280, 10+fd)); maxVal->resize(eSize(60, fd + 6)); maxVal->setAlign(eTextPara::dirRight); audioVal = new eLabel(this); audioVal->move(ePoint(70, 10 + fd * 2)); audioVal->resize(eSize(60, fd + 6)); audioVal->setAlign(eTextPara::dirRight); audioType = new eLabel(this); audioType->move(ePoint(140, 10 + fd * 2)); audioType->resize(eSize(120, fd + 6)); CONNECT(startTimer.timeout, BitrateDialog::Run); }