1 //
2 //      aegis - project change supervisor
3 //      Copyright (C) 2002-2008, 2011, 2012 Peter Miller
4 //
5 //      This program is free software; you can redistribute it and/or modify
6 //      it under the terms of the GNU General Public License as published by
7 //      the Free Software Foundation; either version 3 of the License, or
8 //      (at your option) any later version.
9 //
10 //      This program is distributed in the hope that it will be useful,
11 //      but WITHOUT ANY WARRANTY; without even the implied warranty of
12 //      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 //      GNU General Public License for more details.
14 //
15 //      You should have received a copy of the GNU General Public License
16 //      along with this program. If not, see
17 //      <http://www.gnu.org/licenses/>.
18 //
19 
20 #include <aecomplete/complete/user.h>
21 #include <aecomplete/complete/user/reviewer.h>
22 #include <libaegis/project.h>
23 #include <libaegis/project/history.h>
24 
25 
26 static int
yes(project * pp,string_ty * name)27 yes(project *pp, string_ty *name)
28 {
29     return project_reviewer_query(pp, nstring(name));
30 }
31 
32 
33 complete_ty *
complete_user_reviewer(project * pp)34 complete_user_reviewer(project *pp)
35 {
36     return complete_user(pp, yes);
37 }
38 
39 
40 static int
no(project * pp,string_ty * name)41 no(project *pp, string_ty *name)
42 {
43     return !project_reviewer_query(pp, nstring(name));
44 }
45 
46 
47 complete_ty *
complete_user_reviewer_not(project * pp)48 complete_user_reviewer_not(project *pp)
49 {
50     return complete_user(pp, no);
51 }
52 
53 
54 // vim: set ts=8 sw=4 et :
55