?? messages.c
字號:
/*
messages.c
*/
// standard libs..
#include <stdtypes.h>
#include <string.h>
#include <stdio.h>
// custom libs...
#include <clib1.h>
extern CHAR errstring[], text[];
int data_err8( CHAR *str, UINT32 offset, UINT8 sb_data, UINT8 ws_data )
/*
Adds info string to errstring, then calls sb_ws.
Entry: str - informational string to apply first (can be NULL )
address - address of the miscompare
sb_data - what the data should be
ws_data - what was actaully seen
Return: FALSE
NOTE: All offsets are assumed to be byte offset unless specifically stated
otherwise by caller.
*/
{
if ( str != NULL ) strcat( errstring, str );
return( sb_ws8( offset, sb_data, ws_data ) );
}
int data_err16( CHAR *str, UINT32 offset, UINT16 sb_data, UINT16 ws_data )
/* see data_err_8 */
{
if ( str != NULL ) strcat( errstring, str );
return( sb_ws16( offset, sb_data, ws_data ) );
}
int data_err32( CHAR *str, UINT32 offset, UINT32 sb_data, UINT32 ws_data )
/* see data_err_8 */
{
if ( str != NULL ) strcat( errstring, str );
return( sb_ws32( offset, sb_data, ws_data ) );
}
int sb_ws8( UINT32 offset, UINT8 sb_data, UINT8 ws_data )
/*
Adds miscompare info to string, and returns FALSE.
Entry: address - address of the miscompare
sb_data - what the data should be
ws_data - what was actaully seen
Return: FALSE
*/
{
sprintf( text, "Miscompare at offset %4.4lx. SB: %2.2x WS: %2.2x.\n", \
offset, sb_data, ws_data );
strcat( errstring, text );
return( FALSE );
}
int sb_ws16( UINT32 offset, UINT16 sb_data, UINT16 ws_data )
/* see sb_ws8 */
{
sprintf( text, "Miscompare at offset %4.4lx. SB: %4.4x WS: %4.4x.\n", \
offset, sb_data, ws_data );
strcat( errstring, text );
return( FALSE );
}
int sb_ws32( UINT32 offset, UINT32 sb_data, UINT32 ws_data )
/* see sb_ws8 */
{
sprintf( text, "Miscompare at offset %4.4lx. SB: %8.8lx WS: %8.8lx.\n", \
offset, sb_data, ws_data );
strcat( errstring, text );
return( FALSE );
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -