117592Swosch/*-
217592Swosch * Copyright (c) 2003-2006, Maxime Henrion <mux@FreeBSD.org>
317849Swosch * All rights reserved.
417849Swosch *
517592Swosch * Redistribution and use in source and binary forms, with or without
617849Swosch * modification, are permitted provided that the following conditions
717849Swosch * are met:
817849Swosch * 1. Redistributions of source code must retain the above copyright
917849Swosch *    notice, this list of conditions and the following disclaimer.
1017849Swosch * 2. Redistributions in binary form must reproduce the above copyright
1117849Swosch *    notice, this list of conditions and the following disclaimer in the
1217849Swosch *    documentation and/or other materials provided with the distribution.
1317849Swosch *
1417849Swosch * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1517849Swosch * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1617849Swosch * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1717849Swosch * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1817849Swosch * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1917849Swosch * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2017849Swosch * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2117849Swosch * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2217849Swosch * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2317849Swosch * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2417849Swosch * SUCH DAMAGE.
2517849Swosch *
2617849Swosch * $FreeBSD$
2717592Swosch */
2817592Swosch#ifndef _KEYWORD_H_
2917592Swosch#define _KEYWORD_H_
3017592Swosch
3117592Swosch/* CVS expansion modes. */
3217592Swosch#define	EXPAND_DEFAULT		0
3350477Speter#define	EXPAND_KEYVALUE		1
3417592Swosch#define	EXPAND_KEYVALUELOCKER	2
3517592Swosch#define	EXPAND_KEY		3
3634312Swosch#define	EXPAND_OLD		4
3717592Swosch#define	EXPAND_BINARY		5
3817592Swosch#define	EXPAND_VALUE		6
3917592Swosch
4017592Swoschstruct diffinfo;
4117592Swoschstruct keyword;
4234313Swosch
4334313Swoschstruct keyword	*keyword_new(void);
4417592Swoschint		 keyword_decode_expand(const char *);
4517592Swoschconst char	*keyword_encode_expand(int);
4634312Swoschint		 keyword_alias(struct keyword *, const char *, const char *);
4734312Swoschint		 keyword_enable(struct keyword *, const char *);
4834312Swoschint		 keyword_disable(struct keyword *, const char *);
4934312Swoschvoid		 keyword_prepare(struct keyword *);
5017592Swoschint		 keyword_expand(struct keyword *, struct diffinfo *, char *,
5117592Swosch		     size_t, char **, size_t *);
5217592Swoschvoid		 keyword_free(struct keyword *);
5317592Swosch
5417592Swosch#endif /* !_KEYWORD_H_ */
5517592Swosch