This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chess.h
118 lines (98 loc) · 2.85 KB
/
chess.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*
* Please do not edit this file.
* It was generated using rpcgen.
*/
#ifndef _CHESS_H_RPCGEN
#define _CHESS_H_RPCGEN
#include <rpc/rpc.h>
#ifdef __cplusplus
extern "C" {
#endif
struct position {
int x;
int y;
};
typedef struct position position;
struct board {
int field[64];
};
typedef struct board board;
struct movefunc_arg {
position pos_old;
position pos_new;
char currentplayer;
board spielfeld;
};
typedef struct movefunc_arg movefunc_arg;
struct playerfunc_arg {
int func;
char currentplayer;
};
typedef struct playerfunc_arg playerfunc_arg;
struct boardfunc_arg {
int func;
board gameBoard;
};
typedef struct boardfunc_arg boardfunc_arg;
struct boardret_arg {
char ret;
board gameBoard;
};
typedef struct boardret_arg boardret_arg;
#define CHESS_PROG 0x20000008
#define CHESS_VERS 1
#if defined(__STDC__) || defined(__cplusplus)
#define MOVEPIECES 1
extern boardret_arg * movepieces_1(movefunc_arg *, CLIENT *);
extern boardret_arg * movepieces_1_svc(movefunc_arg *, struct svc_req *);
#define MANAGEBOARD 2
extern board * manageboard_1(boardfunc_arg *, CLIENT *);
extern board * manageboard_1_svc(boardfunc_arg *, struct svc_req *);
#define CURRENTPLAYER 3
extern char * currentplayer_1(playerfunc_arg *, CLIENT *);
extern char * currentplayer_1_svc(playerfunc_arg *, struct svc_req *);
#define MANAGEPLAYER 5
extern char * manageplayer_1(char *, CLIENT *);
extern char * manageplayer_1_svc(char *, struct svc_req *);
#define INITIALBOARD 6
extern board * initialboard_1(void *, CLIENT *);
extern board * initialboard_1_svc(void *, struct svc_req *);
extern int chess_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
#else /* K&R C */
#define MOVEPIECES 1
extern boardret_arg * movepieces_1();
extern boardret_arg * movepieces_1_svc();
#define MANAGEBOARD 2
extern board * manageboard_1();
extern board * manageboard_1_svc();
#define CURRENTPLAYER 3
extern char * currentplayer_1();
extern char * currentplayer_1_svc();
#define MANAGEPLAYER 5
extern char * manageplayer_1();
extern char * manageplayer_1_svc();
#define INITIALBOARD 6
extern board * initialboard_1();
extern board * initialboard_1_svc();
extern int chess_prog_1_freeresult ();
#endif /* K&R C */
/* the xdr functions */
#if defined(__STDC__) || defined(__cplusplus)
extern bool_t xdr_position (XDR *, position*);
extern bool_t xdr_board (XDR *, board*);
extern bool_t xdr_movefunc_arg (XDR *, movefunc_arg*);
extern bool_t xdr_playerfunc_arg (XDR *, playerfunc_arg*);
extern bool_t xdr_boardfunc_arg (XDR *, boardfunc_arg*);
extern bool_t xdr_boardret_arg (XDR *, boardret_arg*);
#else /* K&R C */
extern bool_t xdr_position ();
extern bool_t xdr_board ();
extern bool_t xdr_movefunc_arg ();
extern bool_t xdr_playerfunc_arg ();
extern bool_t xdr_boardfunc_arg ();
extern bool_t xdr_boardret_arg ();
#endif /* K&R C */
#ifdef __cplusplus
}
#endif
#endif /* !_CHESS_H_RPCGEN */