"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/frontend/common.h" between
gnuchess-6.2.4.tar.gz and gnuchess-6.2.5.tar.gz

About: GNU Chess is a chess-playing program.

common.h  (gnuchess-6.2.4):common.h  (gnuchess-6.2.5)
/* common.h /* common.h
GNU Chess frontend GNU Chess frontend
Copyright (C) 2001-2011 Free Software Foundation, Inc. Copyright (C) 2001-2017 Free Software Foundation, Inc.
GNU Chess is based on the two research programs GNU Chess is based on the two research programs
Cobalt by Chua Kong-Sian and Gazebo by Stuart Cracraft. Cobalt by Chua Kong-Sian and Gazebo by Stuart Cracraft.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
skipping to change at line 32 skipping to change at line 32
Contact Info: Contact Info:
bug-gnu-chess@gnu.org bug-gnu-chess@gnu.org
cracraft@ai.mit.edu, cracraft@stanfordalumni.org, cracraft@earthlink.net cracraft@ai.mit.edu, cracraft@stanfordalumni.org, cracraft@earthlink.net
*/ */
#ifndef COMMON_H #ifndef COMMON_H
#define COMMON_H #define COMMON_H
#include <config.h> #include <config.h>
#include <pthread.h>
#ifndef __GNUC__ #ifndef __GNUC__
# define __attribute__(x) # define __attribute__(x)
#endif #endif
/* /*
* Include "uint64_t" and similar types using the ac_need_stdint_h ac macro * Include "uint64_t" and similar types using the ac_need_stdint_h ac macro
*/ */
#include "GCint.h" #include "GCint.h"
skipping to change at line 341 skipping to change at line 342
extern float SearchTime; extern float SearchTime;
extern int MoveLimit[2]; extern int MoveLimit[2];
extern float TimeLimit[2]; extern float TimeLimit[2];
extern int TCMove; extern int TCMove;
extern int TCinc; extern int TCinc;
extern float TCTime; extern float TCTime;
extern int phase; extern int phase;
extern short bookfirstlast; extern short bookfirstlast;
extern short graphicmodeoutput; extern short graphicmodeoutput;
extern short coords;
extern short pgnloaded; /* was pgn game loaded by command pgnreplay */ extern short pgnloaded; /* was pgn game loaded by command pgnreplay */
extern int pgncnt; /* total moves loaded in pgn game */ extern int pgncnt; /* total moves loaded in pgn game */
extern int range[8]; extern int range[8];
extern int ptype[2]; extern int ptype[2];
extern char algbr[64][3]; extern char algbr[64][3];
extern char algbrfile[9]; extern char algbrfile[9];
extern char algbrrank[9]; extern char algbrrank[9];
extern char notation[8]; extern char notation[8];
extern char lnotation[8]; extern char lnotation[8];
skipping to change at line 464 skipping to change at line 466
void UpdateCBoard (void); void UpdateCBoard (void);
void UpdateMvboard (void); void UpdateMvboard (void);
short ValidateBoard (void); short ValidateBoard (void);
/* PGN routines */ /* PGN routines */
void PGNSaveToFile (const char *, const char *); void PGNSaveToFile (const char *, const char *);
void PGNReadFromFile (const char *, int showheading); void PGNReadFromFile (const char *, int showheading);
/* Some output routines */ /* Some output routines */
void ShowMoveList (int); void ShowMoveList (int);
void ShowSmallBoard (void);
void ShowBoard (void); void ShowBoard (void);
void ShowCBoard (void); void ShowCBoard (void);
void ShowMvboard (void); void ShowMvboard (void);
void ShowGame (void); void ShowGame (void);
void ShowTime (void); void ShowTime (void);
/* Solver routines */ /* Solver routines */
void Solve (char *); void Solve (char *);
/* Player database */ /* Player database */
void DBSortPlayer (const char *style); void DBSortPlayer (const char *style);
void DBListPlayer (const char *style); void DBListPlayer (const char *style);
void DBReadPlayer (void); void DBReadPlayer (void);
void DBWritePlayer (void); void DBWritePlayer (void);
int DBSearchPlayer (const char *player); int DBSearchPlayer (const char *player);
void DBUpdatePlayer (const char *player, const char *resultstr); void DBUpdatePlayer (const char *player, const char *resultstr);
/* Input thread and thread function */
extern pthread_t input_thread;
void *input_func(void *);
/*
* Status variable used by the input thread to signal
* pending input. Thought about using flags for this
* but this can be refined and is conceptually different
* from flags.
*/
enum {
INPUT_NONE,
INPUT_AVAILABLE
};
extern volatile int input_status;
/*
* Function to wake up the input thread, should be called after
* input has been parsed.
*/
void input_wakeup(void);
/* Wait for input. */
//void wait_for_input(void);
/*
* Input routine, initialized to one of the specific
* input routines. The given argument is the prompt.
*/
extern void (*get_line) (char *);
#define BUF_SIZE 4096 #define BUF_SIZE 4096
#define MAXSTR 128 #define MAXSTR 128
extern char inputstr[BUF_SIZE]; extern char inputstr[BUF_SIZE];
/* Input parser */ /* Input parser */
void parse_input(void); void parse_input(void);
/* Check Board to avoid analysis of incorrectly input positions */ /* Check Board to avoid analysis of incorrectly input positions */
void check_board(void); void check_board(void);
skipping to change at line 628 skipping to change at line 661
*/ */
void SetDataToEngine( const char data[] ); void SetDataToEngine( const char data[] );
/* /*
* Stores in a global flag variable whether an answer is expected from * Stores in a global flag variable whether an answer is expected from
* the engine (1) or not (0). * the engine (1) or not (0).
*/ */
void ExpectAnswerFromEngine( int ); void ExpectAnswerFromEngine( int );
/* /*
* If the prompt must be displayed on the standard output, according to
* the current state, it is displayed.
*/
void ShowPrompt( void );
/*
* Extracts a command from the user input buffer. * Extracts a command from the user input buffer.
*/ */
void NextUserCmd( void ); void NextUserCmd( void );
/* /*
* Extracts a command from the engine input buffer. * Extracts a command from the engine input buffer.
*/ */
void NextEngineCmd( void ); void NextEngineCmd( void );
/* /*
 End of changes. 6 change blocks. 
8 lines changed or deleted 35 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)