本文整理汇总了C++中LIT_ENG函数的典型用法代码示例。如果您正苦于以下问题:C++ LIT_ENG函数的具体用法?C++ LIT_ENG怎么用?C++ LIT_ENG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LIT_ENG函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 );
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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 );
}
}
示例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();
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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;
}
}
}
示例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 );
}
示例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 );
}
示例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;
}
示例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 );
}