=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/commit.c,v retrieving revision 1.33 retrieving revision 1.34 diff -c -r1.33 -r1.34 *** src/usr.bin/cvs/commit.c 2005/05/20 20:00:53 1.33 --- src/usr.bin/cvs/commit.c 2005/05/24 04:12:25 1.34 *************** *** 1,4 **** ! /* $OpenBSD: commit.c,v 1.33 2005/05/20 20:00:53 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: commit.c,v 1.34 2005/05/24 04:12:25 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 41,82 **** #include "proto.h" ! int cvs_commit_prepare(CVSFILE *, void *); ! int cvs_commit_file(CVSFILE *, void *); ! int cvs_commit_options(char *, int, char **, int *); ! int cvs_commit_helper(void); ! struct cvs_cmd_info cvs_commit = { ! cvs_commit_options, NULL, cvs_commit_file, NULL, ! cvs_commit_helper, ! CF_RECURSE | CF_IGNORE | CF_SORT, ! CVS_REQ_CI, ! CVS_CMD_ALLOWSPEC | CVS_CMD_NEEDLOG | CVS_CMD_SENDDIR | CVS_CMD_SENDARGS2 }; static char *mfile = NULL; static char **commit_files = NULL; static int commit_fcount = 0; ! int ! cvs_commit_options(char *opt, int argc, char **argv, int *arg) { int ch; ! while ((ch = getopt(argc, argv, opt)) != -1) { switch (ch) { case 'F': mfile = optarg; break; case 'f': /* XXX half-implemented */ ! cvs_commit.file_flags &= ~CF_RECURSE; break; case 'l': ! cvs_commit.file_flags &= ~CF_RECURSE; break; case 'm': cvs_msg = strdup(optarg); --- 41,88 ---- #include "proto.h" ! static int cvs_commit_init (struct cvs_cmd *, int, char **, int *); ! static int cvs_commit_prepare (CVSFILE *, void *); ! static int cvs_commit_file (CVSFILE *, void *); ! static int cvs_commit_pre_exec(struct cvsroot *); ! struct cvs_cmd cvs_cmd_commit = { ! CVS_OP_COMMIT, CVS_REQ_CI, "commit", ! { "ci", "com" }, ! "Check files into the repository", ! "[-flR] [-F logfile | -m msg] [-r rev] ...", ! "F:flm:Rr:", NULL, + CF_RECURSE | CF_IGNORE | CF_SORT, + cvs_commit_init, + cvs_commit_pre_exec, cvs_commit_file, NULL, ! NULL, ! NULL, ! CVS_CMD_ALLOWSPEC | CVS_CMD_SENDARGS2 }; static char *mfile = NULL; static char **commit_files = NULL; static int commit_fcount = 0; ! static int ! cvs_commit_init(struct cvs_cmd *cmd, int argc, char **argv, int *arg) { int ch; ! while ((ch = getopt(argc, argv, cmd->cmd_opts)) != -1) { switch (ch) { case 'F': mfile = optarg; break; case 'f': /* XXX half-implemented */ ! cmd->file_flags &= ~CF_RECURSE; break; case 'l': ! cmd->file_flags &= ~CF_RECURSE; break; case 'm': cvs_msg = strdup(optarg); *************** *** 86,92 **** } break; case 'R': ! cvs_commit.file_flags |= CF_RECURSE; break; default: return (CVS_EX_USAGE); --- 92,98 ---- } break; case 'R': ! cmd->file_flags |= CF_RECURSE; break; default: return (CVS_EX_USAGE); *************** *** 110,116 **** } int ! cvs_commit_helper(void) { struct cvs_flist cl; CVSFILE *cfp; --- 116,122 ---- } int ! cvs_commit_pre_exec(struct cvsroot *root) { struct cvs_flist cl; CVSFILE *cfp;