void CChunkRenderNES::StoreCaller(const void *pData, unsigned int Size) { while (GetBank() < 7) AllocateNewBank(); int FillSize = (0x10000 - GetAbsoluteAddr()) - Size; Fill(FillSize); Store(pData, Size); }
eOSState cMenuEPGSearchSetup::ProcessKey(eKeys Key) { bool hadSubMenu = HasSubMenu(); eOSState state = cMenuSetupPage::ProcessKey(Key); const char* ItemText = Get(Current())->Text(); int iOnGeneral = 0; int iOnEPGMenus = 0; int iOnUserdefTimes = 0; int iOnTimers = 0; int iOnSearchtimers = 0; int iOnTimerConflicts = 0; int iOnEmailNotification = 0; if (!HasSubMenu()) { if (strstr(ItemText, tr("General")) == ItemText) iOnGeneral = 1; else if (strstr(ItemText, tr("EPG menus")) == ItemText) iOnEPGMenus = 1; else if (strstr(ItemText, tr("User-defined EPG times")) == ItemText) iOnUserdefTimes = 1; else if (strstr(ItemText, tr("Timer programming")) == ItemText) iOnTimers = 1; else if (strstr(ItemText, tr("Search and search timers")) == ItemText) iOnSearchtimers = 1; else if (strstr(ItemText, tr("Timer conflict checking")) == ItemText) iOnTimerConflicts = 1; else if (strstr(ItemText, tr("Email notification")) == ItemText) iOnEmailNotification = 1; } if (!HasSubMenu() && (state == osUnknown || Key == kOk)) { if ((Key == kOk && !hadSubMenu) || Key == kBlue) { if (iOnGeneral == 1) state = AddSubMenu(new cMenuSetupGeneral(&data)); else if (iOnEPGMenus == 1) state = AddSubMenu(new cMenuSetupEPGMenus(&data)); else if (iOnUserdefTimes == 1) state = AddSubMenu(new cMenuSetupUserdefTimes(&data)); else if (iOnTimers == 1) state = AddSubMenu(new cMenuSetupTimers(&data)); else if (iOnSearchtimers == 1) state = AddSubMenu(new cMenuSetupSearchtimers(&data)); else if (iOnTimerConflicts == 1) state = AddSubMenu(new cMenuSetupTimerConflicts(&data)); else if (iOnEmailNotification == 1) state = AddSubMenu(new cMenuSetupMailNotification(&data)); } } if (!HasSubMenu() && hadSubMenu) Store(); return state; }
void CDrawRuler::Place(CPoint p,CPoint) { Display(); a=p; b=p; Store(); Display(); // Write to screen }
NS_IMETHODIMP nsClipboard::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData) { if (strcmp(aTopic, "quit-application") == 0) { // application is going to quit, save clipboard content Store(); } return NS_OK; }
void Assignment() { char name[MAX_BUF]; sprintf(name, Value); Next(); MatchString("="); BoolExpression(); Store(name); }
void Buddy::HandleMessage (const char *who, const char *body, PurpleMessageFlags flags, time_t time) { if (flags & PURPLE_MESSAGE_SEND) return; auto msg = new ConvIMMessage (QString::fromUtf8 (body), IMessage::Direction::In, this); if (time) msg->SetDateTime (QDateTime::fromTime_t (time)); Store (msg); }
void CSetMainPage::OnCheck() { GetDlgItem(IDC_MSYSGIT_VER)->SetWindowText(L""); this->UpdateData(TRUE); PerformCommonGitPathCleanup(m_sMsysGitPath); UpdateData(FALSE); OnMsysGitPathModify(); CString oldpath = m_regMsysGitPath; CString oldextranpath = this->m_regMsysGitExtranPath; Store(m_sMsysGitPath, m_regMsysGitPath); Store(m_sMsysGitExtranPath, m_regMsysGitExtranPath); g_Git.m_bInitialized = false; if (g_Git.CheckMsysGitDir(FALSE)) { CString cmd; CString out; cmd=_T("git.exe --version"); int ret = g_Git.Run(cmd,&out,CP_UTF8); this->GetDlgItem(IDC_MSYSGIT_VER)->SetWindowText(out); if (out.IsEmpty()) { if (ret == 0xC0000135 && CMessageBox::Show(NULL, _T("Could not start git.exe. A dynamic library (dll) is missing.\nCheck help file for \"Extern DLL Path\"."), _T("TortoiseGit"), 1, IDI_ERROR, CString(MAKEINTRESOURCE(IDS_MSGBOX_OK)), CString(MAKEINTRESOURCE(IDS_MSGBOX_HELP))) == 2) OnHelp(); else if (CMessageBox::Show(NULL, _T("Could not get read version information from git.exe.\nCheck help file for \"Git.exe Path\"."),_T("TortoiseGit"), 1, IDI_ERROR, CString(MAKEINTRESOURCE(IDS_MSGBOX_OK)), CString(MAKEINTRESOURCE(IDS_MSGBOX_HELP))) == 2) OnHelp(); } } else { if (CMessageBox::Show(NULL, _T("Invalid git.exe path.\nCheck help file for \"Git.exe Path\"."), _T("TortoiseGit"), 1, IDI_ERROR, CString(MAKEINTRESOURCE(IDS_MSGBOX_OK)), CString(MAKEINTRESOURCE(IDS_MSGBOX_HELP))) == 2) OnHelp(); } Store (oldpath, m_regMsysGitPath); Store (oldextranpath, m_regMsysGitExtranPath); }
OP_STATUS WandProfile::StoreWandSyncItem(WandSyncItem *item) { OP_ASSERT(item->GetAuthType() == OpSyncDataItem::DATAITEM_PM_FORM_AUTH); if (item->GetAuthType() == OpSyncDataItem::DATAITEM_PM_FORM_AUTH) { return Store(static_cast<WandPage*>(item)); } return OpStatus::ERR; }
void OrthancConnection::StoreFile(const char* filename) { std::string content; Orthanc::Toolbox::ReadFile(content, filename); if (content.size() != 0) { Store(&content[0], content.size()); } }
void DOSUNMOUNT() // DOSUNMOUNT { FCBPFAS(); // FCBPFAS Push(Read16(Pop())); // @ Push(pp__i_FCB); // 'FCB Store(); // ! CLOSE(); // CLOSE Pop(); // DROP Push(0); }
void DOSMOUNT() // DOSMOUNT { unsigned short int a; a = Pop(); // >R INIT(); // INIT while(1) { Push(a); // I FCBPFAS(); // FCBPFAS Push(Read16(Pop())); // @ Push(pp__i_FCB); // 'FCB Store(); // ! SMARTOPEN(); // SMARTOPEN Push(Read16(regsp)); // DUP if (Pop() == 0) break; Pop(); // DROP FLUSH(); // FLUSH INIT(); // INIT Push(a); // I FCBPFAS(); // FCBPFAS Push(Read16(Pop())); // @ Push(pp__i_FCB); // 'FCB Store(); // ! Push(pp_ASKMOUNT); // ASKMOUNT GetEXECUTE(); // @EXECUTE } Push(0x0400); RECSIZE(); // RECSIZE Store(); // ! FILESIZE(); // FILESIZE _2_at_(); // 2@ SWAP(); // SWAP Push(0x0400); M_slash_(); // M/ SWAP(); // SWAP Pop(); // DROP DRV(); // DRV Push(Read16(Pop())&0xFF); // C@ Push(a); // R> DRIVENUMBERS(); // DRIVENUMBERS C_ex__2(); // C!_2 }
void W0939() // W0939 { _ro_SETUP_rc_(); // (SETUP) _ro_CS_ask__rc_(); // (CS?) Push(Read16(cc_DS)); // DS Store(); // ! Push(0xf2d2); Push(Read16(cc_PSW)); // PSW Store(); // ! Push(0x0701); Push(pp_OPERATOR); // OPERATOR Push(0x0074); CMOVE_2(); // CMOVE_2 Push(Read16(user_DP)); // DP @ Push(Read16(cc_INITIAL_dash_DPB)); // INITIAL-DPB Store(); // ! _i_FORTH(); // 'FORTH Push(user_CONTEXT); // CONTEXT Store(); // ! DEFINITIONS(); // DEFINITIONS FREEZE(); // FREEZE AUTO_dash_LIMIT(); // AUTO-LIMIT AUTO_dash_CACHE(); // AUTO-CACHE SP_ex_(); // SP! RP_ex_(); // RP! SET_dash_BUFFERS(); // SET-BUFFERS AUTO_dash_SCREEN(); // AUTO-SCREEN W0343(); // W0343 Push(Read16(pp_BOOT_dash_HOOK)); // BOOT-HOOK @ if (Read16(regsp) != 0) Push(Read16(regsp)); // ?DUP if (Pop() != 0) { EXECUTE(); // EXECUTE } Push(Read16(pp_BOOT_dash_LOAD)); // BOOT-LOAD @ if (Read16(regsp) != 0) Push(Read16(regsp)); // ?DUP if (Pop() != 0) { Exec("LOAD_2"); // call of word 0x1e23 '(LOAD)' } W03C3(); // W03C3 Exec("ABORT"); // call of word 0x1c45 '(ABORT)' }
void CProcessor::Confirm(CBirthday *pbd) { pbd->m_confirmed = true; if( !pbd->m_date.AfterAndWithinDays( CDate(), m_pconfig->m_daysAdvance ) ) pbd->m_alerted_this_year = false; Store(); ProcessAction(true); }
void CRplRootNetStat :: CheckSwitchRecords() { if ( time( NULL ) > GetCrntPeriodEnd() ) { PublishMgmtMessage(); m_oPrevRecord = m_oCrntRecord; m_oCrntRecord.ResetStats(); Store( NIVIS_TMP_RUN"NetStat.ini" ); } }
void CDrawPower::LButtonDown(CDPoint p, CDPoint) { // New undo level for each placement... m_pDesign->BeginNewChangeSet(); Display(); p = m_pDesign->GetStickyPoint(p, TRUE, TRUE, is_stuck, is_junction); m_point_a=p; Store(); Display(); // Write to screen }
void main() { int i,j; int D[n][n]={{2,1,0,0},{3,1,3,0},{0,5,2,7},{0,0,9,0}}; for(i=0;i<n;i++) for(j=0;j<n;j++) Store(D[i][j],i,j); for(i=0;i<3*n-2;i++) printf("%d ",t[i]); printf("\n"); }
void main() { int i,j; int D[n][n]={2,4,6,0,4,1,9,5,6,9,4,7,0,5,7,0}; for(i=0;i<n;i++) for(j=0;j<n;j++) Store(D[i][j],i,j); for(i=0;i<=n*n/2+1;i++) printf("%d ",t[i]); printf("\n"); }
BOOL CSetMisc::OnApply() { UpdateData(); Store (m_bUnversionedRecurse, m_regUnversionedRecurse); Store (m_bAutocompletion, m_regAutocompletion); Store (m_dwAutocompletionTimeout, m_regAutocompletionTimeout); Store (m_bSpell, m_regSpell); Store (m_bCheckRepo, m_regCheckRepo); Store (m_dwMaxHistory, m_regMaxHistory); Store (m_bCommitReopen, m_regCommitReopen); Store (m_bShowLockDlg, m_regShowLockDlg); Store (m_bAutoSelect, m_regAutoSelect); SetModified(FALSE); return ISettingsPropPage::OnApply(); }
void _bo_FILE_bc_() // [FILE] { DOS_dash_DTA(); // DOS-DTA Push(Read16(pp_FILE)); // FILE @ FCBPFAS(); // FCBPFAS Push(Read16(Pop())); // @ Push(pp__i_FCB); // 'FCB Store(); // ! SWAP(); // SWAP RELREC(); // RELREC Store(); // ! if (Pop() != 0) { READ_dash_RANDOM(); // READ-RANDOM } else { WRITE_dash_RANDOM(); // WRITE-RANDOM } Push(pp_DISK_dash_ERROR); // DISK-ERROR Store(); // ! }
//------------------------------------------------------- void PersistenceHandler::Write(const Safir::Dob::EntityProxy& entityProxy, const bool update) { m_debug << "Will try to persist entity " << entityProxy.GetEntityId() << std::endl; const char* blob = entityProxy.GetBlob(); Safir::Dob::Typesystem::BinarySerialization bin = std::vector<char>(blob,blob+Safir::Dob::Typesystem::Internal::BlobOperations::GetSize(blob)); Store(entityProxy.GetEntityId(), entityProxy.GetOwner(), bin, update); }
void CDrawPower::LButtonDown(CDPoint p, CDPoint no_snap_p) { // New undo level for each placement... m_pDesign->BeginNewChangeSet(); Display(); p = m_pDesign->GetStickyPoint(no_snap_p, TRUE, TRUE, is_stuck, is_junction); m_point_a = p; Store(); g_EditToolBar.m_PowerEdit.ReFocus(); Display(); // Write to screen }
BOOL CSetMainPage::OnApply() { UpdateData(); Store (m_dwLanguage, m_regLanguage); if (m_sTempExtensions.Compare(CString(m_regExtensions))) { Store (m_sTempExtensions, m_regExtensions); m_restart = Restart_Cache; } Store ((m_bLastCommitTime ? _T("yes") : _T("no")), m_regLastCommitTime); Store (m_bUseAero, m_regUseAero); CRegString asphack_local(_T("System\\CurrentControlSet\\Control\\Session Manager\\Environment\\SVN_ASP_DOT_NET_HACK"), _T(""), FALSE, HKEY_LOCAL_MACHINE); CRegString asphack_user(_T("Environment\\SVN_ASP_DOT_NET_HACK")); if (m_bUseDotNetHack) { asphack_local = _T("*"); if (asphack_local.GetLastError() != ERROR_SUCCESS) asphack_user = _T("*"); if ((GetEnvironmentVariable(_T("SVN_ASP_DOT_NET_HACK"), NULL, 0)==0)&&(GetLastError()==ERROR_ENVVAR_NOT_FOUND)) { DWORD_PTR dwRet = 0; SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)_T("Environment"), SMTO_ABORTIFHUNG, 1000, &dwRet); m_restart = Restart_System; } } else { asphack_local.removeValue(); asphack_user.removeValue(); if (GetEnvironmentVariable(_T("SVN_ASP_DOT_NET_HACK"), NULL, 0)!=0) { DWORD_PTR dwRet = 0; SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)_T("Environment"), SMTO_ABORTIFHUNG, 1000, &dwRet); m_restart = Restart_System; } } SetModified(FALSE); return ISettingsPropPage::OnApply(); }
BOOL CSetOverlayHandlers::OnApply() { UpdateData(); if (DWORD(m_regShowIgnoredOverlay) != DWORD(m_bShowIgnoredOverlay)) m_restart = Restart_System; Store (m_bShowIgnoredOverlay, m_regShowIgnoredOverlay); if (DWORD(m_regShowUnversionedOverlay) != DWORD(m_bShowUnversionedOverlay)) m_restart = Restart_System; Store (m_bShowUnversionedOverlay, m_regShowUnversionedOverlay); if (DWORD(m_regShowAddedOverlay) != DWORD(m_bShowAddedOverlay)) m_restart = Restart_System; Store (m_bShowAddedOverlay, m_regShowAddedOverlay); if (DWORD(m_regShowLockedOverlay) != DWORD(m_bShowLockedOverlay)) m_restart = Restart_System; Store (m_bShowLockedOverlay, m_regShowLockedOverlay); if (DWORD(m_regShowReadonlyOverlay) != DWORD(m_bShowReadonlyOverlay)) m_restart = Restart_System; Store (m_bShowReadonlyOverlay, m_regShowReadonlyOverlay); if (DWORD(m_regShowDeletedOverlay) != DWORD(m_bShowDeletedOverlay)) m_restart = Restart_System; Store (m_bShowDeletedOverlay, m_regShowDeletedOverlay); SetModified(FALSE); return ISettingsPropPage::OnApply(); }
void JsonDb::Transaction::Commit() { if(next_id != start_next_id) { Store(next_id_key, ValuePointer(new ValueNumberInteger(next_id_key, next_id))); // std::cout << "Commit transaction, next id: " << next_id << std::endl; } vltrancommit(db.get()); start_next_id = next_id; }
void SkipAttribute(char c) { if (c == '"') { if (buffer == "\"") { state = State::ReadTag; ClearBuffer(); } else Store(c); } }
void W47DE() // W47DE { Push(Read16(cc_ES)); // ES Store(); // ! Push(Read16(regsp)); // DUP Push(Read16(cc_BX)); // BX Store(); // ! Push(0x004a); DOSCALL(); // DOSCALL Push(Read16(Read16(cc_PSW)) & 1); // PSW @ 1 AND if (Pop() != 0) { Pop(); // DROP Push(Read16(Read16(cc_BX))); // BX @ Push(1); } else { Push(0); } _ro_CS_ask__rc_(); // (CS?) Push(Read16(cc_ES)); // ES Store(); // ! }
void CChunkRenderBinary::StoreSample(const CDSample *pDSample) { unsigned int SampleSize = pDSample->GetSize(); Store(pDSample->GetData(), SampleSize); m_iSampleAddress += SampleSize; // Adjust size if ((m_iSampleAddress & 0x3F) > 0) { int PadSize = 0x40 - (m_iSampleAddress & 0x3F); m_iSampleAddress += PadSize; Fill(PadSize); } }
void SETMAXDRV() // SETMAXDRV { unsigned short int i, imax; W451A(); // W451A Push(2); MAX(); // MAX W454E(); // W454E MAX(); // MAX Push(pp_MAXDRV); // MAXDRV Store(); // ! W44C2(); // W44C2 if (Pop() == 0) return; i = Read16(pp_MAXDRV) + 1; // MAXDRV @ 1+ imax = 7; do // (DO) { Push(i); // I W4536(); // W4536 if (Pop() != 0) { Push(i); // I Push(pp_MAXDRV); // MAXDRV Store(); // ! } i++; } while(i<imax); // (LOOP) Push(Read16(pp_MAXDRV)==2?1:0); // MAXDRV @ 2 = W451A(); // W451A Push(Pop()==1?1:0); // 1 = Push(Pop() & Pop()); // AND if (Pop() == 0) return; Push(1); Push(pp_MAXDRV); // MAXDRV Store(); // ! }
Daemon::Daemon(const ArgumentParser &args) { ConfigParser config(args.GetConfig()); plog::init<plog::LogFormatter>(config.GetLogSeverity(), config.GetLogFilename().c_str()); IpcConnection conn("\0INTEGRITY"); conn.Listen(); Storage storage; daemon(1, 0); std::unique_ptr<std::thread> schedule; if (config.GetSleepDuration() > 0) { schedule = std::unique_ptr<std::thread>( new std::thread(&Daemon::Schedule, this, std::ref(storage), config.GetPathListFile(), config.GetSleepDuration())); } while (running) { std::shared_ptr<IpcClient> client = conn.WaitForClient(); int message = client->ReceiveCommand(); switch (message) { case ArgumentParser::STORE: { Store(storage, config.GetPathListFile()); break; } case ArgumentParser::CHECK: { Check(storage, config.GetPathListFile()); break; } case ArgumentParser::KILL: running = false; storage.mtx.lock(); // wait for all db operations to end break; default: break; } } if (config.GetSleepDuration() > 0) { schedule->join(); } }
void Buddy::Send (ConvIMMessage *msg) { auto name = purple_buddy_get_name (Buddy_); if (!name) { qWarning () << Q_FUNC_INFO << "unable to get buddy name" << Name_; const auto& notify = Util::MakeNotification ("Azoth VelvetBird", tr ("Unable to send message: protocol error.") .arg (name), Priority::Info); const auto& proxy = Account_->GetParentProtocol ()->GetCoreProxy (); proxy->GetEntityManager ()->HandleEntity (notify); return; } auto conv = purple_find_conversation_with_account (PURPLE_CONV_TYPE_IM, name, Account_->GetPurpleAcc ()); if (!conv) { conv = purple_conversation_new (PURPLE_CONV_TYPE_IM, Account_->GetPurpleAcc (), name); if (!conv) { qWarning () << Q_FUNC_INFO << "unable to create conversation with" << name; const auto& notify = Util::MakeNotification ("Azoth VelvetBird", tr ("Unable to send message to %1: protocol error.") .arg (name), Priority::Info); const auto& proxy = Account_->GetParentProtocol ()->GetCoreProxy (); proxy->GetEntityManager ()->HandleEntity (notify); return; } conv->ui_data = this; purple_conversation_set_logging (conv, false); } Store (msg); purple_conv_im_send (PURPLE_CONV_IM (conv), msg->GetBody ().toUtf8 ().constData ()); }