-
Notifications
You must be signed in to change notification settings - Fork 0
/
cvs_cmds.h
57 lines (51 loc) · 1.79 KB
/
cvs_cmds.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
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include "vcfs.h"
#define CVSPORT 2401
#define CVS_BUFF_SIZE (64 * 1024)
/* A buffer to hold a response from the CVS server */
typedef struct cvs_buff {
char *data;
int size;
int cookie;
int limit;
} cvs_buff;
/* Information about the current CVS session */
typedef struct cvs_session {
char *module;
char *hostname;
char *root;
char *user;
char *password;
char *dir;
int sock;
bool use_gzip;
vcfs_tag tag;
} cvs_session;
#define CVS_READ_SIZE 8192
/* CVS buffer management */
cvs_buff *cvs_get_buff();
void cvs_free_buff(cvs_buff *b);
void cvs_ensure_buff(cvs_buff *b, int n);
char *scramble (char *str);
void cvs_init_session(char *hostname, char *root, char *module, char *user,
char *password, char *dir, bool use_gzip, char *tag);
int cvs_pserver_connect();
int cvs_send(int sock, char *msg);
int cvs_expand_modules(cvs_buff **resp);
int cvs_co(cvs_buff **resp, char *tag);
int cvs_buff_read_line(cvs_buff *b, char **line);
int cvs_ver_extended(char *name, vcfs_path *short_name, vcfs_ver *ver);
int cvs_get_file(vcfs_path name, char *ver, cvs_buff **resp);
int cvs_get_status(vcfs_path name, char *ver, cvs_buff **resp);
int cvs_get_log(vcfs_path name, cvs_buff **resp);
int cvs_get_log_info(cvs_buff *log_buff, char **ver,
char **date, char **author, char **msg);
int vcfs_read(char *buff, vcfs_fhdata *fh, int count, int offset);
int cvs_zlib_inflate_buffer(cvs_buff *input_buff, int in_size, int in_offset,
char *output, int out_size, int keep_data);
int cvs_get_status_tags(vcfs_ventry *v, cvs_buff **resp);