From: Byrial Jensen Date: Mon, 19 Dec 2011 10:11:34 +0000 (+0100) Subject: Definition of TimeMark moved from 3 c files to backend.h X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=11853992ab85732d1ed848a2d3891f4ab4355c8e;p=xboard.git Definition of TimeMark moved from 3 c files to backend.h --- diff --git a/backend.c b/backend.c index ba7f512..935b9a0 100644 --- a/backend.c +++ b/backend.c @@ -147,12 +147,6 @@ extern int gettimeofday(struct timeval *, struct timezone *); #endif -/* A point in time */ -typedef struct { - long sec; /* Assuming this is >= 32 bits */ - int ms; /* Assuming this is >= 16 bits */ -} TimeMark; - int establish P((void)); void read_from_player P((InputSourceRef isr, VOIDSTAR closure, char *buf, int count, int error)); @@ -210,8 +204,6 @@ void CopyPlayerNameIntoFileName P((char **, char *)); char *SavePart P((char *)); int SaveGameOldStyle P((FILE *)); int SaveGamePGN P((FILE *)); -void GetTimeMark P((TimeMark *)); -long SubtractTimeMarks P((TimeMark *, TimeMark *)); int CheckFlags P((void)); long NextTickLength P((long)); void CheckTimeControl P((void)); diff --git a/backend.h b/backend.h index b93f81c..d74378e 100644 --- a/backend.h +++ b/backend.h @@ -441,4 +441,13 @@ void MoveHistorySet P(( char movelist[][2*MOVE_LEN], int first, int last, int cu void EvalGraphSet P(( int first, int last, int current, ChessProgramStats_Move * pvInfo )); void MakeEngineOutputTitle P((void)); +/* A point in time */ +typedef struct { + long sec; /* Assuming this is >= 32 bits */ + int ms; /* Assuming this is >= 16 bits */ +} TimeMark; + +void GetTimeMark P((TimeMark *)); +long SubtractTimeMarks P((TimeMark *, TimeMark *)); + #endif /* _BACKEND */ diff --git a/gamelist.c b/gamelist.c index 188fdf6..9cb3a58 100644 --- a/gamelist.c +++ b/gamelist.c @@ -217,10 +217,9 @@ int GameListBuild(f) int error, scratch=100, plyNr=0, fromX, fromY, toX, toY; int offset; char lastComment[MSG_SIZ], buf[MSG_SIZ]; -struct { - long sec; /* Assuming this is >= 32 bits */ - int ms; /* Assuming this is >= 16 bits */ -} t,t2; GetTimeMark(&t); + TimeMark t, t2; + + GetTimeMark(&t); GameListFree(&gameList); yynewfile(f); gameNumber = 0; diff --git a/xgamelist.c b/xgamelist.c index 9784bf7..95ce188 100644 --- a/xgamelist.c +++ b/xgamelist.c @@ -335,11 +335,9 @@ GameListPrepare(int byPos) int nstrings; ListGame *lg; char **st, *line; -struct { - long sec; /* Assuming this is >= 32 bits */ - int ms; /* Assuming this is >= 16 bits */ -} t,t2; GetTimeMark(&t); + TimeMark t, t2; + GetTimeMark(&t); if(st = glc->strings) while(*st) free(*st++); nstrings = ((ListGame *) gameList.tailPred)->number; glc->strings = (char **) malloc((nstrings + 1) * sizeof(char *));