attrstack.h revision 285830
16073Salanb/*- 25116Smichaelm * Copyright (c) 2006, Maxime Henrion <mux@FreeBSD.org> 35116Smichaelm * All rights reserved. 45116Smichaelm * 55116Smichaelm * Redistribution and use in source and binary forms, with or without 65116Smichaelm * modification, are permitted provided that the following conditions 75116Smichaelm * are met: 85116Smichaelm * 1. Redistributions of source code must retain the above copyright 95116Smichaelm * notice, this list of conditions and the following disclaimer. 105116Smichaelm * 2. Redistributions in binary form must reproduce the above copyright 115116Smichaelm * notice, this list of conditions and the following disclaimer in the 125116Smichaelm * documentation and/or other materials provided with the distribution. 135116Smichaelm * 145116Smichaelm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 155116Smichaelm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 165116Smichaelm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 175116Smichaelm * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 185116Smichaelm * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 195116Smichaelm * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 205116Smichaelm * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 215116Smichaelm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 225116Smichaelm * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 235116Smichaelm * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 245116Smichaelm * SUCH DAMAGE. 25 * 26 * $Id$ 27 */ 28#ifndef _ATTRSTACK_H_ 29#define _ATTRSTACK_H_ 30 31struct fattr; 32struct attrstack; 33 34struct attrstack *attrstack_new(void); 35void attrstack_push(struct attrstack *, struct fattr *); 36struct fattr *attrstack_pop(struct attrstack *); 37size_t attrstack_size(struct attrstack *); 38void attrstack_free(struct attrstack *); 39 40#endif /* !_ATTRSTACK_H_ */ 41