1/* $OpenBSD: config.h,v 1.10 2008/03/02 11:58:45 joris Exp $ */ 2/* 3 * Copyright (c) 2006 Joris Vink <joris@openbsd.org> 4 * 5 * Permission to use, copy, modify, and distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 */ 17 18#ifndef CONFIG_H 19#define CONFIG_H 20 21void cvs_modules_list(void); 22 23void cvs_read_config(char *name, int (*cb)(char *, int)); 24 25void cvs_parse_configfile(void); 26void cvs_parse_modules(void); 27 28int config_parse_line(char *, int); 29int modules_parse_line(char *, int); 30 31#include <sys/queue.h> 32#include "file.h" 33 34/* module stuff */ 35 36#define MODULE_ALIAS 0x01 37#define MODULE_TARGETDIR 0x02 38#define MODULE_NORECURSE 0x04 39#define MODULE_RUN_ON_COMMIT 0x08 40#define MODULE_RUN_ON_CHECKOUT 0x10 41 42struct module_checkout { 43 char *mc_name; 44 char *mc_prog; 45 46 int mc_flags; 47 int mc_canfree; 48 49 struct cvs_flisthead mc_modules; 50 struct cvs_flisthead mc_ignores; 51}; 52 53struct module_info { 54 char *mi_name; 55 char *mi_prog; 56 char *mi_str; 57 int mi_flags; 58 59 struct cvs_flisthead mi_modules; 60 struct cvs_flisthead mi_ignores; 61 62 TAILQ_ENTRY(module_info) m_list; 63}; 64 65struct module_checkout *cvs_module_lookup(char *); 66#endif 67