-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcvstool.x
112 lines (98 loc) · 2.61 KB
/
cvstool.x
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
/***********************************************
* General cvstool defines
***********************************************/
const CVSTOOL_PATHLEN = 1024;
const CVSTOOL_NAMELEN = 255;
const CVSTOOL_MAXENT = 256;
const CVSTOOL_MAXVER = 64;
const CVSTOOL_VERLEN = 16;
const CVSTOOL_DATELEN = 32;
const CVSTOOL_TAGLEN = 32;
/***********************************************
* Status codes for responses
***********************************************/
enum cvstool_status {
CVSTOOL_OK = 0,
CVSTOOL_NOENT = 1,
CVSTOOL_NOEOF = 2,
CVSTOOL_CVSERR = 3,
CVSTOOL_OPT_MISMATCH = 4,
CVSTOOL_FTYPE_MISMATCH = 5,
CVSTOOL_NOVER = 6,
CVSTOOL_NOTAG = 7
};
/***********************************************
* Basic datatypes
***********************************************/
typedef string cvstool_path<CVSTOOL_PATHLEN>;
typedef string cvstool_name<CVSTOOL_NAMELEN>;
typedef string cvstool_ver<CVSTOOL_VERLEN>;
typedef string cvstool_date<CVSTOOL_DATELEN>;
typedef string cvstool_tag<CVSTOOL_TAGLEN>;
/*
* Options for the 'ls' command
*/
const CVSTOOL_LS_LONG = 0x00000001;
const CVSTOOL_LS_DIRECTORY = 0x00000002;
struct cvstool_ls_args {
cvstool_path path;
unsigned int options;
int num_resp;
};
struct cvstool_ver_info {
cvstool_ver ver;
cvstool_name author;
cvstool_date date;
cvstool_tag tag;
cvstool_ver_info *next;
};
struct cvstool_dirent {
cvstool_name name;
cvstool_ver_info ver_info;
cvstool_dirent *next;
};
struct cvstool_ls_resp {
int num_resp;
cvstool_dirent *dirents;
cvstool_status status;
int eof;
};
/*
* Options for the 'lsver' command
*/
const CVSTOOL_LSVER_LONG = 0x00000001;
const CVSTOOL_LSVER_FROM = 0x00000002;
const CVSTOOL_LSVER_PRE = 0x00000004;
struct cvstool_lsver_args {
cvstool_path path;
cvstool_ver from_ver;
unsigned int options;
int num_resp;
};
struct cvstool_lsver_resp {
int num_resp;
cvstool_ver_info *vers;
cvstool_status status;
};
/*
* Options for the 'update command
*/
const CVSTOOL_UPDATE_DYNAMIC = 0x00000001;
const CVSTOOL_UPDATE_VER = 0x00000002;
const CVSTOOL_UPDATE_TAG = 0x00000004;
struct cvstool_update_args {
cvstool_path path;
cvstool_ver ver;
cvstool_tag tag;
unsigned int options;
};
struct cvstool_update_resp {
cvstool_status status;
};
program CVSTOOL_PROGRAM {
version CVSTOOL_VERSION {
cvstool_ls_resp CVSTOOL_LS(cvstool_ls_args) = 1;
cvstool_lsver_resp CVSTOOL_LSVER(cvstool_lsver_args) = 2;
cvstool_update_resp CVSTOOL_UPDATE(cvstool_update_args) = 3;
} = 1;
} = 0x3315563;