Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/d3x0r/SACK
Browse files Browse the repository at this point in the history
  • Loading branch information
d3x0r committed May 12, 2024
2 parents cbd8999 + e3f3eee commit dcc099e
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 19 deletions.
2 changes: 2 additions & 0 deletions binary/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ string( REPLACE "\\" "/" SACK_SDK_ROOT_PATH ${SACK_SDK_ROOT_PATH} )

include( ${SACK_SDK_ROOT_PATH}/share/SACK/build/CMakePackage )

if( NOT BUILD_INTO_SACK )
INSTALL_SACK( ${CMAKE_INSTALL_PREFIX} )
endif( NOT BUILD_INTO_SACK )

include_directories( ${SACK_INCLUDE_DIR} )
LINK_DIRECTORIES( ${SACK_LIBRARY_DIR} )
Expand Down
2 changes: 1 addition & 1 deletion src/InterShell.stable/games/Slots/reel.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ PRELOAD( RegisterReel)

static uintptr_t OnCreateControl( "Games/Slots/Slot Reel")(PSI_CONTROL parent,int32_t x,int32_t y,uint32_t w,uint32_t h)
{
return MakeNamedControl( parent, reel_control.name, x, y, w, h, reel_local.ID++ );
return (uintptr_t)MakeNamedControl( parent, reel_control.name, x, y, w, h, reel_local.ID++ );
}

static PSI_CONTROL OnGetControl("Games/Slots/Slot Reel")(uintptr_t psvInit)
Expand Down
5 changes: 3 additions & 2 deletions src/InterShell.stable/graph/linegraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,16 @@ TARGET_ADDRESS CreateTarget( CTEXTSTR address )



void PingResult( uintptr_t psv, uint32_t dwIP, CTEXTSTR name, int min, int max, int avg, int drop, int hops )
void PingResult( uintptr_t psv, SOCKADDR* dwIP, CTEXTSTR name, int min, int max, int avg, int drop, int hops )
{
static int dropped;
PPING_DATA_COLLECTOR ppdc = (PPING_DATA_COLLECTOR)psv;
//lprintf( "max result is %d", max );
if( max )
{
PPING_RESULT result = GetFromSet( PING_RESULT, &ppdc->samples );
result->dwIP = dwIP;
lprintf( "Need to converet this address for ping result..." );
result->dwIP = (uint32_t)dwIP;
//result->name = StrDup( name );
result->min = min;
result->max = max;
Expand Down
2 changes: 1 addition & 1 deletion src/InterShell.stable/security.sql/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ struct _global_sql_password global_sql_password;

TEXTSTR getCurrentUser( void );

INDEX getCurrSystemID( void );
CTEXTSTR getCurrSystemID( void );

PSQL_PASSWORD GetButtonSecurity( uintptr_t button, int bCreate );

Expand Down
2 changes: 1 addition & 1 deletion src/InterShell.stable/security.sql/password_frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -4022,7 +4022,7 @@ TEXTSTR getCurrentUser( void )

//--------------------------------------------------------------------------------
// Returns Current User if there is one
INDEX getCurrSystemID( void )
CTEXTSTR getCurrSystemID( void )
{
return g.system_id;
}
Expand Down
2 changes: 1 addition & 1 deletion src/InterShell.stable/security.sql/sql_password.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ static uintptr_t TestSecurityContext( "SQL Password" )( uintptr_t button )
if( pls && pls->nTokens )
{
struct password_info *pi;
pi = PromptForPassword( &g.current_user, &g.current_user_login_id, NULL, pls->pTokens, pls->nTokens, pls );
pi = PromptForPassword( &g.current_user, &g.current_user_login_id, NULL, (char const**)pls->pTokens, pls->nTokens, pls );
if( !pi || pi->login_id == INVALID_INDEX )
return INVALID_INDEX;

Expand Down
5 changes: 3 additions & 2 deletions src/InterShell.stable/video_player/vplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ static uintptr_t OnCreateMenuButton( "Video Playlist Manager/Test" )( PMENU_BUTT
}


void CPROC AddFile( uintptr_t psv, CTEXTSTR name, int flags )
void CPROC AddFile( uintptr_t psv, CTEXTSTR name, enum ScanFileProcessFlags flags )
{
if( ( StrCaseCmp( name, "PlayList.m3u" ) == 0 )
||( StrCaseCmp( name, "PlayTest.m3u" ) == 0 )
Expand Down Expand Up @@ -711,7 +711,7 @@ static void copy( CTEXTSTR src, CTEXTSTR dst )
SetFileWriteTime( dst, filetime );
}

static void CPROC AcceptFile( PSI_CONTROL pc, CTEXTSTR file, int32_t x, int32_t y )
static LOGICAL CPROC AcceptFile( PSI_CONTROL pc, CTEXTSTR file, int32_t x, int32_t y )
{
if( !l.base_video_path )
{
Expand Down Expand Up @@ -750,6 +750,7 @@ static void CPROC AcceptFile( PSI_CONTROL pc, CTEXTSTR file, int32_t x, int32_t
RefillListbox( list );
}
}
return TRUE;
}

static uintptr_t OnCreateMenuButton( "Video Playlist Manager/Accept Files" )( PMENU_BUTTON button )
Expand Down
4 changes: 2 additions & 2 deletions src/netlib/ping/ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#include <network.h>


void PingResult( PSOCKADDR dwIP, CTEXTSTR name
void PingResult( SOCKADDR* dwIP, CTEXTSTR name
, int min, int max, int avg
, int drop, int hops )
{
if( dwIP ) { // else was a timeout.
CTEXTSTR str = AddrToString( name, dwIP );
CTEXTSTR str = GetAddrString( dwIP );
printf( "Result: %25s(%12s) %d %d %d\n", name, str
, min, max, avg );
FreeAddrString( str );
Expand Down
4 changes: 2 additions & 2 deletions src/netlib/scan/pinger.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
#include <network.h>


void PingResult( uint32_t dwIP, CTEXTSTR name
void PingResult( SOCKADDR* dwIP, CTEXTSTR name
, int min, int max, int avg
, int drop, int hops )
{
if( dwIP ) // else was a timeout.
printf( "Result: %25s(%12s) %d %d %d\n", name, inet_ntoa( *(struct in_addr*)&dwIP )
printf( "Result: %25s(%12s) %d %d %d\n", name, GetAddrString( dwIP )
, min, max, avg );
}

Expand Down
4 changes: 4 additions & 0 deletions src/streamlib/ffmpeg/program/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ endif( NOT SACK_SDK_ROOT_PATH )


include( ${SACK_SDK_ROOT_PATH}/share/SACK/build/CMakePackage )

if( OFF )
if( __ANDROID__ )
INSTALL_SACK( lib )
else( __ANDROID__ )
INSTALL_SACK( bin )
endif( __ANDROID__ )
endif()

include_directories( ${SACK_INCLUDE_DIR} )
LINK_DIRECTORIES( ${SACK_LIBRARY_DIR} )

Expand Down
3 changes: 2 additions & 1 deletion src/streamlib/ffmpeg/program/ffmpeg.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <stdhdrs.h>
#include <filesys.h>


// have to include this first to setup common image and render interface defines...
Expand Down Expand Up @@ -206,8 +207,8 @@ static struct my_button * PlayVideo( CTEXTSTR name )
params.media = me;

me->file = ffmpeg_LoadFile( name, GetDisplay, (uintptr_t)&params
, NULL, 0
, NULL
, NULL, 0
, VideoEndedCallback, (uintptr_t)me
, VideoPlayError );
if( me->file )
Expand Down
3 changes: 2 additions & 1 deletion src/utils/factorio/rail_slicer/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,11 @@ static void drawImages( Image dest, int drawpart, int rem, int hr, int xofs, int
}
}

static void CPROC MyDraw( uintptr_t psv, PRENDERER r ) {
static int CPROC MyDraw( uintptr_t psv, PRENDERER r ) {
Image surface = GetDisplayImage( r );
drawImages( surface, 0, 1, 0, 0, 0 );
UpdateDisplay(r);
return 1;
}


Expand Down
2 changes: 1 addition & 1 deletion src/utils/image_chopper/image_chopper.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ static struct {
PIMAGE_INTERFACE pii;
} l;

void CPROC Process( uintptr_t psvUser, CTEXTSTR file, int flags )
void CPROC Process( uintptr_t psvUser, CTEXTSTR file, enum ScanFileProcessFlags flags )
{
TEXTCHAR buf[256];
TEXTSTR dup = StrDup( file );
Expand Down
2 changes: 1 addition & 1 deletion src/utils/linux_ban_scanner/arp_scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static void add_router( CTEXTSTR addr, CTEXTSTR router )
{
struct address_minmax *router_mm;
if( !lbs.addressTree )
lbs.addressTree = CreateBinaryTreeEx( StrCmp, NULL );
lbs.addressTree = CreateBinaryTreeEx( (GenericCompare)StrCmp, NULL );
router_mm = FindInBinaryTree( lbs.addressTree, (uintptr_t)router );
if( !router_mm ) {
router_mm = New( struct address_minmax );
Expand Down
4 changes: 2 additions & 2 deletions src/utils/linux_ban_scanner/syslog_scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ static void AddBan( const char *IP )
{
if( lbs.db ) {
static char query[256];
TEXTSTR* result = NULL;
TEXTSTR result = NULL;
snprintf( query, 256, "select id from banlist where IP=`%s`", IP );
if( SQLQuery( lbs.db, query, &result ) ) {
if( SQLQuery( lbs.db, query, (char const **)&result ) ) {
if( result && result[0] ) {
SQLEndQuery( lbs.db );
printf( "already banned %s\n", IP );
Expand Down
2 changes: 1 addition & 1 deletion src/utils/strip/strip.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ TEXTCHAR linebuffer[1024 * 64];
#define KEEP_CASE TRUE
#endif

void CPROC process( uintptr_t psv, CTEXTSTR file, int flags )
void CPROC process( uintptr_t psv, CTEXTSTR file, enum ScanFileProcessFlags flags )
{
static int count; // used for fix_double processing.
TEXTCHAR outfile[256];
Expand Down

0 comments on commit dcc099e

Please sign in to comment.