PageRenderTime 19ms CodeModel.GetById 16ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/contrib/cvs/src/watch.h

https://bitbucket.org/freebsd/freebsd-head/
C++ Header | 52 lines | 16 code | 9 blank | 27 comment | 0 complexity | 2fe4a8a2a0728f003e112c7d117e8ef9 MD5 | raw file
 1/* Interface to "cvs watch add", "cvs watchers", and related features
 2
 3   This program is free software; you can redistribute it and/or modify
 4   it under the terms of the GNU General Public License as published by
 5   the Free Software Foundation; either version 2, or (at your option)
 6   any later version.
 7
 8   This program is distributed in the hope that it will be useful,
 9   but WITHOUT ANY WARRANTY; without even the implied warranty of
10   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11   GNU General Public License for more details.  */
12
13extern const char *const watch_usage[];
14
15/* Flags to pass between the various functions making up the
16   add/remove code.  All in a single structure in case there is some
17   need to make the code reentrant some day.  */
18
19struct addremove_args {
20    /* A flag for each watcher type.  */
21    int edit;
22    int unedit;
23    int commit;
24
25    /* Are we adding or removing (non-temporary) edit,unedit,and/or commit
26       watches?  */
27    int adding;
28
29    /* Should we add a temporary edit watch?  */
30    int add_tedit;
31    /* Should we add a temporary unedit watch?  */
32    int add_tunedit;
33    /* Should we add a temporary commit watch?  */
34    int add_tcommit;
35
36    /* Should we remove all temporary watches?  */
37    int remove_temp;
38
39    /* Should we set the default?  This is here for passing among various
40       routines in watch.c (a good place for it if there is ever any reason
41       to make the stuff reentrant), not for watch_modify_watchers.  */
42    int setting_default;
43};
44
45/* Modify the watchers for FILE.  *WHAT tells what to do to them.
46   If FILE is NULL, modify default args (WHAT->SETTING_DEFAULT is
47   not used).  */
48extern void watch_modify_watchers PROTO ((const char *file,
49					  struct addremove_args *what));
50
51extern int watch_add PROTO ((int argc, char **argv));
52extern int watch_remove PROTO ((int argc, char **argv));