From 56a2578988737fada97995a606b99f2cd87e52c7 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Wed, 13 Dec 2023 23:49:07 +0100 Subject: Moved definitions to a header file --- FICS/makerank.c | 16 +++------------- FICS/makerank.h | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 FICS/makerank.h (limited to 'FICS') diff --git a/FICS/makerank.c b/FICS/makerank.c index dc6ba7f..4bdba63 100644 --- a/FICS/makerank.c +++ b/FICS/makerank.c @@ -5,26 +5,16 @@ #include #include "config.h" +#include "makerank.h" #define COMPUTER_FILE DEFAULT_LISTS "/computer" #define MAX_LOGIN_NAME 21 -char *rnames[] = {"std", "blitz", "wild", "lightning"}; - -typedef struct _ratings { - int rating; - int num; -} ratings; - -typedef struct _Entry { - char name[MAX_LOGIN_NAME]; - ratings r[4]; - int computer; -} ENTRY; - ENTRY **list; ENTRY **sortme; +char *rnames[] = {"std", "blitz", "wild", "lightning"}; + static int GetPlayerInfo(char *fileName, ENTRY *e) { diff --git a/FICS/makerank.h b/FICS/makerank.h new file mode 100644 index 0000000..49fe563 --- /dev/null +++ b/FICS/makerank.h @@ -0,0 +1,15 @@ +#ifndef MAKERANK_H +#define MAKERANK_H + +typedef struct _Entry { + char name[MAX_LOGIN_NAME]; + int computer; + ratings r[4]; +} ENTRY; + +typedef struct _ratings { + int num; + int rating; +} ratings; + +#endif -- cgit v1.2.3