jcs's openbsd hax
openbsd
1/* $OpenBSD: trigger.h,v 1.2 2008/06/10 05:29:14 xsa Exp $ */
2/*
3 * Copyright (c) 2008 Tobias Stoeckmann <tobias@openbsd.org>
4 * Copyright (c) 2008 Jonathan Armani <dbd@asystant.net>
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19#define CVS_TRIGGER_COMMITINFO 1
20#define CVS_TRIGGER_LOGINFO 2
21#define CVS_TRIGGER_VERIFYMSG 3
22#define CVS_TRIGGER_RCSINFO 4
23#define CVS_TRIGGER_EDITINFO 5
24#define CVS_TRIGGER_TAGINFO 6
25
26struct trigger_line {
27 char *line;
28 TAILQ_ENTRY(trigger_line) flist;
29};
30
31TAILQ_HEAD(trigger_list, trigger_line);
32
33struct file_info {
34 char *file_path;
35 char *file_wd;
36 char *crevstr;
37 char *nrevstr;
38 char *tag_new;
39 char *tag_old;
40 char *tag_op;
41 char tag_type;
42 TAILQ_ENTRY(file_info) flist;
43};
44
45TAILQ_HEAD(file_info_list, file_info);
46
47int cvs_trigger_handle(int, char *, char *,
48 struct trigger_list *, struct file_info_list *);
49struct trigger_list *cvs_trigger_getlines(char *, char *);
50void cvs_trigger_freelist(struct trigger_list *);
51void cvs_trigger_freeinfo(struct file_info_list *);
52void cvs_trigger_loginfo_header(BUF *, char *);