/* util.h
   declarations of utility procedures. */

     /*---------------------------------------------------------------*/
     /* Xgopher        version 1.1     20 April 1991                  */
     /*                version 1.0     04 March 1991                  */
     /* X window system client for the University of Minnesota        */
     /*                                Internet Gopher System.        */
     /* Allan Tuchman, University of Illinois at Urbana-Champaign     */
     /*                Computing Services Office                      */
     /* Copyright 1992 by                                             */
     /*           the Board of Trustees of the University of Illinois */
     /* Permission is granted to freely copy and redistribute this    */
     /* software with the copyright notice intact.                    */
     /*---------------------------------------------------------------*/

#include "gopher.h"

gopherItemP makeItem(
#ifdef PROTO
	int,		/* type  -- really char, but gcc complains */
	char *,		/* titleString */
	char *,		/* selectString */
	char *,		/* host */
	int		/* port */
#endif
);

gopherItemP getGopherItem(
#ifdef PROTO
	int		/* gfd */
#endif
);

BOOLEAN getGopherDir(
#ifdef PROTO
	int,		/* gfd */
	gopherDirP	/* d */
#endif
);

BOOLEAN getDirectory(
#ifdef PROTO
	gopherItemP	/* gi */
#endif
);

void updateDirectory(
#ifdef PROTO
	gopherDirP	/* d */
#endif
);

BOOLEAN getFile(
#ifdef PROTO
	gopherItemP,	/* gi */
	char *		/* indexString */
#endif
);


BOOLEAN getIndexDirectory(
#ifdef PROTO
	gopherItemP,	/* gi */
	char *		/* indexString */
#endif
);

BOOLEAN giveTelnetSession(
#ifdef PROTO
	gopherItemP     /* gi */
#endif
);

BOOLEAN processSelection(
#ifdef PROTO
	gopherItemP	/* gi */
#endif
);

BOOLEAN getSound(
#ifdef PROTO
	gopherItemP	/* gi */
#endif
);

void	getTempFile(
#ifdef PROTO
	char *		/* tempName */
#endif
);

void	copyNetToFile(
#ifdef PROTO
	int,		/* s */
	FILE *		/* fp */
#endif
);

void	copyNetUntilEOF(
#ifdef PROTO
	int,		/* s */
	FILE *		/* fp */
#endif
);

BOOLEAN giveCsoNameServer(
#ifdef PROTO
	gopherItemP	/* gi */
#endif
);

BOOLEAN getIndexSearchString(
#ifdef PROTO
	gopherItemP	/* gi */
#endif
);

void processIndexSelection(
#ifdef PROTO
	gopherItemP,	/* gi */
	char *		/* string */
#endif
);
