• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ LIT_ENG函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LIT_ENG函数的典型用法代码示例。如果您正苦于以下问题:C++ LIT_ENG函数的具体用法?C++ LIT_ENG怎么用?C++ LIT_ENG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LIT_ENG函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: DoMod

void DoMod( void )
{
    stack_entry *left;
    union {
        signed_64       s;
        unsigned_64     u;
    }   dummy;

    left = StkEntry( 1 );
    BinOp( left, ExprSP );
    switch( left->info.kind ) {
    case TK_BOOL:
    case TK_ENUM:
    case TK_CHAR:
    case TK_INTEGER:
        if( U64Test( &ExprSP->v.uint ) == 0 ) {
            Error( ERR_NONE, LIT_ENG( ERR_ZERO_MOD ) );
        }
        if( (left->info.modifier & TM_MOD_MASK) == TM_UNSIGNED ) {
            U64Div( &left->v.uint, &ExprSP->v.uint, &dummy.u, &left->v.uint );
        } else {
            I64Div( &left->v.sint, &ExprSP->v.sint, &dummy.s, &left->v.sint );
        }
        break;
    default:
        Error( ERR_NONE, LIT_ENG( ERR_ILL_TYPE ) );
        break;
    }
    CombineEntries( left, left, ExprSP );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:30,代码来源:dbgexpr4.c


示例2: ProcInvoke

void ProcInvoke( void )
{
    const char  *fstart;
    size_t      flen;
    const char  *start;
    char_ring   *parmlist;
    char_ring   **owner;
    char_ring   *path;
    size_t      len;

    if( !ScanItem( TRUE, &fstart, &flen ) )
        Error( ERR_LOC, LIT_ENG( ERR_WANT_FILENAME ) );
    parmlist = NULL;
    owner = &parmlist;
    while( !ScanEOC() ) {
        ScanItem( TRUE, &start, &len );
        _Alloc( path, sizeof( char_ring ) + len );
        if( path == NULL ) {
            FreeRing( parmlist );
            Error( ERR_NONE, LIT_ENG( ERR_NO_MEMORY ) );
        }
        memcpy( path->name, start, len );
        path->name[ len ] = NULLCHAR;
        path->next = NULL;
        *owner = path;
        owner = &path->next;
    }
    Invoke( fstart, (int)flen, parmlist );
}
开发者ID:NoSuchProcess,项目名称:open-watcom-v2,代码行数:29,代码来源:dbginvk.c


示例3: ItemGet

static bool ItemGet( address *addr, item_mach *item, item_type typ )
{
    unsigned    size = Sizes[typ & IT_TYPE_MASK];

    if( typ & IT_DEC )
        addr->mach.offset -= size;
    if( typ & IT_IO ) {
        if( PortPeek( addr->mach.offset, item, size ) != size ) {
            if( typ & IT_ERR ) {
                Error( ERR_NONE, LIT_ENG( ERR_NO_READ_PORT ), *addr );
            }
            return( false );
        }
    } else {
        if( ProgPeek( *addr , item, size ) != size ) {
            if( typ & IT_ERR ) {
                AddrFix( addr );
                Error( ERR_NONE, LIT_ENG( ERR_NO_READ_MEM ), *addr );
            }
            return( false );
        }
    }
    if( typ & IT_INC )
        addr->mach.offset += size;
    return( true );

}
开发者ID:groessler,项目名称:open-watcom-v2,代码行数:27,代码来源:dbgmemor.c


示例4: ReportTrap

bool ReportTrap( unsigned conditions, bool stack_cmds )
{
    bool    cmds_pushed;
    char        *p;

    if( conditions & COND_EXCEPTION ) {
        RecordMsgText( &conditions ); // get the 'access violation, etc' message
        p = StrCopy( LIT_ENG( Task_Exception ), TxtBuff );
        if( MsgText != NULL ) StrCopy( MsgText, p );
        MsgText = DbgRealloc( MsgText, strlen( TxtBuff ) + 1 );
        StrCopy( TxtBuff, MsgText );
        DUIMsgBox( MsgText );
    }
    if( conditions & (COND_EXCEPTION|COND_TERMINATE) ) {
        RingBell();
    }
    DisplayMsgText();
    if( conditions & COND_USER ) {
        DUIInfoBox( LIT_ENG( User_Interupt ) );
        PurgeInpStack();
        RecordAsynchEvent();
    } else if( conditions & COND_TERMINATE ) {
        DUIInfoBox( LIT_ENG( Task_Completed ) );
        _SwitchOff( SW_HAVE_TASK );
    } else if( conditions & COND_LIBRARIES ) {
        Format( TxtBuff, "%s '%s'", LIT_ENG( Break_on_DLL_Load ), GetLastImageName() );
        DUIInfoBox( TxtBuff );
    } else {
        DUIStatusText( LIT_ENG( Empty ) );
    }
    cmds_pushed = DispBPMsg( stack_cmds );
    DbgUpdate( UP_MEM_CHANGE | UP_CSIP_CHANGE | UP_REG_CHANGE |
               UP_CODE_EXECUTED | UP_THREAD_STATE );
    return( cmds_pushed );
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:35,代码来源:dbgexec.c


示例5: ItemPut

static bool ItemPut( address *addr, const item_mach *item, item_type typ )
{
    unsigned    size = Sizes[typ & IT_TYPE_MASK];

    if( typ & IT_DEC )
        addr->mach.offset -= size;
    if( typ & IT_IO ) {
        if( PortPoke( addr->mach.offset, item, size ) != size ) {
            if( typ & IT_ERR ) {
                Error( ERR_NONE, LIT_ENG( ERR_NO_WRITE_PORT ), *addr );
            }
            return( false );
        }
    } else {
        if( ChangeMem( *addr, item, size ) != size ) {
            if( typ & IT_ERR ) {
                Error( ERR_NONE, LIT_ENG( ERR_NO_WRITE_MEM ), *addr );
            }
            return( false );
        }
    }
    if( typ & IT_INC )
        addr->mach.offset += size;
    return( true );

}
开发者ID:groessler,项目名称:open-watcom-v2,代码行数:26,代码来源:dbgmemor.c


示例6: WndFileInspect

extern void WndFileInspect( const char *file, bool binary )
{
    handle              filehndl;
    void                *viewhndl;
    mod_handle          mod;
    DIPHDL( cue, ch );

    viewhndl = NULL;
    if( binary ) {
        filehndl = FileOpen( file, OP_READ );
        if( filehndl == NIL_HANDLE ) Error( ERR_NONE, LIT_ENG( ERR_FILE_NOT_OPEN ), file );
        DoWndBinOpen( file, filehndl );
    } else {
        mod = LookupModName( NO_MOD, file, strlen( file ) );
        if( mod == NO_MOD ) {
            mod = FindFileMod( file );
        }
        if( FindFirstCue( mod, ch ) ) {
            viewhndl = OpenSrcFile( ch );
        } else {
            viewhndl = FOpenSource( file, NO_MOD, 0 );
            ch = NULL;
        }
        if( viewhndl == NULL ) Error( ERR_NONE, LIT_ENG( ERR_FILE_NOT_OPEN ), file );
        DoWndFileOpen( file, viewhndl, ch, false, false, WND_FILE );
    }
}
开发者ID:groessler,项目名称:open-watcom-v2,代码行数:27,代码来源:dbgwinsp.c


示例7: GUImain

void GUImain( void )
{
#if defined(__OSI__) || __WATCOMC__ < 1000
    {
    long    result;

#if defined(__OSI__)
    _Extender = 1;
#endif
    result = DPMIAllocateLDTDescriptors( 1 );
    if( result < 0 ) {
        StartupErr( LIT_ENG( Unable_to_get_rm_sel ) );
    }
    _ExtenderRealModeSelector = result & 0xffff;
    if( DPMISetSegmentLimit( _ExtenderRealModeSelector, 0xfffff ) ) {
        StartupErr( LIT_ENG( Unable_to_get_rm_sel ) );
    }
    }
#endif
    SaveOrigVectors();
    Orig28.a = MyGetRMVector( 0x28 );

    RMData.dpmi_adr = DPMIAllocateDOSMemoryBlock( _NBPARAS( RMSegEnd - RMSegStart ) );
    if( RMData.segm.pm == 0 ) {
        StartupErr( LIT_ENG( Unable_to_alloc_DOS_mem ) );
    }
    PMData = MK_FP( RMData.segm.pm, 0 );
    _fmemcpy( PMData, RMSegStart, RMSegEnd - RMSegStart );
    if( _osmajor == 2 ) {
        PMData->fail = 0;
    } else {
        PMData->fail = 3;
    }
    DebugMain();
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:35,代码来源:dsxinit.c


示例8: DoDiv

void DoDiv( void )
{
    stack_entry *left;
    xreal       re, im, mag, t1, t2;

    left = StkEntry( 1 );
    BinOp( left, ExprSP );
    switch( left->info.kind ) {
    case TK_BOOL:
    case TK_ENUM:
    case TK_CHAR:
    case TK_INTEGER:
        if( U64Test( &ExprSP->v.uint ) == 0 ) {
            Error( ERR_NONE, LIT_ENG( ERR_ZERO_DIV ) );
        }
        if( (left->info.modifier & TM_MOD_MASK) == TM_UNSIGNED ) {
            U64Div( &left->v.uint, &ExprSP->v.uint, &left->v.uint, NULL );
        } else {
            I64Div( &left->v.sint, &ExprSP->v.sint, &left->v.sint, NULL );
        }
        break;
    case TK_REAL:
        DToLD( 0.0, &t1 );
        if( LDCmp( &ExprSP->v.real, &t1 ) == 0 ) {
            Error( ERR_NONE, LIT_ENG( ERR_ZERO_DIV ) );
        }
        LDDiv( &left->v.real, &ExprSP->v.real, &left->v.real );
        break;
    case TK_COMPLEX:
        DToLD( 0.0, &t1 );
        if( LDCmp( &ExprSP->v.cmplx.re, &t1 ) == 0
         && LDCmp( &ExprSP->v.cmplx.im, &t1 ) == 0 ) {
            Error( ERR_NONE, LIT_ENG( ERR_ZERO_DIV ) );
        }
        /*   (a,b)/(c,d) = (ac+bd,bc-ad) / (c^2+d^2)     */
        LDMul( &ExprSP->v.cmplx.re, &ExprSP->v.cmplx.re, &t1 );
        LDMul( &ExprSP->v.cmplx.im, &ExprSP->v.cmplx.im, &t2 );
        LDAdd( &t1, &t2, &mag );

        LDMul( &left->v.cmplx.re, &ExprSP->v.cmplx.re, &t1 );
        LDMul( &left->v.cmplx.im, &ExprSP->v.cmplx.im, &t2 );
        LDAdd( &t1, &t2, &re );

        LDMul( &left->v.cmplx.im, &ExprSP->v.cmplx.re, &t1 );
        LDMul( &left->v.cmplx.re, &ExprSP->v.cmplx.im, &t2 );
        LDSub( &t1, &t2, &im );

        LDDiv( &re, &mag, &left->v.cmplx.re );
        LDDiv( &im, &mag, &left->v.cmplx.im );
        break;
    default:
        Error( ERR_NONE, LIT_ENG( ERR_ILL_TYPE ) );
        break;
    }
    CombineEntries( left, left, ExprSP );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:56,代码来源:dbgexpr4.c


示例9: DoPlus

void DoPlus( void )
{
    stack_entry *left;

    left = StkEntry( 1 );
    LRValue( left );
    RValue( ExprSP );
    switch( ExprSP->info.kind ) {
    case TK_POINTER:
    case TK_ADDRESS:
        /* get the pointer as the left operand */
        left = ExprSP;
        SwapStack( 1 );
    }
    AddOp( left, ExprSP );
    switch( left->info.kind ) {
    case TK_BOOL:
    case TK_ENUM:
    case TK_CHAR:
    case TK_INTEGER:
        U64Add( &left->v.uint, &ExprSP->v.uint, &left->v.uint );
        break;
    case TK_POINTER:
    case TK_ADDRESS:
        switch( ExprSP->info.kind ) {
        case TK_BOOL:
        case TK_ENUM:
        case TK_CHAR:
        case TK_INTEGER:
            break;
        default:
            Error( ERR_NONE, LIT_ENG( ERR_ILL_TYPE ) );
        }
        if( (left->info.modifier & TM_MOD_MASK) == TM_NEAR ) {
            //NYI: 64 bit offsets
            left->v.addr.mach.offset += U32FetchTrunc( ExprSP->v.uint );
        } else {
            //NYI: 64 bit offsets
            left->v.addr = AddrAdd( left->v.addr, U32FetchTrunc( ExprSP->v.uint ) );
        }
        break;
    case TK_REAL:
        LDAdd( &left->v.real, &ExprSP->v.real, &left->v.real );
        break;
    case TK_COMPLEX:
        LDAdd( &left->v.cmplx.re, &ExprSP->v.cmplx.re, &left->v.cmplx.re );
        LDAdd( &left->v.cmplx.im, &ExprSP->v.cmplx.im, &left->v.cmplx.im );
        break;
    default:
        Error( ERR_NONE, LIT_ENG( ERR_ILL_TYPE ) );
        break;
    }
    CombineEntries( left, left, ExprSP );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:54,代码来源:dbgexpr4.c


示例10: DoMinus

void DoMinus( void )
{
    stack_entry *left;

    left = StkEntry( 1 );
    LRValue( left );
    RValue( ExprSP );
    AddOp( left, ExprSP );
    switch( left->info.kind ) {
    case TK_BOOL:
    case TK_ENUM:
    case TK_CHAR:
    case TK_INTEGER:
        U64Sub( &left->v.uint, &ExprSP->v.uint, &left->v.uint );
        left->info.modifier = TM_SIGNED;
        break;
    case TK_POINTER:
    case TK_ADDRESS:
        switch( ExprSP->info.kind ) {
        case TK_BOOL:
        case TK_CHAR:
        case TK_ENUM:
        case TK_INTEGER:
            //NYI: 64 bit offsets
            left->v.addr = AddrAdd( left->v.addr, -U32FetchTrunc( ExprSP->v.uint ) );
            break;
        case TK_POINTER:
        case TK_ADDRESS:
            I32ToI64( AddrDiff( left->v.addr, ExprSP->v.addr ), &left->v.sint );
            left->info.kind = TK_INTEGER;
            left->info.modifier = TM_SIGNED;
            left->info.size = sizeof( signed_64 );
            left->th = NULL;
            break;
        default:
            Error( ERR_NONE, LIT_ENG( ERR_ILL_TYPE ) );
        }
        break;
    case TK_REAL:
        LDSub( &left->v.real, &ExprSP->v.real, &left->v.real );
        break;
    case TK_COMPLEX:
        LDSub( &left->v.cmplx.re, &ExprSP->v.cmplx.re, &left->v.cmplx.re );
        LDSub( &left->v.cmplx.im, &ExprSP->v.cmplx.im, &left->v.cmplx.im );
        break;
    default:
        Error( ERR_NONE, LIT_ENG( ERR_ILL_TYPE ) );
        break;
    }
    CombineEntries( left, left, ExprSP );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:51,代码来源:dbgexpr4.c


示例11: SymResolve

void SymResolve( stack_entry *entry )
{
    item_mach   tmp;
    sym_handle  *sh;

    if( entry->flags & SF_SYM ) {
        sh = entry->v.sh;
        entry->flags &= ~SF_FORM_MASK;
        if( DIPSymLocation( sh, entry->lc, &entry->v.loc ) == DS_OK ) {
            entry->flags |= SF_LOCATION;
            if( entry->v.loc.e[0].type == LT_ADDR ) {
                entry->flags |= SF_IMP_ADDR;
            }
            GetTrueEntry( entry );
        } else {
            if( entry->info.kind == TK_STRING ) {
                _ChkAlloc( entry->v.string.allocated, entry->info.size,
                            LIT_ENG( ERR_NO_MEMORY_FOR_EXPR ) );
                LocationCreate( &entry->v.string.loc, LT_INTERNAL,
                            entry->v.string.allocated );
                if( DIPSymValue( sh, entry->lc, entry->v.string.allocated ) != DS_OK ) {
                    Error( ERR_NONE, LIT_ENG( ERR_NO_ACCESS ) );
                }
            } else {
                if( DIPSymValue( sh, entry->lc, &tmp ) != DS_OK ) {
                    Error( ERR_NONE, LIT_ENG( ERR_NO_ACCESS ) );
                }
                FromItem( &tmp, entry );
            }
        }
        switch( entry->info.kind ) {
        case TK_CODE:
        case TK_ADDRESS:
            if( !(entry->flags & SF_LOCATION) ) {
                ExprSetAddrInfo( entry, false );
/*
        This was here before, but that messes up things like 'do x=0:0'
        where 'x' is a newly created debugger variable. I can't think
        of any reason why you'd want to do this. If it turns out that there
        is a reason, talk to me.
                        Brian.
            } else {
                LocationToAddr( entry );
*/
            }
            entry->th = NULL;
            break;
        }
    }
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:50,代码来源:dbgexpr2.c


示例12: DispBPMsg

bool DispBPMsg( bool stack_cmds )
{
    brkp        *bp;
    brkp        *next;
    char        *p;
    bool        ret;
    cmd_list    *cmds;

    ret = false;
    for( bp = BrkList; bp != NULL; bp = bp->next ) {
        if( !bp->status.b.hit )
            continue;
        if( !bp->status.b.silent ) {
            p = GetBPAddrText( bp, TxtBuff );
            if( !IS_BP_EXECUTE( bp->th ) ) {
                p = StrCopy( " - ", p );
                p = StrVal( LIT_ENG( OldVal ), bp, p );
                GetWPVal( bp );
                p = StrVal( LIT_ENG( NewVal ), bp, p );
                *p = NULLCHAR;
            }
            DUIInfoBox( TxtBuff );
        }
        if( stack_cmds && bp->status.b.resume ) {
            cmds = AllocCmdList( "go/keep", sizeof( "go/keep" ) );
            PushCmdList( cmds );
            TypeInpStack( INP_HOOK );
            FreeCmdList( cmds );
            ret = true;
        }
        if( stack_cmds && ( bp->cmds != NULL ) && bp->status.b.use_cmds ) {
            bp->status.b.cmds_pushed = true;
            PushCmdList( bp->cmds );
            TypeInpStack( INP_BREAK_POINT );
            ret = true;
        }
    }
    for( bp = BrkList; bp != NULL; bp = next ) {
        next = bp->next;
        if( bp->status.b.autodestruct ) {
            DUIRemoveBreak( bp );
        }
    }
    if( UserTmpBrk.status.b.hit ) {
        p = Format( TxtBuff, LIT_ENG( Break_on_execute ) );
        Format( p, BrkFmt(), UserTmpBrk.loc.addr );
        DUIDlgTxt( TxtBuff );
    }
    return( ret );
}
开发者ID:groessler,项目名称:open-watcom-v2,代码行数:50,代码来源:dbgbrk.c


示例13: DUIImageLoaded

bool DUIImageLoaded( image_entry *image, bool load,
                     bool already_stopping, bool *force_stop )
/************************************************************/
{
    already_stopping=already_stopping;
    force_stop= force_stop;
    if( load ) {
        Format( TxtBuff, "%s '%s'", LIT_ENG( DLL_Loaded ), image->image_name );
    } else {
        Format( TxtBuff, "%s '%s'", LIT_ENG( DLL_UnLoaded ), image->image_name );
    }
    DUIDlgTxt( TxtBuff );
    return( FALSE );
}
开发者ID:seyko2,项目名称:open-watcom-v2,代码行数:14,代码来源:dui.c


示例14: DoAPoints

void DoAPoints( stack_entry *stk, type_kind def )
{
    stack_flags         was_imp_addr;
    addr_off            off;

    LRValue( stk );
    was_imp_addr = stk->flags & SF_IMP_ADDR;
    switch( stk->info.kind ) {
    case TK_BOOL:
    case TK_ENUM:
    case TK_CHAR:
    case TK_INTEGER:
        //NYI: 64 bit offsets
        off = U32FetchTrunc( stk->v.uint );
        stk->v.addr = DefAddrSpaceForAddr( Context.execution );
        stk->v.addr.mach.offset = off;
        stk->info.modifier = TM_NEAR;
        /* fall through */
    case TK_POINTER:
    case TK_ADDRESS:
        if( stk->th != NULL ) {
            LocationCreate( &stk->v.loc, LT_ADDR, &stk->v.addr );
            DIPTypeBase( stk->th, stk->th, stk->lc, &stk->v.loc );
            ClassifyEntry( stk, &stk->info );
            if( stk->info.kind == TK_VOID ) {
                Error( ERR_NONE, LIT_ENG( ERR_VOID_BASE ) );
            }
        } else {
            if( def == TK_NONE )
                def = TK_INTEGER;
            stk->info.kind = def;
            switch( def ) {
            case TK_INTEGER:
                stk->info.modifier = TM_UNSIGNED;
                stk->info.size = DefaultSize( DK_INT );
                break;
            case TK_ADDRESS:
                ExprSetAddrInfo( stk, false );
                break;
            }
            LocationCreate( &stk->v.loc, LT_ADDR, &stk->v.addr );
        }
        stk->flags |= SF_LOCATION | was_imp_addr;
        break;
    default:
        Error( ERR_NONE, LIT_ENG( ERR_ILL_TYPE ) );
        break;
    }
    stk->flags &= ~SF_CONST;
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:50,代码来源:dbgexpr4.c


示例15: Format

static char     *GetBPAddrText( brkp *bp, char *p )
{
    if( IS_BP_EXECUTE( bp->th ) ) {
        p = Format( p, LIT_ENG( Break_on_execute ) );
        p = Format( p, BrkFmt(), bp->loc.addr );
    } else {
        p = StrCopy( LIT_ENG( Break_on_write ), p );
        if( bp->source_line != NULL ) {
            p = StrCopy( bp->source_line, p );
        } else {
            p = Format( p, "%a", bp->loc.addr );
        }
    }
    return( p );
}
开发者ID:groessler,项目名称:open-watcom-v2,代码行数:15,代码来源:dbgbrk.c


示例16: while

OVL_EXTERN brkp *ImageBreak( memory_expr def_seg )
{
    const char  *start;
    size_t      len;
    bool        clear = false;
    int         cmd;

    def_seg=def_seg;
    while( CurrToken == T_DIV ) {
        Scan();
        cmd = ScanCmd( PointNameTab );
        if( cmd < 0 )
            break;
        switch( cmd ) {
        case B_CLEAR:
            clear = true;
            break;
        default:
            Error( ERR_LOC, LIT_ENG( ERR_BAD_OPTION ), GetCmdName( CMD_BREAK ) );
            break;
        }
    }
    if( !ScanItem( true, &start, &len ) ) {
        BadPoint( def_seg );
    }
    BreakOnImageLoad( start, len, clear );
    Scan();
    ReqEOC();
    return( NULL );
}
开发者ID:groessler,项目名称:open-watcom-v2,代码行数:30,代码来源:dbgbrk.c


示例17: Error

static brkp *BPNotNull( brkp *bp )
{
    if( bp == NULL ) {
        Error( ERR_NONE, LIT_ENG( ERR_NO_SUCH_POINT ) );
    }
    return( bp );
}
开发者ID:groessler,项目名称:open-watcom-v2,代码行数:7,代码来源:dbgbrk.c


示例18: GetRawItem

void GetRawItem( char *start )
{
    unsigned num;

    SkipSpaces();
    if( CurrChar == '{' ) {
        NextChar();
        num = 1;
        for( ;; ) {
            if( CurrChar == ARG_TERMINATE ) {
                StartupErr( LIT_ENG( STARTUP_Expect_Brace ) );
            } else if( CurrChar == '{' ) {
                ++num;
            } else if( CurrChar == '}' ) {
                if( --num == 0 ) {
                    NextChar();
                    break;
                }
            }
            *start++ = CurrChar;
            NextChar();
        }
        *start = NULLCHAR;
    } else {
        DoGetItem( start, false );
    }
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:27,代码来源:dbgcmdln.c


示例19: DoMul

void DoMul( void )
{
    stack_entry *left;
    xreal       re, im, t1, t2;

    left = StkEntry( 1 );
    BinOp( left, ExprSP );
    switch( left->info.kind ) {
    case TK_BOOL:
    case TK_ENUM:
    case TK_CHAR:
    case TK_INTEGER:
        U64Mul( &left->v.uint, &ExprSP->v.uint, &left->v.uint );
        break;
    case TK_REAL:
        LDMul( &left->v.real, &ExprSP->v.real, &left->v.real );
        break;
    case TK_COMPLEX:
        /*  (a,b) * (c,d) = (ac-bd,ad+bc)   */
        LDMul( &left->v.cmplx.re, &ExprSP->v.cmplx.re, &t1 );
        LDMul( &left->v.cmplx.im, &ExprSP->v.cmplx.im, &t2 );
        LDSub( &t1, &t2, &re );
        LDMul( &left->v.cmplx.re, &ExprSP->v.cmplx.im, &t1 );
        LDMul( &left->v.cmplx.im, &ExprSP->v.cmplx.re, &t2 );
        LDAdd( &t1, &t2, &im );
        left->v.cmplx.re = re;
        left->v.cmplx.im = im;
        break;
    default:
        Error( ERR_NONE, LIT_ENG( ERR_ILL_TYPE ) );
        break;
    }
    CombineEntries( left, left, ExprSP );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:34,代码来源:dbgexpr4.c


示例20: ProcCapture

extern void ProcCapture( void )
{
    cmd_list    *cmds;
    const char  *start;
    size_t      len;
    const char  *old;
    char        *p;
    char        *end;

    if( !ScanItem( false, &start, &len ) )
        Error( ERR_NONE, LIT_ENG( ERR_WANT_COMMAND_LIST ) );
    ReqEOC();
    cmds = AllocCmdList( start, len );
    end = FileName + sizeof( FileName );
    p = FileName + PREFIX_LEN;
    p = CnvULongHex( TaskId, p, end - p );
    *p++ = RemFile.ext_separator;
    p = CnvULongDec( FileNum++, p, end - p );
    *p = NULLCHAR;
    old = ReScan( FileName+PREFIX_LEN );
    StdOutNew();
    ReScan( old );
    cmds->use++;
    CaptureOk = true;
    PushInpStack( cmds, DoneCapture, false );
    TypeInpStack( INP_CAPTURED );
    FreeCmdList( cmds );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:28,代码来源:dbgcapt.c



注:本文中的LIT_ENG函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LKASSERT函数代码示例发布时间:2022-05-30
下一篇:
C++ LIS_V2P函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap