/*
 # $Id: index.h,v 1.7 1997/09/02 13:32:08 fbm Exp fbm $
 # Copyright (C) 1997 Farrell McKay
 # All rights reserved.
 #
 # This file is part of the Fortify distribution, a toolkit for
 # upgrading the cryptographic strength of the Netscape Navigator
 # web browser, authored by Farrell McKay.
 #
 # This toolkit is provided to the recipient under the
 # following terms and conditions:-
 #   1.  This copyright notice must not be removed or modified.
 #   2.  This toolkit may not be reproduced or included in any commercial
 #       media distribution, or commercial publication (for example CD-ROM,
 #       disk, book, magazine, journal) without first obtaining the author's
 #       permission.
 #   3.  Subject to the above conditions being observed (1,2), this toolkit
 #       may be freely reproduced or redistributed.
 #   4.  This software is provided "as-is", without express or implied
 #       warranty.  In no event shall the author be liable for any direct,
 #       indirect or consequential damages however caused.
 #   5.  Subject to the above conditions being observed (1-4),
 #       this toolkit may be used at no cost to the recipient.
 #
 # Farrell McKay			Farrell.McKay@mpx.com.au
 */

#ifndef INDEX_H
#define INDEX_H

#define	IDX_SZ		0
#define	IDX_MD5SPAN	1
#define	IDX_MD5		2
#define	IDX_PROD	3
#define	IDX_VERN	4
#define	IDX_GRADE	5
#define	IDX_MORPHS	6
#define	IDX_ARCH	7
#define	IDX_COMMENTS	8
#define	IDX_NFLDS	9

typedef struct {
	char		*raw;
	char		*flds[IDX_NFLDS];
	int		size;
	int		ismorphed;
} index_entry_t;

int		have_morphs(index_entry_t *ent);
int		build_index(char *indexfile, char **vern);
index_entry_t	*index_lookup(char *tgt);
char		*calc_md5(int fd);

#endif
