Beispiel #1
0
static void mcount_filter_init(enum uftrace_pattern_type ptype, char *dirname,
			       bool force)
{
	/* use debug info if available */
	prepare_debug_info(&symtabs, ptype, NULL, NULL, false, force);
	save_debug_info(&symtabs, dirname);
}
Beispiel #2
0
bool chk_bigflag( BIGFLAG *flaga, int nrbitu )
{
	int bank;
	int bit;

	DEBUG_INFO ( "bit.c:chk_bigflag:start" );

	const char *call = "bit.c => chk_bigflag";
	if ( nrbitu >= MAX_BIGFLAG )
	{
	DEBUG_INFO ( "bit.c:chk_bigflag:MAX_BIGFLAG" );
        save_debug_info( call, NULL, "pr�ba operowania na fladze przekraczaj�cej pojemno�� BIGFLAG", DEBUG_PROJECT_BIGFLAG, DEBUG_LEVEL_ERROR, TRUE );
        return FALSE;
	}

	DEBUG_INFO ( "bit.c:chk_bigflag:2" );
	if ( !flaga || !flaga->bank ) {
	DEBUG_INFO ( "bit.c:chk_bigflag:flag" );
	    sprintf( log_buf, "BUG: [bit.c:chk_bigflag] flaga lub flaga->bank nie s� zdefiniowane!" );
		log_string( log_buf );
		return FALSE;
	}

	DEBUG_INFO ( "bit.c:chk_bigflag:3" );
	bank = nrbitu / ( sizeof( flaga->bank[0] ) * 8 );
	DEBUG_INFO ( "bit.c:chk_bigflag:4" );
	bit = nrbitu % ( sizeof( flaga->bank[0] ) * 8 );

	DEBUG_INFO ( "bit.c:chk_bigflag:bit_shift_and_and" );
	return ( ( ( flaga->bank[ bank ] & ( 1<<bit ) ) != 0 )? TRUE: FALSE );
}
Beispiel #3
0
bool tgl_bigflag( BIGFLAG *flaga, int nrbitu )
{
	int bank;
	int bit;
	const char *call = "bit.c => tgl_bigflag";

	if ( nrbitu >= MAX_BIGFLAG )
	{
	 save_debug_info( call, NULL, "pr�ba operowania na fladze przekraczaj�cej pojemno�� BIGFLAG", DEBUG_PROJECT_BIGFLAG, DEBUG_LEVEL_ERROR, TRUE );
	 return FALSE;
	}
	bank = nrbitu / ( sizeof( flaga->bank[0] ) * 8 );
	bit = nrbitu % ( sizeof( flaga->bank[0] ) * 8 );
	flaga->bank[ bank ] ^= (1<<bit);
	return TRUE;
}
Beispiel #4
0
void update_herbs(const char *caller)
{
AREA_DATA *pArea;
ROOM_INDEX_DATA *pRoom;
int vnum;
const char *call = "herbs.c => update_herbs";
	save_debug_info( call, caller, NULL, DEBUG_PROJECT_UNKNOWN, DEBUG_LEVEL_ALL, TRUE );

    for ( pArea = area_first; pArea != NULL; pArea = pArea->next )
	{
		for ( vnum = pArea->min_vnum; vnum <= pArea->max_vnum; vnum++ )
    	{
            if ( ( pRoom = get_room_index(vnum) ) )
				update_herbs_room(pRoom, call);
		}
	}
    return;
}