/*
 # $Id: misc.h,v 1.6 1998/10/08 11:03:03 fbm Exp fbm $
 # Copyright (C) 1997,1998 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
 #       express permission.
 #   3.  This toolkit, or any component of this toolkit, may not be
 #       commercially resold, redeveloped, rewritten, enhanced or otherwise
 #       used as the basis for commercial venture, without first obtaining
 #       the author's express permission.
 #   4.  Subject to the above conditions being observed (1-3), this toolkit
 #       may be freely reproduced or redistributed.
 #   5.  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.
 #   6.  Subject to the above conditions being observed (1-5),
 #       this toolkit may be used at no cost to the recipient.
 #
 # Farrell McKay
 # Wayfarer Systems Pty Ltd		contact@fortify.net
 */

#ifndef MISC_H
#define MISC_H

#define SEG_UNKN	-1
#define SEG_TEXT	0
#define SEG_DATA	1
#define SEG_RODATA	2
#define NSEGS		3

void		*_malloc(size_t sz);
void		*_realloc(void *s, size_t sz);
void		*_calloc(size_t n, size_t sz);
char		*_strdup(const char *s);
char		*_strndup(const char *s, int n);
char		*seg_name(int i);
int		isnumeric(char *s);
int		zread(int fd, char *b, int n, char *msg);
void		zlseek(int fd, off_t off, char *msg);
unsigned short	toShort(unsigned char *p);
unsigned long	toLong(unsigned char *p);

#endif
