diff options
author | Niall O'Higgins <niallo@cvs.openbsd.org> | 2007-01-11 17:44:19 +0000 |
---|---|---|
committer | Niall O'Higgins <niallo@cvs.openbsd.org> | 2007-01-11 17:44:19 +0000 |
commit | d85c0dc058186c85cfed44b898af95f7d7ec453d (patch) | |
tree | a7da1e2066182857b36823351e715a72d4a32795 /usr.bin/cvs/util.h | |
parent | 97a8f0e03dbb1ac15c84940d8f111ff4fedfe002 (diff) |
rework opencvs so that we can deal with binary files. previously we assumed all files were ascii,
which broke things in real-world usage. now a checkout of src should work, albeit using lots of
memory and cpu. fixing this is the next step.
testing by many.
ok & some input joris@
Diffstat (limited to 'usr.bin/cvs/util.h')
-rw-r--r-- | usr.bin/cvs/util.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/cvs/util.h b/usr.bin/cvs/util.h index c7e89dd859e..1441e6fce2b 100644 --- a/usr.bin/cvs/util.h +++ b/usr.bin/cvs/util.h @@ -1,4 +1,4 @@ -/* $OpenBSD: util.h,v 1.12 2007/01/07 01:53:12 joris Exp $ */ +/* $OpenBSD: util.h,v 1.13 2007/01/11 17:44:18 niallo Exp $ */ /* * Copyright (c) 2006 Niall O'Higgins <niallo@openbsd.org> * All rights reserved. @@ -50,6 +50,7 @@ u_int cvs_revision_select(RCSFILE *, char *); struct cvs_line { char *l_line; + size_t l_len; int l_lineno; TAILQ_ENTRY(cvs_line) l_list; }; @@ -58,7 +59,6 @@ TAILQ_HEAD(cvs_tqh, cvs_line); struct cvs_lines { int l_nblines; - char *l_data; struct cvs_tqh l_lines; }; @@ -67,9 +67,10 @@ struct cvs_argvector { char **argv; }; -BUF *cvs_patchfile(const char *, const char *, - int (*p)(struct cvs_lines *, struct cvs_lines *)); -struct cvs_lines *cvs_splitlines(const char *); +BUF *cvs_patchfile(const u_char *, size_t, const u_char *, + size_t, int (*p)(struct cvs_lines *, + struct cvs_lines *)); +struct cvs_lines *cvs_splitlines(const u_char *, size_t); void cvs_freelines(struct cvs_lines *); struct cvs_argvector *cvs_strsplit(char *, const char *); void cvs_argv_destroy(struct cvs_argvector *); |