Fixed warnings.
This commit is contained in:
parent
9560e58ac5
commit
3b1e3c8f9b
|
@ -97,10 +97,12 @@ int yyerror(char *);
|
||||||
|
|
||||||
input: line
|
input: line
|
||||||
| input line
|
| input line
|
||||||
|
;
|
||||||
|
|
||||||
line: command
|
line: command
|
||||||
| tEOL
|
| tEOL
|
||||||
| error tEOL { yyerrok; }
|
| error tEOL { yyerrok; }
|
||||||
|
;
|
||||||
|
|
||||||
command:
|
command:
|
||||||
tQUIT tEOL { DEBUG_ExitMode = EXIT_QUIT; return 1; }
|
tQUIT tEOL { DEBUG_ExitMode = EXIT_QUIT; return 1; }
|
||||||
|
@ -169,19 +171,21 @@ command:
|
||||||
| walk_command
|
| walk_command
|
||||||
| run_command
|
| run_command
|
||||||
| noprocess_state
|
| noprocess_state
|
||||||
|
;
|
||||||
|
|
||||||
set_command:
|
set_command: tSET lval_addr '=' expr_value tEOL { DEBUG_WriteMemory(&$2,$4); DEBUG_FreeExprMem(); }
|
||||||
tSET lval_addr '=' expr_value tEOL { DEBUG_WriteMemory( &$2, $4 );
|
;
|
||||||
DEBUG_FreeExprMem(); }
|
|
||||||
|
|
||||||
pathname:
|
pathname:
|
||||||
tIDENTIFIER { $$ = $1; }
|
tIDENTIFIER { $$ = $1; }
|
||||||
| tPATH { $$ = $1; }
|
| tPATH { $$ = $1; }
|
||||||
|
;
|
||||||
|
|
||||||
disassemble_command:
|
disassemble_command:
|
||||||
tDISASSEMBLE tEOL { DEBUG_Disassemble( NULL, NULL, 10 ); }
|
tDISASSEMBLE tEOL { DEBUG_Disassemble( NULL, NULL, 10 ); }
|
||||||
| tDISASSEMBLE expr_addr tEOL { DEBUG_Disassemble( & $2, NULL, 10 ); }
|
| tDISASSEMBLE expr_addr tEOL { DEBUG_Disassemble( & $2, NULL, 10 ); }
|
||||||
| tDISASSEMBLE expr_addr ',' expr_addr tEOL { DEBUG_Disassemble( & $2, & $4, 0 ); }
|
| tDISASSEMBLE expr_addr ',' expr_addr tEOL { DEBUG_Disassemble( & $2, & $4, 0 ); }
|
||||||
|
;
|
||||||
|
|
||||||
list_command:
|
list_command:
|
||||||
tLIST tEOL { DEBUG_List( NULL, NULL, 10 ); }
|
tLIST tEOL { DEBUG_List( NULL, NULL, 10 ); }
|
||||||
|
@ -189,6 +193,7 @@ list_command:
|
||||||
| tLIST list_arg tEOL { DEBUG_List( & $2, NULL, 10 ); }
|
| tLIST list_arg tEOL { DEBUG_List( & $2, NULL, 10 ); }
|
||||||
| tLIST ',' list_arg tEOL { DEBUG_List( NULL, & $3, -10 ); }
|
| tLIST ',' list_arg tEOL { DEBUG_List( NULL, & $3, -10 ); }
|
||||||
| tLIST list_arg ',' list_arg tEOL { DEBUG_List( & $2, & $4, 0 ); }
|
| tLIST list_arg ',' list_arg tEOL { DEBUG_List( & $2, & $4, 0 ); }
|
||||||
|
;
|
||||||
|
|
||||||
list_arg:
|
list_arg:
|
||||||
tNUM { $$.sourcefile = NULL; $$.line = $1; }
|
tNUM { $$.sourcefile = NULL; $$.line = $1; }
|
||||||
|
@ -197,16 +202,19 @@ list_arg:
|
||||||
| pathname ':' tIDENTIFIER { DEBUG_GetFuncInfo( & $$, $1, $3); }
|
| pathname ':' tIDENTIFIER { DEBUG_GetFuncInfo( & $$, $1, $3); }
|
||||||
| '*' expr_addr { DEBUG_FindNearestSymbol( & $2.addr, FALSE, NULL, 0, & $$ );
|
| '*' expr_addr { DEBUG_FindNearestSymbol( & $2.addr, FALSE, NULL, 0, & $$ );
|
||||||
DEBUG_FreeExprMem(); }
|
DEBUG_FreeExprMem(); }
|
||||||
|
;
|
||||||
|
|
||||||
x_command:
|
x_command:
|
||||||
tEXAM expr_addr tEOL { DEBUG_ExamineMemory( &$2, 1, 'x'); DEBUG_FreeExprMem(); }
|
tEXAM expr_addr tEOL { DEBUG_ExamineMemory( &$2, 1, 'x'); DEBUG_FreeExprMem(); }
|
||||||
| tEXAM tFORMAT expr_addr tEOL { DEBUG_ExamineMemory( &$3, $2>>8, $2&0xff );
|
| tEXAM tFORMAT expr_addr tEOL { DEBUG_ExamineMemory( &$3, $2>>8, $2&0xff );
|
||||||
DEBUG_FreeExprMem(); }
|
DEBUG_FreeExprMem(); }
|
||||||
|
;
|
||||||
|
|
||||||
print_command:
|
print_command:
|
||||||
tPRINT expr_addr tEOL { DEBUG_Print( &$2, 1, 0, 0 ); DEBUG_FreeExprMem(); }
|
tPRINT expr_addr tEOL { DEBUG_Print( &$2, 1, 0, 0 ); DEBUG_FreeExprMem(); }
|
||||||
| tPRINT tFORMAT expr_addr tEOL { DEBUG_Print( &$3, $2 >> 8, $2 & 0xff, 0 );
|
| tPRINT tFORMAT expr_addr tEOL { DEBUG_Print( &$3, $2 >> 8, $2 & 0xff, 0 );
|
||||||
DEBUG_FreeExprMem(); }
|
DEBUG_FreeExprMem(); }
|
||||||
|
;
|
||||||
|
|
||||||
break_command:
|
break_command:
|
||||||
tBREAK '*' expr_addr tEOL{ DEBUG_AddBreakpoint( &$3, NULL ); DEBUG_FreeExprMem(); }
|
tBREAK '*' expr_addr tEOL{ DEBUG_AddBreakpoint( &$3, NULL ); DEBUG_FreeExprMem(); }
|
||||||
|
@ -214,10 +222,12 @@ break_command:
|
||||||
| tBREAK identifier ':' tNUM tEOL { DEBUG_AddBreakpointFromId($2, $4); }
|
| tBREAK identifier ':' tNUM tEOL { DEBUG_AddBreakpointFromId($2, $4); }
|
||||||
| tBREAK tNUM tEOL { DEBUG_AddBreakpointFromLineno($2); }
|
| tBREAK tNUM tEOL { DEBUG_AddBreakpointFromLineno($2); }
|
||||||
| tBREAK tEOL { DEBUG_AddBreakpointFromLineno(-1); }
|
| tBREAK tEOL { DEBUG_AddBreakpointFromLineno(-1); }
|
||||||
|
;
|
||||||
|
|
||||||
watch_command:
|
watch_command:
|
||||||
tWATCH '*' expr_addr tEOL { DEBUG_AddWatchpoint( &$3, 1 ); DEBUG_FreeExprMem(); }
|
tWATCH '*' expr_addr tEOL { DEBUG_AddWatchpoint( &$3, 1 ); DEBUG_FreeExprMem(); }
|
||||||
| tWATCH identifier tEOL { DEBUG_AddWatchpointFromId($2); }
|
| tWATCH identifier tEOL { DEBUG_AddWatchpointFromId($2); }
|
||||||
|
;
|
||||||
|
|
||||||
info_command:
|
info_command:
|
||||||
tINFO tBREAK tEOL { DEBUG_InfoBreakpoints(); }
|
tINFO tBREAK tEOL { DEBUG_InfoBreakpoints(); }
|
||||||
|
@ -233,6 +243,7 @@ info_command:
|
||||||
| tINFO tWND expr_value tEOL{ DEBUG_InfoWindow( (HWND)$3 ); DEBUG_FreeExprMem(); }
|
| tINFO tWND expr_value tEOL{ DEBUG_InfoWindow( (HWND)$3 ); DEBUG_FreeExprMem(); }
|
||||||
| tINFO tLOCAL tEOL { DEBUG_InfoLocals(); }
|
| tINFO tLOCAL tEOL { DEBUG_InfoLocals(); }
|
||||||
| tINFO tDISPLAY tEOL { DEBUG_InfoDisplay(); }
|
| tINFO tDISPLAY tEOL { DEBUG_InfoDisplay(); }
|
||||||
|
;
|
||||||
|
|
||||||
walk_command:
|
walk_command:
|
||||||
tWALK tCLASS tEOL { DEBUG_WalkClasses(); }
|
tWALK tCLASS tEOL { DEBUG_WalkClasses(); }
|
||||||
|
@ -243,17 +254,20 @@ walk_command:
|
||||||
| tWALK tPROCESS tEOL { DEBUG_WalkProcess(); }
|
| tWALK tPROCESS tEOL { DEBUG_WalkProcess(); }
|
||||||
| tWALK tTHREAD tEOL { DEBUG_WalkThreads(); }
|
| tWALK tTHREAD tEOL { DEBUG_WalkThreads(); }
|
||||||
| tWALK tMODREF expr_value tEOL { DEBUG_WalkModref( $3 ); DEBUG_FreeExprMem(); }
|
| tWALK tMODREF expr_value tEOL { DEBUG_WalkModref( $3 ); DEBUG_FreeExprMem(); }
|
||||||
|
;
|
||||||
|
|
||||||
run_command:
|
run_command:
|
||||||
tRUN tEOL { DEBUG_Run(NULL); }
|
tRUN tEOL { DEBUG_Run(NULL); }
|
||||||
| tRUN tSTRING tEOL { DEBUG_Run($2); }
|
| tRUN tSTRING tEOL { DEBUG_Run($2); }
|
||||||
|
;
|
||||||
|
|
||||||
noprocess_state:
|
noprocess_state:
|
||||||
tNOPROCESS tEOL {} /* <CR> shall not barf anything */
|
tNOPROCESS tEOL {} /* <CR> shall not barf anything */
|
||||||
| tNOPROCESS tSTRING tEOL { DEBUG_Printf(DBG_CHN_MESG, "No process loaded, cannot execute '%s'\n", $2); }
|
| tNOPROCESS tSTRING tEOL { DEBUG_Printf(DBG_CHN_MESG, "No process loaded, cannot execute '%s'\n", $2); }
|
||||||
|
;
|
||||||
|
|
||||||
type_cast:
|
type_cast: '(' type_expr ')' { $$ = $2; }
|
||||||
'(' type_expr ')' { $$ = $2; }
|
;
|
||||||
|
|
||||||
type_expr:
|
type_expr:
|
||||||
type_expr '*' { $$ = DEBUG_FindOrMakePointerType($1); }
|
type_expr '*' { $$ = DEBUG_FindOrMakePointerType($1); }
|
||||||
|
@ -274,14 +288,15 @@ type_expr:
|
||||||
| tSTRUCT tIDENTIFIER { $$ = DEBUG_TypeCast(DT_STRUCT, $2); }
|
| tSTRUCT tIDENTIFIER { $$ = DEBUG_TypeCast(DT_STRUCT, $2); }
|
||||||
| tUNION tIDENTIFIER { $$ = DEBUG_TypeCast(DT_STRUCT, $2); }
|
| tUNION tIDENTIFIER { $$ = DEBUG_TypeCast(DT_STRUCT, $2); }
|
||||||
| tENUM tIDENTIFIER { $$ = DEBUG_TypeCast(DT_ENUM, $2); }
|
| tENUM tIDENTIFIER { $$ = DEBUG_TypeCast(DT_ENUM, $2); }
|
||||||
|
;
|
||||||
|
|
||||||
expr_addr:
|
expr_addr: expr { $$ = DEBUG_EvalExpr($1); }
|
||||||
expr { $$ = DEBUG_EvalExpr($1); }
|
;
|
||||||
|
|
||||||
expr_value:
|
expr_value: expr { DBG_VALUE value = DEBUG_EvalExpr($1);
|
||||||
expr { DBG_VALUE value = DEBUG_EvalExpr($1);
|
|
||||||
/* expr_value is typed as an integer */
|
/* expr_value is typed as an integer */
|
||||||
$$ = DEBUG_ReadMemory(&value); }
|
$$ = DEBUG_ReadMemory(&value); }
|
||||||
|
;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The expr rule builds an expression tree. When we are done, we call
|
* The expr rule builds an expression tree. When we are done, we call
|
||||||
|
@ -330,34 +345,35 @@ expr:
|
||||||
| '*' expr %prec OP_DEREF { $$ = DEBUG_UnopExpr(EXP_OP_DEREF, $2); }
|
| '*' expr %prec OP_DEREF { $$ = DEBUG_UnopExpr(EXP_OP_DEREF, $2); }
|
||||||
| '&' expr %prec OP_DEREF { $$ = DEBUG_UnopExpr(EXP_OP_ADDR, $2); }
|
| '&' expr %prec OP_DEREF { $$ = DEBUG_UnopExpr(EXP_OP_ADDR, $2); }
|
||||||
| type_cast expr %prec OP_DEREF { $$ = DEBUG_TypeCastExpr($1, $2); }
|
| type_cast expr %prec OP_DEREF { $$ = DEBUG_TypeCastExpr($1, $2); }
|
||||||
|
;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The lvalue rule builds an expression tree. This is a limited form
|
* The lvalue rule builds an expression tree. This is a limited form
|
||||||
* of expression that is suitable to be used as an lvalue.
|
* of expression that is suitable to be used as an lvalue.
|
||||||
*/
|
*/
|
||||||
lval_addr:
|
lval_addr: lval { $$ = DEBUG_EvalExpr($1); }
|
||||||
lval { $$ = DEBUG_EvalExpr($1); }
|
;
|
||||||
|
|
||||||
lval:
|
lval: lvalue { $$ = $1; }
|
||||||
lvalue { $$ = $1; }
|
|
||||||
| '*' expr { $$ = DEBUG_UnopExpr(EXP_OP_FORCE_DEREF, $2); }
|
| '*' expr { $$ = DEBUG_UnopExpr(EXP_OP_FORCE_DEREF, $2); }
|
||||||
|
;
|
||||||
|
|
||||||
lvalue:
|
lvalue: tNUM { $$ = DEBUG_ConstExpr($1); }
|
||||||
tNUM { $$ = DEBUG_ConstExpr($1); }
|
|
||||||
| tINTVAR { $$ = DEBUG_IntVarExpr($1); }
|
| tINTVAR { $$ = DEBUG_IntVarExpr($1); }
|
||||||
| tIDENTIFIER { $$ = DEBUG_SymbolExpr($1); }
|
| tIDENTIFIER { $$ = DEBUG_SymbolExpr($1); }
|
||||||
| lvalue OP_DRF tIDENTIFIER { $$ = DEBUG_StructPExpr($1, $3); }
|
| lvalue OP_DRF tIDENTIFIER { $$ = DEBUG_StructPExpr($1, $3); }
|
||||||
| lvalue '.' tIDENTIFIER { $$ = DEBUG_StructExpr($1, $3); }
|
| lvalue '.' tIDENTIFIER { $$ = DEBUG_StructExpr($1, $3); }
|
||||||
| lvalue '[' expr ']' { $$ = DEBUG_BinopExpr(EXP_OP_ARR, $1, $3); }
|
| lvalue '[' expr ']' { $$ = DEBUG_BinopExpr(EXP_OP_ARR, $1, $3); }
|
||||||
|
;
|
||||||
|
|
||||||
identifier:
|
identifier: tIDENTIFIER { $$ = $1; }
|
||||||
tIDENTIFIER { $$ = $1; }
|
|
||||||
| identifier '.' tIDENTIFIER { char* ptr = DBG_alloc(strlen($1) + 1 + strlen($3)+ 1);
|
| identifier '.' tIDENTIFIER { char* ptr = DBG_alloc(strlen($1) + 1 + strlen($3)+ 1);
|
||||||
sprintf(ptr, "%s.%s", $1, $3); $$ = DEBUG_MakeSymbol(ptr);
|
sprintf(ptr, "%s.%s", $1, $3); $$ = DEBUG_MakeSymbol(ptr);
|
||||||
DBG_free(ptr); }
|
DBG_free(ptr); }
|
||||||
| identifier ':' ':' tIDENTIFIER { char* ptr = DBG_alloc(strlen($1) + 2 + strlen($4) + 1);
|
| identifier ':' ':' tIDENTIFIER { char* ptr = DBG_alloc(strlen($1) + 2 + strlen($4) + 1);
|
||||||
sprintf(ptr, "%s::%s", $1, $4); $$ = DEBUG_MakeSymbol(ptr);
|
sprintf(ptr, "%s::%s", $1, $4); $$ = DEBUG_MakeSymbol(ptr);
|
||||||
DBG_free(ptr); }
|
DBG_free(ptr); }
|
||||||
|
;
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
|
|
|
@ -262,7 +262,7 @@ static BOOL IPADDRESS_SetRange (IPADDRESS_INFO *infoPtr, int index, WORD range)
|
||||||
|
|
||||||
static void IPADDRESS_ClearAddress (IPADDRESS_INFO *infoPtr)
|
static void IPADDRESS_ClearAddress (IPADDRESS_INFO *infoPtr)
|
||||||
{
|
{
|
||||||
WCHAR nil[0] = { 0 };
|
WCHAR nil[1] = { 0 };
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
|
|
|
@ -144,7 +144,7 @@ int IJGDEC_Decode( char* pdst, int dstpitch, int dstwidth, int dstheight, int ds
|
||||||
}
|
}
|
||||||
|
|
||||||
jpeg_create_decompress(&jdec);
|
jpeg_create_decompress(&jdec);
|
||||||
jdec.src = &jsrc;
|
jdec.src = &jsrc.pub;
|
||||||
|
|
||||||
ret = jpeg_read_header(&jdec,TRUE);
|
ret = jpeg_read_header(&jdec,TRUE);
|
||||||
if ( ret != JPEG_HEADER_OK ) goto err;
|
if ( ret != JPEG_HEADER_OK ) goto err;
|
||||||
|
|
|
@ -575,7 +575,6 @@ TW_UINT16 TWAIN_DisableDSUserInterface (pTW_IDENTITY pOrigin,
|
||||||
pTW_IDENTITY pDest, TW_MEMREF pData)
|
pTW_IDENTITY pDest, TW_MEMREF pData)
|
||||||
{
|
{
|
||||||
TW_UINT16 twRC = TWRC_SUCCESS;
|
TW_UINT16 twRC = TWRC_SUCCESS;
|
||||||
pTW_USERINTERFACE pUserInterface = (pTW_USERINTERFACE) pData;
|
|
||||||
activeDS *pSource = TWAIN_LookupSource (pDest);
|
activeDS *pSource = TWAIN_LookupSource (pDest);
|
||||||
|
|
||||||
TRACE ("DG_CONTROL/DAT_USERINTERFACE/MSG_DISABLEDS\n");
|
TRACE ("DG_CONTROL/DAT_USERINTERFACE/MSG_DISABLEDS\n");
|
||||||
|
@ -650,7 +649,6 @@ TW_UINT16 TWAIN_EnableDSUIOnly (pTW_IDENTITY pOrigin, pTW_IDENTITY pDest,
|
||||||
TW_MEMREF pData)
|
TW_MEMREF pData)
|
||||||
{
|
{
|
||||||
TW_UINT16 twRC = TWRC_SUCCESS;
|
TW_UINT16 twRC = TWRC_SUCCESS;
|
||||||
pTW_USERINTERFACE pUserInterface = (pTW_USERINTERFACE) pData;
|
|
||||||
activeDS *pSource = TWAIN_LookupSource (pDest);
|
activeDS *pSource = TWAIN_LookupSource (pDest);
|
||||||
|
|
||||||
TRACE("DG_CONTROL/DAT_USERINTERFACE/MSG_ENABLEDSUIONLY\n");
|
TRACE("DG_CONTROL/DAT_USERINTERFACE/MSG_ENABLEDSUIONLY\n");
|
||||||
|
|
|
@ -52,18 +52,13 @@
|
||||||
#ifndef TWAIN
|
#ifndef TWAIN
|
||||||
#define TWAIN
|
#define TWAIN
|
||||||
|
|
||||||
/* SDH - 02/08/95 - TWUNK */
|
#include "winnt.h"
|
||||||
/* Force 32-bit twain to use same packing of twain structures as existing */
|
|
||||||
/* 16-bit twain. This allows 16/32-bit thunking. */
|
#define FAR
|
||||||
#ifdef WIN32
|
#define huge
|
||||||
#ifdef __BORLANDC__ //(Mentor June 13, 1996) if using a Borland compiler
|
#define WIN32
|
||||||
#pragma option -a2 //(Mentor June 13, 1996) switch to word alignment
|
#define _WIN32
|
||||||
#else //(Mentor June 13, 1996) if we're using some other compiler
|
#define __declspec(spec)
|
||||||
#pragma pack (push, before_twain)
|
|
||||||
#pragma pack (2)
|
|
||||||
#endif //(Mentor June 13, 1996)
|
|
||||||
#else /* WIN32 */
|
|
||||||
#endif /* WIN32 */
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* TWAIN Version *
|
* TWAIN Version *
|
||||||
|
@ -77,8 +72,8 @@
|
||||||
|
|
||||||
/* Define one of the following, depending on the platform */
|
/* Define one of the following, depending on the platform */
|
||||||
/* #define _MAC_ */
|
/* #define _MAC_ */
|
||||||
#define _UNIX_
|
/* #define _UNIX_ */
|
||||||
/*#define _MSWIN_ */
|
#define _MSWIN_
|
||||||
|
|
||||||
#ifdef _MSWIN_
|
#ifdef _MSWIN_
|
||||||
typedef HANDLE TW_HANDLE;
|
typedef HANDLE TW_HANDLE;
|
||||||
|
@ -1861,16 +1856,4 @@ typedef TW_UINT16 (*DSENTRYPROC)(pTW_IDENTITY,
|
||||||
}
|
}
|
||||||
#endif /* cplusplus */
|
#endif /* cplusplus */
|
||||||
|
|
||||||
/* SDH - 02/08/95 - TWUNK */
|
|
||||||
/* Force 32-bit twain to use same packing of twain structures as existing */
|
|
||||||
/* 16-bit twain. This allows 16/32-bit thunking. */
|
|
||||||
#ifdef WIN32
|
|
||||||
#ifdef __BORLANDC__ //(Mentor June 13, 1996) if we're using a Borland compiler
|
|
||||||
#pragma option -a. //(Mentor October 30, 1996) switch back to original alignment
|
|
||||||
#else //(Mentor June 13, 1996) if NOT using a Borland compiler
|
|
||||||
#pragma pack (pop, before_twain)
|
|
||||||
#endif //(Mentor June 13, 1996)
|
|
||||||
#else /* WIN32 */
|
|
||||||
#endif /* WIN32 */
|
|
||||||
|
|
||||||
#endif /* TWAIN */
|
#endif /* TWAIN */
|
||||||
|
|
Loading…
Reference in New Issue