diff options
-rw-r--r-- | usr.bin/cvs/cmd.c | 18 | ||||
-rw-r--r-- | usr.bin/cvs/cvs.h | 4 | ||||
-rw-r--r-- | usr.bin/cvs/entries.c | 14 | ||||
-rw-r--r-- | usr.bin/cvs/util.c | 34 | ||||
-rw-r--r-- | usr.bin/cvs/util.h | 5 |
5 files changed, 5 insertions, 70 deletions
diff --git a/usr.bin/cvs/cmd.c b/usr.bin/cvs/cmd.c index d4cb3dffbd2..3d27aa004c3 100644 --- a/usr.bin/cvs/cmd.c +++ b/usr.bin/cvs/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.61 2007/06/27 20:27:38 xsa Exp $ */ +/* $OpenBSD: cmd.c,v 1.62 2007/09/04 19:07:03 tobias Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -88,19 +88,3 @@ cvs_findcmd(const char *cmd) return (cmdp); } - -struct cvs_cmd * -cvs_findcmdbyreq(u_int reqid) -{ - int i; - struct cvs_cmd *cmdp; - - cmdp = NULL; - for (i = 0; cvs_cdt[i] != NULL; i++) - if (cvs_cdt[i]->cmd_req == reqid) { - cmdp = cvs_cdt[i]; - break; - } - - return (cmdp); -} diff --git a/usr.bin/cvs/cvs.h b/usr.bin/cvs/cvs.h index 6a7dbd096f2..8c6d7d6742f 100644 --- a/usr.bin/cvs/cvs.h +++ b/usr.bin/cvs/cvs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.h,v 1.142 2007/08/30 11:19:29 joris Exp $ */ +/* $OpenBSD: cvs.h,v 1.143 2007/09/04 19:07:03 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -344,7 +344,6 @@ extern struct cvs_cmd cvs_cmd_watchers; /* cmd.c */ struct cvs_cmd *cvs_findcmd(const char *); -struct cvs_cmd *cvs_findcmdbyreq(u_int); /* cvs.c */ int cvs_var_set(const char *, const char *); @@ -363,7 +362,6 @@ void cvs_ent_add(CVSENTRIES *, const char *); void cvs_ent_remove(CVSENTRIES *, const char *); void cvs_ent_close(CVSENTRIES *, int); void cvs_ent_free(struct cvs_ent *); -int cvs_ent_exists(CVSENTRIES *, const char *); void cvs_parse_tagfile(char *, char **, char **, int *); void cvs_write_tagfile(const char *, char *, char *, int); diff --git a/usr.bin/cvs/entries.c b/usr.bin/cvs/entries.c index d13a3258c15..12b8bf92365 100644 --- a/usr.bin/cvs/entries.c +++ b/usr.bin/cvs/entries.c @@ -1,4 +1,4 @@ -/* $OpenBSD: entries.c,v 1.79 2007/07/03 13:22:42 joris Exp $ */ +/* $OpenBSD: entries.c,v 1.80 2007/09/04 19:07:04 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -202,18 +202,6 @@ cvs_ent_get(CVSENTRIES *ep, const char *name) return (ent); } -int -cvs_ent_exists(CVSENTRIES *ep, const char *name) -{ - struct cvs_ent_line *l; - - l = ent_get_line(ep, name); - if (l == NULL) - return (0); - - return (1); -} - void cvs_ent_close(CVSENTRIES *ep, int writefile) { diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c index fb42e0f0a5a..12a55fcbf1c 100644 --- a/usr.bin/cvs/util.c +++ b/usr.bin/cvs/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.114 2007/09/02 11:40:03 tobias Exp $ */ +/* $OpenBSD: util.c,v 1.115 2007/09/04 19:07:04 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org> @@ -703,38 +703,6 @@ cvs_freelines(struct cvs_lines *lines) xfree(lines); } -BUF * -cvs_patchfile(u_char *data, size_t dlen, u_char *patch, size_t plen, - int (*p)(struct cvs_lines *, struct cvs_lines *)) -{ - struct cvs_lines *dlines, *plines; - struct cvs_line *lp; - BUF *res; - - if ((dlines = cvs_splitlines(data, dlen)) == NULL) - return (NULL); - - if ((plines = cvs_splitlines(patch, plen)) == NULL) - return (NULL); - - if (p(dlines, plines) < 0) { - cvs_freelines(dlines); - cvs_freelines(plines); - return (NULL); - } - - res = cvs_buf_alloc(1024, BUF_AUTOEXT); - TAILQ_FOREACH(lp, &dlines->l_lines, l_list) { - if (lp->l_line == NULL) - continue; - cvs_buf_append(res, lp->l_line, lp->l_len); - } - - cvs_freelines(dlines); - cvs_freelines(plines); - return (res); -} - /* * cvs_strsplit() * diff --git a/usr.bin/cvs/util.h b/usr.bin/cvs/util.h index be3a0d0c85c..fb73a9e17d7 100644 --- a/usr.bin/cvs/util.h +++ b/usr.bin/cvs/util.h @@ -1,4 +1,4 @@ -/* $OpenBSD: util.h,v 1.20 2007/07/03 13:22:43 joris Exp $ */ +/* $OpenBSD: util.h,v 1.21 2007/09/04 19:07:04 tobias Exp $ */ /* * Copyright (c) 2006 Niall O'Higgins <niallo@openbsd.org> * All rights reserved. @@ -64,9 +64,6 @@ struct cvs_argvector { char **argv; }; -BUF *cvs_patchfile(u_char *, size_t, u_char *, - size_t, int (*p)(struct cvs_lines *, - struct cvs_lines *)); struct cvs_lines *cvs_splitlines(u_char *, size_t); void cvs_freelines(struct cvs_lines *); struct cvs_argvector *cvs_strsplit(char *, const char *); |