diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-08-03 00:05:55 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-08-03 00:05:55 +0000 |
commit | 99f4f90e4ec70ef21b619faf144649e7e442fdd1 (patch) | |
tree | f3bca115d300a6d04b3cff6894749453e59cfc15 /usr.bin/cvs | |
parent | df0e75e486d9a9a3bd3475447567a868cf8755cb (diff) |
Add a per-root mask of supported requests and a set of macros to set, get
and clear the appropriate bits for each request
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/cvs.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/cvs/cvs.h b/usr.bin/cvs/cvs.h index ed621c3064c..5db341c1d22 100644 --- a/usr.bin/cvs/cvs.h +++ b/usr.bin/cvs/cvs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.h,v 1.19 2004/08/02 22:45:57 jfb Exp $ */ +/* $OpenBSD: cvs.h,v 1.20 2004/08/03 00:05:54 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -143,8 +143,14 @@ struct cvsroot { FILE *cr_srvin; FILE *cr_srvout; char *cr_version; /* version of remote server */ + u_char cr_vrmask[10]; /* mask of valid requests supported by server */ }; +#define CVS_SETVR(rt, rq) (rt)->cr_vrmask[(rq) / 8] |= (1 << ((rq) % 8)) +#define CVS_GETVR(rt, rq) (rt)->cr_vrmask[(rq) / 8] & (1 << ((rq) % 8)) +#define CVS_CLRVR(rt, rq) (rt)->cr_vrmask[(rq) / 8] &= ~(1 << ((rq) % 8)) +#define CVS_RSTVR(rt) memset((rt)->cr_vrmask, 0, sizeof((rt)->cr_vrmask)) + #define CVS_HIST_ADDED 'A' #define CVS_HIST_EXPORT 'E' |