3 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
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; version 2 of the License.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 #include "pathconfig.h"
21 initModeManually(struct Arguments const UNUSED *args, int argc, char *argv[])
26 WRITE_MSG(2, "Odd number of (path,excludelist) arguments\n");
31 WRITE_MSG(2, "No reference path(s) given\n");
35 MatchList_initManually(&global_info.dst_list, 0, strdup(argv[0]), argv[1]);
38 global_info.src_lists.v = Emalloc(sizeof(struct MatchList) * count);
39 global_info.src_lists.l = count;
41 for (i=0; i<count; ++i)
42 MatchList_initManually(global_info.src_lists.v+i, 0,
43 strdup(argv[2 + i*2]), argv[3 + i*2]);
48 initModeVserver(struct Arguments const UNUSED *args, int argc, char *argv[])
50 struct MatchVserverInfo vserver = {
55 if (!MatchVserverInfo_init(&vserver)) {
56 WRITE_MSG(2, "Failed to initialize unification for this vserver\n");
61 WRITE_MSG(2, "More than one vserver is not supported\n");
65 if (!MatchList_initByVserver(&global_info.dst_list, &vserver)) {
66 WRITE_MSG(2, "unification not configured for this vserver\n");
70 MatchList_initRefserverList(&global_info.src_lists.v,
71 &global_info.src_lists.l,
74 MatchVserverInfo_free(&vserver);