fixed server compile errors
authorhgn <hgodden00@gmail.com>
Fri, 14 Jul 2023 16:41:12 +0000 (17:41 +0100)
committerhgn <hgodden00@gmail.com>
Fri, 14 Jul 2023 16:41:12 +0000 (17:41 +0100)
highscores.h
server.c

index c94087fbff07bef56d2baee46f83320660e401f2..1b9d75cc93dfd38e6a735524905be524c26e9c8c 100644 (file)
@@ -101,5 +101,12 @@ highscore_system;
 VG_STATIC int highscore_intr( char *buf, int value, int len, char alt );
 VG_STATIC int highscore_intl( char *buf, int value, int len );
 VG_STATIC void highscores_board_printf( FILE *fp, const char *buf, u32 count );
+VG_STATIC aatree_ptr highscore_set_user_nickname( u64 steamid, char nick[16] );
+VG_STATIC aatree_ptr highscores_push_record( highscore_record *record );
+VG_STATIC void highscores_board_generate( char *buf, u32 id, u32 count );
+VG_STATIC void highscores_init( u32 pool_size, u32 playerinfo_pool_size );
+VG_STATIC int highscores_read(void);
+VG_STATIC void highscores_create_db(void);
+VG_STATIC int highscores_serialize_all(void);
 
 #endif /* HIGHSCORES_H */
index 3a0d666b4416380a0d236823b22b97e7a2a1c812..a441573745ecf6ce5896d32eb78d9d6015e2256b 100644 (file)
--- a/server.c
+++ b/server.c
@@ -15,8 +15,7 @@
 
 volatile sig_atomic_t sig_stop;
 
-void inthandler( int signum ) 
-{
+static void inthandler( int signum ) {
    sig_stop = 1;
 }
 
@@ -29,6 +28,9 @@ void inthandler( int signum )
 #include "network_msg.h"
 #include "highscores.h"
 
+/* implementation */
+#include "highscores.c"
+
 static const u64 k_connection_unauthorized = 0xffffffffffffffff;
 
 static void  *hSteamHTTP,