pathcomp.h revision 204556
1119381Sjake/*-
2146480Smarius * Copyright (c) 2006, Maxime Henrion <mux@FreeBSD.org>
3146480Smarius * All rights reserved.
4146480Smarius *
5146480Smarius * Redistribution and use in source and binary forms, with or without
6146480Smarius * modification, are permitted provided that the following conditions
7146480Smarius * are met:
8146480Smarius * 1. Redistributions of source code must retain the above copyright
9146480Smarius *    notice, this list of conditions and the following disclaimer.
10146480Smarius * 2. Redistributions in binary form must reproduce the above copyright
11146480Smarius *    notice, this list of conditions and the following disclaimer in the
12146480Smarius *    documentation and/or other materials provided with the distribution.
13146480Smarius *
14146480Smarius * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15146480Smarius * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16146480Smarius * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17146480Smarius * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18146480Smarius * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19146480Smarius * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20146480Smarius * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21146480Smarius * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22146480Smarius * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23146480Smarius * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24119381Sjake * SUCH DAMAGE.
25119381Sjake *
26119381Sjake * $FreeBSD: head/usr.bin/csup/pathcomp.h 204556 2010-03-02 07:26:07Z lulf $
27119381Sjake */
28119381Sjake#ifndef _PATHCOMP_H
29119381Sjake#define _PATHCOMP_H
30119381Sjake
31119381Sjake/* File types */
32119381Sjake#define	PC_DIRDOWN	0
33119381Sjake#define	PC_FILE		1
34119381Sjake#define	PC_DIRUP	2
35119381Sjake
36119381Sjakestruct pathcomp;
37119381Sjake
38119381Sjakestruct pathcomp	*pathcomp_new(void);
39119381Sjakeint		 pathcomp_put(struct pathcomp *, int, char *);
40119381Sjakeint		 pathcomp_get(struct pathcomp *, int *, char **);
41119381Sjakevoid		 pathcomp_finish(struct pathcomp *);
42119381Sjakevoid		 pathcomp_free(struct pathcomp *);
43119381Sjake
44119381Sjake#endif /* !_PATHCOMP_H */
45119381Sjake