static void CalcAddrLen( a_window *wnd, address addr ) { asm_window *asw = WndAsm( wnd ); unsigned old; old = NewCurrRadix( asw->hex ? 16 : 10 ); AddrToString( &addr, MAF_OFFSET, TxtBuff, TXT_LEN ); asw->address_end = MaxGadgetLength; asw->address_end += ( strlen( TxtBuff ) + 1 ) * WndMidCharX( wnd ); NewCurrRadix( old ); }
static void ModCalcIndent( a_window *wnd ) { gui_ord extent,max_extent; int i,size; mod_window *mod = WndMod( wnd ); size = ModListNumRows( ModList( mod ) ); max_extent = 0; for( i = 0; i < size; ++i ) { ModListName( ModList( mod ), i, TxtBuff ); extent = WndExtentX( wnd, TxtBuff ); if( extent > max_extent ) max_extent = extent; } mod->max_modlen = max_extent + WndMidCharX( wnd ); WndNoSelect( wnd ); WndRepaint( wnd ); }