kgzip.h revision 48905
148905Srnordier/* 248905Srnordier * Copyright (c) 1999 Global Technology Associates, Inc. 348905Srnordier * All rights reserved. 448905Srnordier * 548905Srnordier * Redistribution and use in source and binary forms, with or without 648905Srnordier * modification, are permitted provided that the following conditions 748905Srnordier * are met: 848905Srnordier * 1. Redistributions of source code must retain the above copyright 948905Srnordier * notice, this list of conditions and the following disclaimer. 1048905Srnordier * 2. Redistributions in binary form must reproduce the above copyright 1148905Srnordier * notice, this list of conditions and the following disclaimer in the 1248905Srnordier * documentation and/or other materials provided with the distribution. 1348905Srnordier * 1448905Srnordier * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS``AS IS'' AND 1548905Srnordier * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1648905Srnordier * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 1748905Srnordier * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS 1848905Srnordier * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 1948905Srnordier * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 2048905Srnordier * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 2148905Srnordier * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 2248905Srnordier * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 2348905Srnordier * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 2448905Srnordier * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2548905Srnordier * 2648905Srnordier * $Id:$ 2748905Srnordier */ 2848905Srnordier 2948905Srnordier#include "kgz.h" 3048905Srnordier 3148905Srnordier/* Used by I/O routines */ 3248905Srnordierstruct iodesc { 3348905Srnordier const char *fname; /* File name */ 3448905Srnordier int fd; /* File descriptor */ 3548905Srnordier}; 3648905Srnordier 3748905Srnordierextern const char *loader; /* Default loader */ 3848905Srnordier 3948905Srnordiervoid kgzcmp(struct kgz_hdr *, const char *, const char *); 4048905Srnordiervoid kgzld(struct kgz_hdr *, const char *, const char *); 4148905Srnordier 4248905Srnordiervoid xclose(const struct iodesc *); 4348905Srnordiervoid xcopy(const struct iodesc *, const struct iodesc *, size_t, off_t); 4448905Srnordiervoid xzero(const struct iodesc *, size_t); 4548905Srnordiersize_t xread(const struct iodesc *, void *, size_t, off_t); 4648905Srnordiervoid xwrite(const struct iodesc *, const void *, size_t); 4748905Srnordiervoid xseek(const struct iodesc *, off_t); 48