diff options
author | peter <peter@FreeBSD.org> | 1996-08-20 23:46:10 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-08-20 23:46:10 +0000 |
commit | 8982e501c77217c860f79bba431f46a62b607a21 (patch) | |
tree | 70187fdf5be4cbefd0baf46bddac7e5e32c13c24 /contrib/cvs/src/watch.h | |
parent | 01ee40fd6a76f6ff7ef247fc1b2cf6e337f216c5 (diff) | |
download | FreeBSD-src-8982e501c77217c860f79bba431f46a62b607a21.zip FreeBSD-src-8982e501c77217c860f79bba431f46a62b607a21.tar.gz |
Import of slightly trimmed cvs-1.8 distribution. Generated files
and non-unix code has been left out.
Diffstat (limited to 'contrib/cvs/src/watch.h')
-rw-r--r-- | contrib/cvs/src/watch.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/contrib/cvs/src/watch.h b/contrib/cvs/src/watch.h new file mode 100644 index 0000000..d279c71 --- /dev/null +++ b/contrib/cvs/src/watch.h @@ -0,0 +1,56 @@ +/* Interface to "cvs watch add", "cvs watchers", and related features + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +extern const char *const watch_usage[]; + +/* Flags to pass between the various functions making up the + add/remove code. All in a single structure in case there is some + need to make the code reentrant some day. */ + +struct addremove_args { + /* A flag for each watcher type. */ + int edit; + int unedit; + int commit; + + /* Are we adding or removing (non-temporary) edit,unedit,and/or commit + watches? */ + int adding; + + /* Should we add a temporary edit watch? */ + int add_tedit; + /* Should we add a temporary unedit watch? */ + int add_tunedit; + /* Should we add a temporary commit watch? */ + int add_tcommit; + + /* Should we remove all temporary watches? */ + int remove_temp; + + /* Should we set the default? This is here for passing among various + routines in watch.c (a good place for it if there is ever any reason + to make the stuff reentrant), not for watch_modify_watchers. */ + int setting_default; +}; + +/* Modify the watchers for FILE. *WHAT tells what to do to them. + If FILE is NULL, modify default args (WHAT->SETTING_DEFAULT is + not used). */ +extern void watch_modify_watchers PROTO ((char *file, + struct addremove_args *what)); + +extern int watch_add PROTO ((int argc, char **argv)); +extern int watch_remove PROTO ((int argc, char **argv)); |