diff options
-rw-r--r-- | usr.bin/cvs/cvs.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/cvs.h | 22 | ||||
-rw-r--r-- | usr.bin/cvs/cvs/Makefile | 11 |
3 files changed, 22 insertions, 17 deletions
diff --git a/usr.bin/cvs/cvs.c b/usr.bin/cvs/cvs.c index 2ba1898b09f..ac20d6d6782 100644 --- a/usr.bin/cvs/cvs.c +++ b/usr.bin/cvs/cvs.c @@ -1,5 +1,5 @@ #define DEBUG -/* $OpenBSD: cvs.c,v 1.3 2004/07/14 19:26:07 jfb Exp $ */ +/* $OpenBSD: cvs.c,v 1.4 2004/07/26 15:56:42 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -101,13 +101,13 @@ static struct cvs_cmd { "Show last revision where each line was modified", }, { - "checkout", { "co", "get" }, NULL, + "checkout", { "co", "get" }, cvs_checkout, "", "Checkout sources for editing", }, { "commit", { "ci", "com" }, cvs_commit, - "", + "[-flR] [-F logfile | -m msg] [-r rev] ...", "Check files into the repository", }, { diff --git a/usr.bin/cvs/cvs.h b/usr.bin/cvs/cvs.h index 0233f7fe2c4..9bab20ff59a 100644 --- a/usr.bin/cvs/cvs.h +++ b/usr.bin/cvs/cvs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.h,v 1.8 2004/07/25 03:18:53 jfb Exp $ */ +/* $OpenBSD: cvs.h,v 1.9 2004/07/26 15:56:43 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -29,6 +29,8 @@ #include <sys/param.h> #include <stdio.h> +#include <dirent.h> + #include "rcs.h" #define CVS_VERSION "OpenCVS 0.1" @@ -265,7 +267,7 @@ struct cvsroot { #define CVS_FST_REMOVED 4 #define CVS_FST_CONFLICT 5 -struct cvs_file { +typedef struct cvs_file { char *cf_path; struct cvs_file *cf_parent; /* parent directory (NULL if none) */ char *cf_name; @@ -275,7 +277,7 @@ struct cvs_file { struct cvs_dir *cf_ddat; /* only for directories */ LIST_ENTRY(cvs_file) cf_list; -}; +} CVSFILE; struct cvs_dir { @@ -351,6 +353,7 @@ typedef struct cvs_histfile { /* client command handlers */ int cvs_add (int, char **); +int cvs_checkout (int, char **); int cvs_commit (int, char **); int cvs_diff (int, char **); int cvs_getlog (int, char **); @@ -396,12 +399,13 @@ struct cvsroot* cvsroot_get (const char *); /* from file.c */ -int cvs_file_init (void); -int cvs_file_ignore (const char *); -int cvs_file_isignored (const char *); -char** cvs_file_getv (const char *, int *, int); -struct cvs_file* cvs_file_get (const char *, int); -void cvs_file_free (struct cvs_file *); +int cvs_file_init (void); +int cvs_file_ignore (const char *); +int cvs_file_chkign (const char *); +char** cvs_file_getv (const char *, int *, int); +CVSFILE* cvs_file_get (const char *, int); +void cvs_file_free (struct cvs_file *); +int cvs_file_examine (CVSFILE *, int (*)(CVSFILE *, void *), void *); /* Entries API */ diff --git a/usr.bin/cvs/cvs/Makefile b/usr.bin/cvs/cvs/Makefile index b5d1f36f348..301b2a26ff9 100644 --- a/usr.bin/cvs/cvs/Makefile +++ b/usr.bin/cvs/cvs/Makefile @@ -1,16 +1,17 @@ -# $Id: Makefile,v 1.2 2004/07/14 03:33:09 jfb Exp $ +# $Id: Makefile,v 1.3 2004/07/26 15:56:43 jfb Exp $ .PATH: ${.CURDIR}/.. -PROG=ocvs +PROG=cvs BINDIR=/usr/bin BINOWN=root BINGRP=_cvsd BINMODE=2555 MAN=cvs.1 cvsrc.5 -SRCS= cvs.c add.c buf.c client.c commit.c diff.c entries.c file.c getlog.c \ - history.c hist.c init.c lock.c log.c proto.c rcs.c rcsnum.c root.c \ - server.c sock.c update.c util.c version.c +SRCS= cvs.c add.c buf.c client.c checkout.c commit.c diff.c entries.c file.c \ + getlog.c history.c hist.c init.c lock.c log.c proto.c rcs.c rcsnum.c \ + root.c server.c sock.c update.c util.c version.c + .include <bsd.prog.mk> |