/// Time from days, hours, minutes, seconds Time::Time(int days, int hours, int minutes, int seconds) { hours += HOURS_PER_DAY*days; if ((hours*minutes >= 0) && (hours*seconds >= 0) && (minutes*seconds >= 0)) { // same sign, carry on m_impl = ImplType(hours, minutes, seconds, 0); } else { // mixed sign ImplType negativeDuration(std::min(hours,0),std::min(minutes,0),std::min(seconds,0),0); m_impl = ImplType(std::max(hours,0),std::max(minutes,0),std::max(seconds,0),0); m_impl += negativeDuration; } }
void Function( TYPE typ, uint size, bool len_spec ) { // Compile [type] [*len] FUNCTION NAME[*len] ([d,d,...]) // \ / // Already scanned // unsigned_16 flags; entry_pt *entry; flags = SY_USAGE | SY_SUBPROGRAM | SY_PENTRY | SY_FUNCTION; if( typ == FT_NO_TYPE ) { typ = ImplType( *(CITNode->opnd) ); } else { flags |= SY_TYPE; } CkSubEnd(); ProgSw |= PS_IN_SUBPROGRAM; if( ReqName( NAME_FUNCTION ) ) { entry = SubProgName( typ, flags, size, len_spec ); STFnShadow( SubProgId ); if( ReqOpenParen() ) { ParmList( false, entry ); } ReqCloseParen(); ReqNOpn(); AdvanceITPtr(); ReqEOS(); } else { // We still want to start a subprogram even though there is no name. SubProgId = LkProgram(); // use default name GSegLabel(); } BIStartSubroutine(); }
/// Time from number of days, fractional values ok Time::Time(double fracDays) { double fracHours = HOURS_PER_DAY * fracDays; int hours = floor0(fracHours); double fracMinutes = MINUTES_PER_HOUR * (fracHours-hours); int minutes = floor0(fracMinutes); double fracSeconds = SECONDS_PER_MINUTE * (fracMinutes-minutes); int seconds = floor0(fracSeconds); m_impl = ImplType(hours, minutes, seconds, 0); }
HRESULT CAutoConfigDlg::AddConverterMappingSub() { return m_pECs->AddConversionMap ( m_strFriendlyName.AllocSysString(), m_strConverterIdentifier.AllocSysString(), m_eConversionType, ImplType().AllocSysString(), // get from sub-class m_strLhsEncodingId.AllocSysString(), m_strRhsEncodingId.AllocSysString(), (ProcessTypeFlags)m_lProcessTypeFlags ); }
sym_id SymLookup( char *name, int length ) { //=========================================== // Lookup a symbol in the symbol table. sym_id sym; sym = STName( name, length ); if( ( sym->ns.flags & ( SY_TYPE | SY_INTRINSIC ) ) == 0 ) { sym->ns.xt.size = ImplSize( *name ); sym->ns.typ = MapTypes( ImplType( *name ), sym->ns.xt.size ); } return( sym ); }
CString CAutoConfigDlg::GetRegKey() { CString strRegKey; strRegKey.Format(CNVTRS_ROOT + _T("\\ConvertersSupported\\%s\\RecentlyUsed"), ImplType()); return strRegKey; }