version 1.81, 2014/10/10 08:15:25 |
version 1.82, 2015/01/16 06:40:11 |
|
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
*/ |
|
|
|
#include <sys/param.h> /* MAXBSIZE */ |
#include <sys/stat.h> |
#include <sys/stat.h> |
|
|
#include <ctype.h> |
#include <ctype.h> |
|
|
#include "rcsutil.h" |
#include "rcsutil.h" |
#include "xmalloc.h" |
#include "xmalloc.h" |
|
|
|
#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) |
|
|
/* invalid characters in RCS states */ |
/* invalid characters in RCS states */ |
static const char rcs_state_invch[] = RCS_STATE_INVALCHAR; |
static const char rcs_state_invch[] = RCS_STATE_INVALCHAR; |
|
|
|
|
/* XXX rcsnum_cmp() is totally broken for |
/* XXX rcsnum_cmp() is totally broken for |
* this purpose. |
* this purpose. |
*/ |
*/ |
numlen = MIN(brev->rn_len, |
numlen = MINIMUM(brev->rn_len, |
rb->rb_num->rn_len - 1); |
rb->rb_num->rn_len - 1); |
for (i = 0; i < numlen; i++) { |
for (i = 0; i < numlen; i++) { |
if (rb->rb_num->rn_id[i] != |
if (rb->rb_num->rn_id[i] != |
|
|
{ |
{ |
BUF *newbuf; |
BUF *newbuf; |
u_char *c, *kw, *fin; |
u_char *c, *kw, *fin; |
char buf[256], *tmpf, resolved[MAXPATHLEN], *rcsfile; |
char buf[256], *tmpf, resolved[PATH_MAX], *rcsfile; |
u_char *line, *line2; |
u_char *line, *line2; |
u_int i, j; |
u_int i, j; |
int kwtype; |
int kwtype; |