kgzip.h revision 50479
1254721Semaste/* 2254721Semaste * Copyright (c) 1999 Global Technology Associates, Inc. 3254721Semaste * All rights reserved. 4254721Semaste * 5254721Semaste * Redistribution and use in source and binary forms, with or without 6254721Semaste * modification, are permitted provided that the following conditions 7254721Semaste * are met: 8254721Semaste * 1. Redistributions of source code must retain the above copyright 9254721Semaste * notice, this list of conditions and the following disclaimer. 10254721Semaste * 2. Redistributions in binary form must reproduce the above copyright 11254721Semaste * notice, this list of conditions and the following disclaimer in the 12254721Semaste * documentation and/or other materials provided with the distribution. 13254721Semaste * 14254721Semaste * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS``AS IS'' AND 15254721Semaste * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16254721Semaste * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 17254721Semaste * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS 18254721Semaste * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 19254721Semaste * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 20254721Semaste * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 21254721Semaste * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22254721Semaste * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 23254721Semaste * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24254721Semaste * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25254721Semaste * 26254721Semaste * $FreeBSD: head/usr.sbin/kgzip/kgzip.h 50479 1999-08-28 01:35:59Z peter $ 27254721Semaste */ 28254721Semaste 29254721Semaste#include "kgz.h" 30254721Semaste 31254721Semaste/* Used by I/O routines */ 32254721Semastestruct iodesc { 33254721Semaste const char *fname; /* File name */ 34254721Semaste int fd; /* File descriptor */ 35254721Semaste}; 36254721Semaste 37254721Semasteextern const char *loader; /* Default loader */ 38254721Semaste 39254721Semastevoid kgzcmp(struct kgz_hdr *, const char *, const char *); 40254721Semastevoid kgzld(struct kgz_hdr *, const char *, const char *); 41254721Semaste 42254721Semastevoid xclose(const struct iodesc *); 43254721Semastevoid xcopy(const struct iodesc *, const struct iodesc *, size_t, off_t); 44254721Semastevoid xzero(const struct iodesc *, size_t); 45254721Semastesize_t xread(const struct iodesc *, void *, size_t, off_t); 46254721Semastevoid xwrite(const struct iodesc *, const void *, size_t); 47254721Semastevoid xseek(const struct iodesc *, off_t); 48254721Semaste