void CDirectoryManagerBase::SetLocalBasePath(const std::string& in) { if (m_bHaveLocalPath) { if (in != m_localPath) { m_localPath = TrimConst(in); if (!m_localPath.empty() && !IsPathEndOk(m_localPath)) m_localPath += '\\'; //UpdateDirectoryArray(); } } }
extern instruction *rDOCVT( instruction *ins ) { /***************************************************/ name *src; name *dst; name *temp; instruction *new_ins; conv_method how; src = ins->operands[ 0 ]; dst = ins->result; if( src->n.name_class != XX && ins->base_type_class == XX ) { ins->base_type_class = src->n.name_class; } ins->head.state = INS_NEEDS_WORK; if( src->n.class == N_CONSTANT && src->c.const_type == CONS_ABSOLUTE && ins->type_class != XX ) { src = TrimConst( src, ins->base_type_class ); how = OK; } else {
bool CIDSLiteStation::ReadStation(const StringVector& line) { ASSERT(line.size() == NB_COLUMNS); bool bRep = false; static int nbEmptyName = 0; Reset(); if (!line[C_LAT].empty() && !line[C_LON].empty() && !line[C_ELEV].empty() && line[C_LAT] != "+00.000" && line[C_LON] != "+000.000" && line[C_ELEV] != "-0999.9" && line[C_ELEV] != "-0999.0") { ASSERT(line[C_LAT] != "-99.999" && line[C_LON] != "-999.999"); bRep = true; string name = TrimConst(line[C_STATION_NAME]); if (name.empty()) { nbEmptyName++; name = "EmptyName" + ToString(nbEmptyName); } ASSERT(!name.empty()); m_name = UppercaseFirstLetter(name); m_country = TrimConst(line[C_CTRY]); m_state = TrimConst(line[C_STATE]); if (m_country.empty()) m_country = "UN";//Unknown ASSERT(!line[C_USAF].empty()); ASSERT(!line[C_WBAN].empty()); m_USAF = "USAF" + line[C_USAF]; m_WBAN = "WBAN" + line[C_WBAN]; m_ID = line[C_USAF] + "-" + line[C_WBAN]; ASSERT(!m_ID.empty()); m_lat = ToDouble(line[C_LAT]); m_lon = ToDouble(line[C_LON]); m_elev = ToDouble(line[C_ELEV]); if (line[C_USAF] == "716920")//coordinate error over MARTICOT ISLAND m_lon = -54.583; if (line[C_WBAN] == "12848")//coordinate error over Dinner Key NAF m_lon = -80.2333; ASSERT(m_lat >= -90 && m_lat < 90); ASSERT(m_lon >= -180 && m_lon < 180); if (!line[C_BEGIN].empty() && !line[C_END].empty()) { m_period.Begin() = CTRef(ToInt(line[C_BEGIN].substr(0, 4)), ToInt(line[C_BEGIN].substr(4, 2)) - 1, ToInt(line[C_BEGIN].substr(6, 2)) - 1); m_period.End() = CTRef(ToInt(line[C_END].substr(0, 4)), ToInt(line[C_END].substr(4, 2)) - 1, ToInt(line[C_END].substr(6, 2)) - 1); } SetToSSI(); } return bRep; }