void Profiling::OutputInfo(FilePtr _pFile) { const float fTotal = s_fStopTime - s_fStartTime; if (0.0f < fTotal) { const int sSize = _snprintf_s(s_szBuffer, s_uBufferSize, s_uBufferSize, "calls\n"); _pFile->Write(s_szBuffer, sSize); TagInfoMap::iterator iPair = s_mTags.begin(); TagInfoMap::iterator iEnd = s_mTags.end(); while (iEnd != iPair) { TagInfoRef rTagInfo = iPair->second; const float fAverage = (0 < rTagInfo.m_uCount) ? rTagInfo.m_fTotal / float(rTagInfo.m_uCount) : 0.0f; const int sSize = _snprintf_s(s_szBuffer, s_uBufferSize, s_uBufferSize, "%s : %u calls total=%f(%5.2f%%) min=%f max=%f avg=%f\n", rTagInfo.m_strName.c_str(), rTagInfo.m_uCount, rTagInfo.m_fTotal, (rTagInfo.m_fTotal / fTotal) * 100.0f, rTagInfo.m_fShortest, rTagInfo.m_fLongest, fAverage); _pFile->Write(s_szBuffer, sSize); ++iPair; } { const int sSize = _snprintf_s(s_szBuffer, s_uBufferSize, s_uBufferSize, "callstack\n"); _pFile->Write(s_szBuffer, sSize); OutputInfoCallStack(s_mCallStacks, 0, _pFile); } } }
HEFFECT D3DCore_Impl::Effect_Load(const WCHAR *filename, DWORD size) { if(m_bSilent) return 0; DWORD _size; FilePtr pf; SampleSource* SSource = NULL; void *data; if(m_pADevice) { if(size) { data=(void *)filename; _size=size; } else { data=File_Load(filename, &_size); if(!data) return NULL; } pf = CreateMemoryFile(data, _size); if(pf.get() != NULL) { SSource = OpenSampleSource( pf.get() ); if(!SSource) { System_Log(L"[AUDIERE - ERROR] %s - Can't create sound effect", filename); } SSource->ref(); } if(!size) File_Free(data); return (HEFFECT)SSource; } else return 0; }
NodeList FtpManager::parseDirectoryContentsWindows(std::ostringstream &content) { std::stringstream ss; ss << content.str(); NodeList res = NodeList::create(); std::string line; while (std::getline(ss, line)) { QString permissions = ""; QString numberOfLinks = ""; QString user = ""; QString group = ""; QString size = ""; QString date = ""; QString time = ""; QString filename = ""; QString l = QString::fromStdString(line); QStringList fields = l.split(' ', QString::SplitBehavior::SkipEmptyParts); date = fields[0]; l = l.replace(l.indexOf(date), date.size(), ""); time = fields[1]; l = l.replace(l.indexOf(time), time.size(), ""); QString word = fields[2]; if (word == "<DIR>") permissions = "d"; else size = word; l = l.replace(l.indexOf(word), word.size(), ""); filename = l.trimmed(); if (filename.toLower() != ".control.db") { qDebug() << permissions << ", " << numberOfLinks << ", " << user << ", " << group << ", " << size << ", " << ", " << time << ", " << filename; if (!permissions.startsWith('d')) { FilePtr f = FilePtr::create(filename); f->setFileData(permissions, user, size.toUInt(), date, time); (*res)[filename] = f; } else { FolderPtr f = FolderPtr::create(filename); (*res)[filename] = f; } } } return res; }
long File::FileSize(const FilePtr& file) { std::fseek(file.get(), 0, SEEK_END); const long size = std::ftell(file.get()); std::rewind(file.get()); return size; }
//--------------------------------------------------------------------------- void createTrafficLog (void) { if (fileTrafficLog && fileTrafficLog->isOpen()) return; fileTrafficLog = new File; fileTrafficLog->create("filetraffic.log"); }
void CShader::_SetFile( FilePtr pFile ) { VKE_ASSERT( m_pFile.IsNull(), "File already set. Be sure a shader is properly created." ); m_pFile = pFile; m_Data.pCode = pFile->GetData(); m_Data.codeSize = pFile->GetDataSize(); m_Data.state = ShaderStates::HIGH_LEVEL_TEXT; this->m_resourceState |= ResourceStates::LOADED; }
list<MapPtr> Process::restrict_maps_to_file(const FilePtr &file) { list<MapPtr> file_maps = file->maps(); list<MapPtr> proc_maps = _maps; list<MapPtr> result = Map::intersect_lists(file_maps, proc_maps); if (result.size() == 0) { warn << _pid << ": empty restriction to file " << file->name() << "\n"; } return result; }
i32 CDirectory::AddFile(FilePtr pFile) { FileMap::iterator Itr = m_mFiles.find( pFile->GetName() ); if( Itr == m_mFiles.end() ) { m_mFiles.insert( FileMap::value_type( pFile->GetName(), pFile ) ); return RESULT::OK; } return RESULT::FAILED; }
// -------------------------------------------------------------------------- void Property::load(const FileGroupPtr &db, const BitArray &objMask) { // Open the chunk specified by "P$" + mChunkName FilePtr fprop; string pchn = "P$" + mChunkName; try { fprop = db->getFile(pchn); const DarkDBChunkHeader &hdr = db->getFileHeader(pchn); // compare the versions, log differences if (hdr.version_high != mVerMaj || hdr.version_low != mVerMin) { LOG_ERROR("Property %s version mismatch : %d.%d expected, %d.%d " "encountered", pchn.c_str(), mVerMaj, mVerMin, hdr.version_high, hdr.version_low); } } catch (const BasicException &) { LOG_ERROR("Property::load : Could not find the property chunk %s", pchn.c_str()); return; } // Can't calculate the count of the properties, as they can have any size // load. Each record has: OID, size (32 bit uint's) int id = 0xDEADBABE; while (!fprop->eof()) { // load the id fprop->readElem(&id, sizeof(uint32_t)); // if the object is not in the mask, skip the property if (!objMask[id]) { LOG_DEBUG("Property::load: skipping object %d, not in bitmap", id); // prop has length and data - so skip according to that uint32_t size; fprop->read(&size, sizeof(uint32_t)); fprop->seek(size, File::FSEEK_CUR); continue; } // Use property storage to load the property if (mPropertyStorage->readFromFile(fprop, id, true)) { _addProperty(id); } else { LOG_ERROR("There was an error loading property %s for object %d. " "Property was not loaded", mName.c_str(), id); } } }
FilePtr FSMemory::OpenFile(const string& _strPath, const EOpenMode& _eMode) { FileMemory::CreateInfo oFMCInfo = { _strPath, _eMode }; FilePtr pResult = new FileMemory; if (false == pResult->Create(boost::any(&oFMCInfo))) { CloseFile(pResult); pResult = NULL; } return pResult; }
FilePtr CFileManager::LoadFile(const SFileCreateDesc& Desc) { FilePtr pFile = _CreateFile( Desc ); if( VKE_SUCCEEDED( _LoadFromFile( &pFile ) ) ) { } else { pFile->Release(); pFile = nullptr; } return pFile; }
void File::FileRead(const FilePtr& file, std::vector<byte>& bytes) { const long filesize = File::FileSize(file); bytes.resize(filesize, 0); std::fread(bytes.data(), 1, filesize, file.get()); }
std::shared_ptr<ShaderProgram> ContentManager::LoadNew(const std::string &name, bool async) { FilePtr fp = FileManager::Instance()->OpenFile(name); if (!fp) { LOG("Failed loading '%s': file not found", name.c_str()); return nullptr; } int size = fp->GetSize(); char *data = new char[size + 1]; fp->Read(data, size); fp->Close(); data[size] = 0; ShaderProgramPtr program = std::make_shared<ShaderProgram>(); ShaderPtr vs = std::make_shared<Shader>(GL_VERTEX_SHADER); if (!vs->Load(data)) { LOG("Error loading '%s' vertex shader: %s", name.c_str(), vs->ErrorMessage().c_str()); return nullptr; } program->AddShader(vs); ShaderPtr ps = std::make_shared<Shader>(GL_FRAGMENT_SHADER); if (!ps->Load(data)) { LOG("Error loading '%s' fragment shader: %s", name.c_str(), vs->ErrorMessage().c_str()); return nullptr; } program->AddShader(ps); if (!program->Link()) { LOG("Error loading '%s': link failed", name.c_str()); return nullptr; } ContentManager::Instance()->CacheObject(name, program); LOG("Loaded shader '%s'", name.c_str()); return program; }
void PrintClassDecl::print (FilePtr const & file, ClassDeclPtr const & class_decl) const { // instantiation extern only if dll_api macro is set bool has_exports = is_inst && is_inst_extern && conf::isOptionSet (conf::opt_dll_api); if (has_exports) { // we know dll_exports macro is set if dll_api macro is set file->getStream (skind) << "#ifndef " << conf::getOptionValue (conf::opt_dll_exports) << '\n'; } String str = declToString (class_decl); str += ';'; printLine (file, skind, getNameLoc (class_decl->getName ()), str); if (has_exports) { file->getStream (skind) << "#endif" << '\n'; } }
bool DisplaySurface::Create(const boost::any& _rConfig) { CreateInfo* pInfo = boost::any_cast<CreateInfo*>(_rConfig); FilePtr pFile = NULL; bool bResult = (NULL != pInfo); { pFile = FS::GetRoot()->OpenFile(pInfo->m_strPath, FS::EOpenMode_READBINARY); bResult = (NULL != pFile); } if (false != bResult) { int sSize = pFile->Size(); unsigned char* pBuffer = new unsigned char[sSize]; sSize = pFile->Read(pBuffer, sSize); bResult = SUCCEEDED(D3DXGetImageInfoFromFileInMemory(pBuffer, sSize, &m_oInfo)); if (false != bResult) { #pragma message(__FUNCTION__" : for better support some image formats must be converted into supported surface format. For example luminance image should be translated into paletted surface.") bResult = SUCCEEDED(m_rDisplay.GetDevicePtr()->CreateOffscreenPlainSurface(m_oInfo.Width, m_oInfo.Height, m_oInfo.Format, D3DPOOL_DEFAULT, &m_pSurface, NULL)); } if (false != bResult) { bResult = SUCCEEDED(D3DXLoadSurfaceFromFileInMemory(m_pSurface, NULL, NULL, pBuffer, sSize, NULL, D3DX_FILTER_NONE, 0xff000000, NULL)); } if (false != bResult) { m_uBPP = m_rDisplay.GetFormatBitsPerPixel(m_oInfo.Format); bResult = (0 != m_uBPP); } delete[] pBuffer; FS::GetRoot()->CloseFile(pFile); } return bResult; }
void PrintObjDecl::print (FilePtr const & file, SectionKind skind, ObjPtr const & obj) const { printHashLine (file, skind, getNameLoc (obj->getName ())); std::ostream & os = file->indent (skind) << declToString (obj); if (with_init && obj->hasInit ()) { os << ' '; obj->getInit ()->print (file, skind); } os << ';' << '\n'; }
//------------------------------------------------------ std::string DatabaseService::loadFileNameFromTag(const Opde::FileGroupPtr &db, const char *tagname) { FilePtr fdm = db->getFile(tagname); size_t gft_size = fdm->size(); std::string res; char *data = NULL; data = new char[gft_size + 1]; data[0] = 0x0; data[gft_size] = 0x0; fdm->read(data, fdm->size()); // TODO: Catch exception res = std::string(data); delete[] data; return res; }
bool Lua::Loadfile(const string& _strFileName, LuaStatePtr _pState) { FilePtr pFile = FS::GetRoot()->OpenFile(_strFileName, FS::EOpenMode_READTEXT); bool bResult = (NULL != pFile); if (false != bResult) { int sSize = pFile->Size(); char* pSourceCode = new char[sSize + 1]; sSize = pFile->Read(pSourceCode, sSize); FS::GetRoot()->CloseFile(pFile); pSourceCode[sSize] = '\0'; _pState = (NULL == _pState) ? s_pState : _pState; const int sResult = _pState->DoString(pSourceCode); bResult = (0 == sResult); delete[] pSourceCode; if (false == bResult) { OutputError(sResult, _pState); } } return bResult; }
//------------------------------------------------------ uint32_t DatabaseService::getFileType(const FileGroupPtr &db) { // TODO: load FILE_TYPE for the first parameter FilePtr fttag = db->getFile("FILE_TYPE"); if (!fttag) { // TODO: Exception, rather LOG_FATAL("Database file did not contain FILE_TYPE tag"); return 0; } if (fttag->size() < sizeof(uint32_t)) { // TODO: Exception, rather LOG_FATAL("Database file did contain an invalid FILE_TYPE tag"); return 0; } uint32_t filetype; fttag->readElem(&filetype, sizeof(uint32_t)); return filetype; }
// -------------------------------------------------------------------------- bool StructuredDataStorage::readFromFile(FilePtr& file, int objID, bool sizeStored) { DTypePtr pd = getDataForObject(objID); if (pd.isNull()) { uint32_t size; // Read the size if (sizeStored) file->readElem(&size, sizeof(uint32_t)); else size = mTypeDef->size(); // compare sizes if (size != mTypeDef->size()) LOG_ERROR("Data size mismatch: %d definition, %d file source", mTypeDef->size(), size); // create a new data pd = _create(objID); pd->read(file, size); mDataMap.insert(std::make_pair(objID, pd)); return true; } else { // still have to at least skip the data uint32_t size; // Read the size file->readElem(&size, sizeof(uint32_t)); file->seek(size, File::FSEEK_CUR); LOG_ERROR("Data already defined for object %d", objID); } return false; }
//------------------------------------------------------ void DatabaseService::save(const std::string &filename, uint32_t saveMask) { // just prepare the progress and delegate to the broadcast FilePtr fp = FilePtr(new StdFile(filename, File::FILE_RW)); FileGroupPtr tgtdb = FileGroupPtr(new DarkFileGroup()); LOG_DEBUG("DatabaseService::save - Save to file %s, mask %X", filename.c_str(), saveMask); mLoadingStatus.reset(); mLoadingStatus.totalCoarse += mListeners.size(); broadcastOnDBSave(tgtdb, saveMask); // And write the saveMask as FILE_TYPE FilePtr fpf = tgtdb->createFile( "FILE_TYPE", 0, 1); // The version is fixed, really. Nothing to invent here fpf->writeElem(&saveMask, sizeof(uint32_t)); // And Write! tgtdb->write(fp); }
static int do_files(SnapshotPtr &snap, char *args[]) { list<FilePtr> files; list<FilePtr>::iterator it; files = snap->files(); Sizes::scale_kbytes(); for (int i = 0; i < Sizes::NUM_SIZES; ++i) { cout << Sizes::size_name(i) << "\t"; } cout << "NAME\n"; for (it = files.begin(); it != files.end(); ++it) { FilePtr file = *it; SizesPtr sizes = file->sizes(); for (int i = 0; i < Sizes::NUM_SIZES; ++i) { cout << sizes->sval(i) << "\t"; } cout << file->name(); cout << "\n"; } return 0; }
void BlockFileSystem::closeFile(FilePtr& pFile) { FX_DEBUG("Close file: %s", pFile->fileName.c_str()); ScopedLock<FastMutex> lock(m_lock); FileMap::iterator it = m_filesOpened.find(pFile->fileName); if (it == m_filesOpened.end()) { FIRTEX_THROW(FileIOException, "File: [%s] is not opened yet", pFile->fileName.c_str()); } if (pFile.use_count() > 2) { /// some one still refer to this file pFile.reset(); } FileList& fileList = m_filesOpened[pFile->fileName]; fileList.remove_if(ListElemRemover(pFile)); if (fileList.size() == 0) { m_filesOpened.erase(it); } if (!pFile->readOnly && FX_OS_FTRUNCATE(pFile->fileHandle, pFile->fileActualSize)) { FX_NS(utility)::File::handleLastError(m_sFsPath + pFile->fileName); } if (FX_OS_CLOSE(pFile->fileHandle)) { FX_NS(utility)::File::handleLastError(m_sFsPath + pFile->fileName); } }
void DirectoryDestination::export_photo_async( const PhotoPtr & photo, const PhotoListPtr & pending, const ProgressObserverPtr & observer) throw() { const FilePtr file = Gio::File::create_for_uri(photo->get_uri()); const FilePtr dest = Gio::File::create_for_path( filename_ + "/" + file->get_basename()); file->copy_async( dest, sigc::slot<void, goffset, goffset>(), sigc::bind( sigc::mem_fun(*this, &DirectoryDestination::on_async_copy_ready), file, pending, observer), observer, Gio::FILE_COPY_NONE, Glib::PRIORITY_DEFAULT); }
ShaderPtr ShaderLoader::Load(const Path & vertex_file_name, const Path & fragment_file_name, bool replaceCached) { Path resourceName = vertex_file_name.filename().generic_string() + fragment_file_name.filename().generic_string(); Resource<Shader> existingResource = this->GetResource(resourceName); if (existingResource.resource && !replaceCached) { GetContext().GetLogger()->log(LOG_LOG, "Shader returned from cache."); return existingResource.resource; } FilePtr vertexFile = GetContext().GetFileSystem()->OpenRead(vertex_file_name); FilePtr fragmentFile = GetContext().GetFileSystem()->OpenRead(fragment_file_name); if (!vertexFile->IsOpen() || !fragmentFile->IsOpen()) { return ShaderPtr(); } GetContext().GetLogger()->log(LOG_LOG, "Shader resource name: %s", resourceName.generic_string().c_str()); ByteBufferPtr vertexBuffer = vertexFile->ReadText(); ByteBufferPtr fragmentBuffer = fragmentFile->ReadText(); Shader * shader = new Shader(resourceName.generic_string(), (char*)vertexBuffer->data(), (char*)fragmentBuffer->data(), ""); shader->Compile(); if (shader->IsCompiledAndLinked()) { if (existingResource.resource) { RemoveResource(existingResource.path); GetContext().GetLogger()->log(LOG_LOG, "Removed cached shader: '%s'.", resourceName.c_str()); } GetContext().GetLogger()->log(LOG_LOG, "Shader loaded: '%s'.", resourceName.c_str()); Resource<Shader> res(ShaderPtr(shader), resourceName); this->AddResource(res); return res.resource; } else { delete shader; if (existingResource.resource) GetContext().GetLogger()->log(LOG_ERROR, "Shader failed to load: '%s', using cached version.", resourceName.generic_string().c_str()); else GetContext().GetLogger()->log(LOG_ERROR, "Shader failed to load: '%s'.", resourceName.generic_string().c_str()); return existingResource.resource; } }
void SftpTest::handleChannelInitialized() { if (m_state != InitializingChannel) { std::cerr << "Unexpected state " << m_state << "in function " << Q_FUNC_INFO << "." << std::endl; earlyDisconnectFromHost(); return; } std::cout << "Creating " << m_parameters.smallFileCount << " files of 1 KB each ..." << std::endl; qsrand(QDateTime::currentDateTime().toTime_t()); for (int i = 0; i < m_parameters.smallFileCount; ++i) { const QString fileName = QLatin1String("sftptestfile") + QString::number(i + 1); const FilePtr file(new QFile(QDir::tempPath() + QLatin1Char('/') + fileName)); bool success = true; if (!file->open(QIODevice::WriteOnly | QIODevice::Truncate)) success = false; if (success) { int content[1024/sizeof(int)]; for (size_t j = 0; j < sizeof content / sizeof content[0]; ++j) content[j] = qrand(); file->write(reinterpret_cast<char *>(content), sizeof content); file->close(); } success = success && file->error() == QFile::NoError; if (!success) { std::cerr << "Error creating local file " << qPrintable(file->fileName()) << "." << std::endl; earlyDisconnectFromHost(); return; } m_localSmallFiles << file; } std::cout << "Files created. Now uploading..." << std::endl; foreach (const FilePtr &file, m_localSmallFiles) { const QString localFilePath = file->fileName(); const QString remoteFp = remoteFilePath(QFileInfo(localFilePath).fileName()); const SftpJobId uploadJob = m_channel->uploadFile(file->fileName(), remoteFp, SftpOverwriteExisting); if (uploadJob == SftpInvalidJob) { std::cerr << "Error uploading local file " << qPrintable(localFilePath) << " to remote file " << qPrintable(remoteFp) << "." << std::endl; earlyDisconnectFromHost(); return; } m_smallFilesUploadJobs.insert(uploadJob, remoteFp); } m_state = UploadingSmall; }
// -------------------------------------------------------------------------- bool StructuredDataStorage::writeToFile(FilePtr& file, int objID, bool sizeStored) { DTypePtr pd = getDataForObject(objID); if (!pd.isNull()) { uint32_t size = pd->size(); // Write the size if (sizeStored) file->writeElem(&size, sizeof(uint32_t)); // write the data itself pd->serialize(file); return true; } return false; }
void Profiling::OutputInfoCallStack(CallInfoMapRef _rmCallStack, UInt _uDepth, FilePtr _pFile) { const float fTotal = s_fStopTime - s_fStartTime; if (0.0f < fTotal) { CallInfoMap::iterator iPair = _rmCallStack.begin(); CallInfoMap::iterator iEnd = _rmCallStack.end(); while (iEnd != iPair) { CallInfoRef rCallInfo = iPair->second; TagInfoRef rTagInfo = s_mTags[iPair->first]; const float fAverage = (0 < rCallInfo.m_uCount) ? rCallInfo.m_fTotal / float(rCallInfo.m_uCount) : 0.0f; for (UInt i = 0 ; (_uDepth > i) && (s_uBufferSize > i) ; ++i) { s_szBuffer[i] = '\t'; } const int sSize = _snprintf_s(s_szBuffer + _uDepth, s_uBufferSize - _uDepth, s_uBufferSize - _uDepth, "%s : %u calls total=%f(%5.2f%%) min=%f max=%f avg=%f\n", rTagInfo.m_strName.c_str(), rCallInfo.m_uCount, rCallInfo.m_fTotal, (rCallInfo.m_fTotal / fTotal) * 100.0f, rCallInfo.m_fShortest, rCallInfo.m_fLongest, fAverage); _pFile->Write(s_szBuffer, sSize + _uDepth); if (false == rCallInfo.m_mChildrenCalls.empty()) { OutputInfoCallStack(rCallInfo.m_mChildrenCalls, _uDepth + 1, _pFile); } ++iPair; } } }
void DirectoryDestination::on_async_copy_ready( const AsyncResultPtr & async_result, const FilePtr & file, const PhotoListPtr & pending, const ProgressObserverPtr & observer) throw() { try { file->copy_finish(async_result); } catch (const Gio::Error & e) { switch (e.code()) { case Gio::Error::CANCELLED: return; break; default: g_warning("%s", e.what().c_str()); break; } } if (0 != observer) { observer->progress(); } pending->pop_back(); if (false == pending->empty()) { export_photo_async(pending->back(), pending, observer); } }
//------------------------------------------------------------------------------------------ long Radio::loadMessageInfo(void) { FullPathFileName messageInfoPath; FilePtr messageInfoFile; long result; char dataLine[512]; char* field; messageInfoPath.init(soundPath,"radio",".csv"); messageInfoFile = new File; if (!messageInfoFile) return -1; //quasit result = messageInfoFile->open(messageInfoPath); if (result != NO_ERR) { delete messageInfoFile; return result; } messageInfoFile->readLine((MemoryPtr)dataLine, 511); // skip title line for (long i=0; i<RADIO_MESSAGE_COUNT; i++) { result = messageInfoFile->readLine((MemoryPtr)dataLine, 511); if (!result) Fatal(0, "Bad Message Info File"); field = strtok(dataLine, ","); // get past command name field = strtok(NULL, ","); if (field) messageInfo[i].priority = atoi(field); else messageInfo[i].priority = 4; field = strtok(NULL, ","); if (field) messageInfo[i].shelfLife = atoi(field); else messageInfo[i].shelfLife = 0; field = strtok(NULL, ","); if (field && *field != 'x') messageInfo[i].movieCode = *field; else messageInfo[i].movieCode = '\0'; field = strtok(NULL, ","); if (field) messageInfo[i].styleCount = atoi(field); else messageInfo[i].styleCount = 1; field = strtok(NULL, ","); if (field) messageInfo[i].styleChance[0] = atoi(field); else messageInfo[i].styleChance[0] = 0; field = strtok(NULL, ","); if (field) messageInfo[i].styleChance[1] = atoi(field); else messageInfo[i].styleChance[1] = 0; field = strtok(NULL, ","); if (field) messageInfo[i].styleChance[2] = atoi(field); else messageInfo[i].styleChance[2] = 0; field = strtok(NULL, ","); if (field) messageInfo[i].pilotIdentifiesSelf = (*field == 'y'); else messageInfo[i].pilotIdentifiesSelf = FALSE; field = strtok(NULL, ","); if (field) messageInfo[i].messageMapping = atoi(field); else messageInfo[i].messageMapping = 0; field = strtok(NULL, ","); if (field) { field = strtok(NULL, ","); if (field) { messageInfo[i].kludgeStyle = (*field == 'x'); } } if (!field) messageInfo[i].kludgeStyle = FALSE; } messageInfoFile->close(); delete messageInfoFile; return NO_ERR; }