diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2009-03-30 21:45:34 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2009-03-30 21:45:34 +0000 |
commit | 0e69b6f966b9a97a7bfd80ab8e6cf53fc9760996 (patch) | |
tree | f942143e9c61e381150d2939ae1b3d3f4bfd5633 /usr.bin/cvs/rcs.c | |
parent | 8df53a55f4bb3649ebde7c0c46641f6234a29d73 (diff) |
kill rp_lines, we do not need it when parsing an RCS file.
incendently, commit made using opencvs entirely.
with permission from deraadt@
Diffstat (limited to 'usr.bin/cvs/rcs.c')
-rw-r--r-- | usr.bin/cvs/rcs.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index cd35fbb31f3..da57a21878c 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.288 2009/03/25 21:23:17 joris Exp $ */ +/* $OpenBSD: rcs.c,v 1.289 2009/03/30 21:45:33 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -80,8 +80,6 @@ /* opaque parse data */ struct rcs_pdata { - u_int rp_lines; - char *rp_buf; size_t rp_blen; char *rp_bufend; @@ -1652,7 +1650,6 @@ rcs_parse_init(RCSFILE *rfp) pdp = xcalloc(1, sizeof(*pdp)); - pdp->rp_lines = 0; pdp->rp_pttype = RCS_TOK_ERR; if ((pdp->rp_file = fdopen(rfp->fd, "r")) == NULL) @@ -2330,8 +2327,6 @@ rcs_gettok(RCSFILE *rfp) /* XXX we must skip backspace too for compatibility, should we? */ do { ch = getc(pdp->rp_file); - if (ch == '\n') - pdp->rp_lines++; } while (isspace(ch)); if (ch == EOF) { @@ -2386,8 +2381,7 @@ rcs_gettok(RCSFILE *rfp) ungetc(ch, pdp->rp_file); break; } - } else if (ch == '\n') - pdp->rp_lines++; + } *(bp++) = ch; pdp->rp_tlen++; |