void MainWindow::retranslateUi() { ui->retranslateUi(this); m_statusBarProgress->retranslateUi(); setWindowTitle(Q(get_version_info("MKVToolNix GUI"))); ui->tool->setUpdatesEnabled(false); // Intentionally replacing the list right away again in order not to // lose the translations for the three currently unimplemented // tools. auto toolTitles = QStringList{} << QY("extract") << QY("info") << QY("edit tags"); toolTitles = QStringList{} << QY("merge") << QY("edit headers") << QY("edit chapters") << QY("job queue") << QY("job output"); for (auto idx = 0, count = ui->tool->count(); idx < count; ++idx) ui->tool->setTabText(idx, toolTitles[idx]); // Intentionally setting the menu titles here instead of the // designer as the designer doesn't allow the same hotkey in the // same form. ui->menuGUI ->setTitle(QY("MKVToolNix &GUI")); ui->menuMerge ->setTitle(QY("&Merge")); ui->menuHeaderEditor ->setTitle(QY("Header &editor")); ui->menuChapterEditor->setTitle(QY("&Chapter editor")); ui->menuJobQueue ->setTitle(QY("&Job queue")); ui->menuJobOutput ->setTitle(QY("&Job output")); ui->menuHelp ->setTitle(QY("&Help")); ui->tool->setUpdatesEnabled(true); }
OpenALInformation openal_get_platform_information() { OpenALInformation info; get_version_info(&info); enumerate_playback_devices(&info); enumerate_capture_devices(&info); return info; }
/** \param[in] out Stream to send restraint description to. */ void TALOSRestraint::do_show(std::ostream& out) const { out << "dihedral restraint:" << std::endl; get_version_info().show(out); out << " particles: " << p_[0]->get_name(); out << ", " << p_[1]->get_name(); out << ", " << p_[2]->get_name(); out << ", " << p_[3]->get_name(); out << "and " << kappa_->get_name(); out << std::endl; }
void set_usage() { usage_text = Y( "base64util <encode|decode> <input> <output> [maxlen]\n" "\n" " encode - Read from <input>, encode to Base64 and write to <output>.\n" " Max line length can be specified and is 72 if left out.\n" " decode - Read from <input>, decode to binary and write to <output>.\n" ); version_info = get_version_info("base64util", vif_full); }
bool FlotillaDock::set_port(sp_port *new_port){ if (state != Disconnected) return false; state = Connecting; if (sp_copy_port(new_port, &port) == SP_OK){ const char* port_name = sp_get_port_name(port); sp_set_baudrate(port, BAUD_RATE); if (sp_open(port, SP_MODE_READ_WRITE) == SP_OK){ if (get_version_info()){ state = Connected; return true; } else { std::ostringstream msg; msg << GetTimestamp() << "Warning: Failed to get dock version information" << std::endl; std::cout << msg.str(); } } else { std::ostringstream msg; msg << GetTimestamp() << "Warning: Failed to open port " << port_name << std::endl; std::cout << msg.str(); } } else{ std::ostringstream msg; msg << GetTimestamp() << "Warning: Failed to copy port!?" << std::endl; std::cout << msg.str(); } state = Disconnected; return false; }
void MainWindow::retranslateUi() { ui->retranslateUi(this); m_statusBarProgress->retranslateUi(); setWindowTitle(Q(get_version_info("MKVToolNix GUI"))); ui->tool->setUpdatesEnabled(false); // Intentionally replacing the list right away again in order not to // lose the translations for the three currently unimplemented // tools. auto toolTitles = QStringList{} << QY("extract") << QY("info") << QY("edit tags"); toolTitles = QStringList{} << QY("merge") << QY("edit headers") << QY("edit chapters") << QY("job queue") << QY("job output"); for (auto idx = 0, count = ui->tool->count(); idx < count; ++idx) { ui->tool->setTabText(idx, toolTitles[idx]); auto toolBase = dynamic_cast<ToolBase *>(ui->tool->widget(idx)); if (toolBase) toolBase->retranslateUi(); } ui->tool->setUpdatesEnabled(true); }
void xtr_oggopus_c::header_packets_unlaced(std::vector<memory_cptr> &header_packets) { auto signature = std::string{"OpusTags"}; auto version = std::string{"unknown encoder; extracted from Matroska with "} + (!hack_engaged(ENGAGE_NO_VARIABLE_DATA) ? get_version_info("mkvextract") : std::string{"mkvextract"}); auto ver_len = version.length(); auto mem = memory_c::alloc(8 + 4 + ver_len + 4); auto buffer = reinterpret_cast<char *>(mem->get_buffer()); signature.copy(buffer, 8); put_uint32_le(buffer + 8, ver_len); version.copy(buffer + 8 + 4, ver_len); put_uint32_le(buffer + mem->get_size() - 4, 0); header_packets.push_back(mem); }
A_STATUS get_device_client_info(MDK_WLAN_DEV_INFO *pdevInfo, PDRV_VERSION_INFO pDrvVer, PCLI_INFO cliInfo) { A_INT32 hDevice; A_UINT32 iIndex; struct client_info linux_cliInfo; #if (CFG_64BIT == 1) A_UINT_PTR *vir_addr; A_UINT_PTR *mem_vir_addr; #else A_UINT32 *vir_addr; A_UINT32 *mem_vir_addr; #endif A_STATUS status; /* open the device based on the device index */ if (pdevInfo->pdkInfo->instance > (WLAN_MAX_DEV-1)) { A_FREE(pdevInfo->pdkInfo); A_FREE(pdevInfo); uiPrintf("Error: Only 4 devices/functions supported !\n"); return(A_ERROR); } hDevice = open_device(pdevInfo->pdkInfo->device_fn, pdevInfo->pdkInfo->instance, NULL); if (hDevice == A_ERROR) { uiPrintf("Error: Unable to open the device !\n"); A_FREE(pdevInfo->pdkInfo); A_FREE(pdevInfo); return(A_ERROR); } if ((status=get_version_info(hDevice, pDrvVer)) != A_OK) { close(hDevice); A_FREE(pdevInfo->pdkInfo); A_FREE(pdevInfo); return status; } memcpy(&driverVer, pDrvVer, sizeof(DRV_VERSION_INFO)); q_uiPrintf("pDrv Maj Ver=%d:Min Ver=%d\n", pDrvVer->majorVersion, pDrvVer->minorVersion); q_uiPrintf("driverVer Maj Ver=%d:Min Ver=%d\n", driverVer.majorVersion, driverVer.minorVersion); if (ioctl(hDevice,DK_IOCTL_GET_CLIENT_INFO,&linux_cliInfo) < 0) { close(hDevice); uiPrintf("Error: get version ioctl failed !\n"); return(A_ERROR); } q_uiPrintf("rpa=%lx:rr=%x:nB=%d:mpa=%lx:ms=%x:irq=%x:dma_addr=%x\n", linux_cliInfo.reg_phy_addr, linux_cliInfo.reg_range, linux_cliInfo.numBars, linux_cliInfo.mem_phy_addr, linux_cliInfo.mem_size, linux_cliInfo.irq, linux_cliInfo.dma_mem_addr); if (pDrvVer->minorVersion >= 2) { for(iIndex=0;iIndex<linux_cliInfo.numBars;iIndex++) { #if (CFG_64BIT == 1) vir_addr = (A_UINT_PTR *)mmap((char *)0,linux_cliInfo.areg_range[iIndex],PROT_READ|PROT_WRITE,MAP_SHARED,hDevice,linux_cliInfo.areg_phy_addr[iIndex]); #else vir_addr = (A_UINT32 *)mmap((char *)0,linux_cliInfo.areg_range[iIndex],PROT_READ|PROT_WRITE,MAP_SHARED,hDevice,linux_cliInfo.areg_phy_addr[iIndex]); #endif cliInfo->aregVirAddr[iIndex] = (A_UINT_PTR) vir_addr; if (cliInfo->aregVirAddr[iIndex] == 0) { uiPrintf("Error: Cannot map the device registers in user address space \n"); close(hDevice); A_FREE(pdevInfo->pdkInfo); A_FREE(pdevInfo); return A_ERROR; } #if (CFG_64BIT == 1) q_uiPrintf("reg vir addr[%d]=%llx\n", iIndex, cliInfo->aregVirAddr[iIndex]); #else q_uiPrintf("reg vir addr[%d]=%x\n", iIndex, cliInfo->aregVirAddr[iIndex]); #endif q_uiPrintf("reg range[%d]=%x\n", iIndex, linux_cliInfo.areg_range[iIndex]); } } else { #if (CFG_64BIT == 1) vir_addr = (A_UINT_PTR *)mmap((char *)0,linux_cliInfo.reg_range,PROT_READ|PROT_WRITE,MAP_SHARED,hDevice,linux_cliInfo.reg_phy_addr); #else vir_addr = (A_UINT32 *)mmap((char *)0,linux_cliInfo.reg_range,PROT_READ|PROT_WRITE,MAP_SHARED,hDevice,linux_cliInfo.reg_phy_addr); #endif cliInfo->aregVirAddr[0] = (A_UINT_PTR) vir_addr; if (cliInfo->aregVirAddr[0] == 0) { close(hDevice); uiPrintf("Error: Cannot map the device registers in user address space \n"); return A_ERROR; } } mem_vir_addr = (A_UINT32 *)mmap((char *)0,linux_cliInfo.mem_size,PROT_READ|PROT_WRITE,MAP_SHARED,hDevice,linux_cliInfo.mem_phy_addr); if (mem_vir_addr == NULL) { uiPrintf("Error: Cannot map memory in user address space \n"); if (munmap((void *)linux_cliInfo.reg_phy_addr, linux_cliInfo.reg_range) == -1) { uiPrintf("Error: munmap to address %x:range=%x: failed with error %s\n", linux_cliInfo.reg_phy_addr, linux_cliInfo.reg_range, strerror(errno)); } close(hDevice); A_FREE(pdevInfo->pdkInfo); A_FREE(pdevInfo); return A_ERROR; } #if (CFG_64BIT == 1) q_uiPrintf("memsize=%llx:mem phy addr = %llx: mem vir addr=%llx\n", linux_cliInfo.mem_size, linux_cliInfo.mem_phy_addr, mem_vir_addr); #else q_uiPrintf("memsize=%x:mem phy addr = %x: mem vir addr=%x\n", linux_cliInfo.mem_size, linux_cliInfo.mem_phy_addr, mem_vir_addr); #endif pdevInfo->hDevice = hDevice; //printf("open handle = %d \n",pdevInfo->hDevice); // Copy from driver client info structure cliInfo->regPhyAddr = linux_cliInfo.areg_phy_addr[0]; cliInfo->regVirAddr = cliInfo->aregVirAddr[0]; cliInfo->memPhyAddr = linux_cliInfo.mem_phy_addr; cliInfo->memVirAddr = (A_UINT_PTR) mem_vir_addr; cliInfo->irqLevel = linux_cliInfo.irq; cliInfo->regRange = linux_cliInfo.reg_range; cliInfo->memSize = linux_cliInfo.mem_size; memcpy(cliInfo->aregPhyAddr, linux_cliInfo.areg_phy_addr, sizeof(cliInfo->aregPhyAddr)); memcpy(cliInfo->aregRange, linux_cliInfo.areg_range, sizeof(cliInfo->aregRange)); cliInfo->numBars = linux_cliInfo.numBars; cliInfo->dma_mem_addr = linux_cliInfo.dma_mem_addr; return A_OK; } // end of get_device_client_info
static void setup(char **argv) { mtx_common_init("mkvpropedit", argv[0]); clear_list_of_unique_numbers(UNIQUE_ALL_IDS); version_info = get_version_info("mkvpropedit", vif_full); }
/* * Set default options */ static void initialize(void) { memset(&appres,0,sizeof(appres)); #ifdef DEBUG init_calls++; Trace("Initializing library (calls: %d)",init_calls); #endif initialize_toggles(&h3270,appres.toggle); #if defined(_WIN32) (void) get_version_info(); #endif Trace("%s (init_calls: %d)",__FUNCTION__,init_calls); /* Set the defaults. */ appres.mono = False; appres.extended = True; #if defined(C3270) /*[*/ appres.m3279 = True; #else /*][*/ appres.m3279 = False; #endif /*]*/ appres.modified_sel = False; appres.apl_mode = False; #if defined(C3270) || defined(TCL3270) /*[*/ // appres.scripted = False; #else /*][*/ appres.scripted = True; #endif /*]*/ appres.numeric_lock = False; // appres.secure = False; #if defined(C3270) /*[*/ appres.oerr_lock = True; #else /*][*/ appres.oerr_lock = False; #endif /*]*/ appres.typeahead = True; appres.debug_tracing = True; #if defined(C3270) /*[*/ appres.compose_map = "latin1"; #endif /*]*/ appres.model = ""; appres.hostsfile = CN; appres.port = "telnet"; #if !defined(_WIN32) /*[*/ appres.charset = "bracket"; #else /*][*/ if (is_nt) appres.charset = "bracket"; else appres.charset = "bracket437"; #endif /*]*/ appres.termname = CN; appres.macros = CN; #if defined(X3270_TRACE) /*[*/ #if !defined(_WIN32) /*[*/ appres.trace_dir = "/tmp"; #endif /*]*/ #if defined(X3270_DISPLAY) || defined(WC3270) /*[*/ appres.trace_monitor = True; #endif /*]*/ #endif /*]*/ appres.oversize = CN; #if defined(C3270) /*[*/ appres.meta_escape = "auto"; // appres.curses_keypad = True; // appres.cbreak_mode = False; #endif /*]*/ #if defined(X3270_ANSI) /*[*/ appres.icrnl = True; appres.inlcr = False; appres.onlcr = True; appres.erase = "^H"; appres.kill = "^U"; appres.werase = "^W"; appres.rprnt = "^R"; appres.lnext = "^V"; appres.intr = "^C"; appres.quit = "^\\"; appres.eof = "^D"; #endif /*]*/ appres.unlock_delay = True; #if defined(X3270_FT) /*[*/ appres.dft_buffer_size = DFT_BUF; #endif /*]*/ #if defined(C3270) && !defined(LIB3270) /*[*/ appres.toggle[CURSOR_POS].value = True; #endif /*]*/ #if defined(X3270_SCRIPT) || defined(TCL3270) /*[*/ appres.toggle[AID_WAIT].value = True; #endif /*]*/ #if defined(C3270) && defined(X3270_SCRIPT) /*[*/ appres.plugin_command = "x3270hist.pl"; #endif /*]*/ #if defined(C3270) && defined(_WIN32) /*[*/ appres.highlight_underline = True; #endif /*]*/ #if defined(C3270) && !defined(_WIN32) && !defined(LIB3270) /*[*/ /* Merge in the profile. */ merge_profile(); #endif /*]*/ }
static void setup() { mtx_common_init(); clear_list_of_unique_uint32(UNIQUE_ALL_IDS); version_info = get_version_info("mkvpropedit", vif_full); }
int main(int argc, char *argv[]) { char exepath[MAX_PATH]; char linkpath[MAX_PATH]; HRESULT hres; char *install_dir; char *exe; char *linkname; (void) get_version_info(); /* Pull in the parameter. */ if (argc != 4) { fprintf(stderr, "usage: %s install-dir exe linkname\n", argv[0]); return 1; } install_dir = argv[1]; exe = argv[2]; linkname = argv[3]; sprintf(exepath, "%s\\%s", install_dir, exe); /* Figure out the link path. */ if (is_nt) { char *userprof; userprof = getenv("USERPROFILE"); if (userprof == NULL) { fprintf(stderr, "Sorry, I can't figure out where your user " "profile is.\n"); return 1; } sprintf(linkpath, "%s\\Desktop\\%s.lnk", userprof, linkname); } else { char *windir; windir = getenv("WinDir"); if (windir == NULL) { printf("Sorry, I can't figure out where %%WinDir%% " "is.\n"); return -1; } sprintf(linkpath, "%s\\Desktop\\%s.pif", windir, linkname); } /* Create the link. */ if (is_nt) hres = CreateLink( exepath, linkpath, NULL, NULL, install_dir, 44, 80, L"Lucida Console", 0, 0); else hres = Piffle( linkname, exepath, linkpath, "", "", install_dir, 44, 80, "Lucida Console"); if (hres) { fprintf(stderr, "Link creation failed.\n"); } return hres; }