/************************************************************************
 * This program is Copyright (C) 1986 by Jonathan Payne.  JOVE is       *
 * provided to you without charge, and with no warranty.  You may give  *
 * away copies of JOVE, including sources, provided that this notice is *
 * included in all the files.                                           *
 ************************************************************************/
#if !pdp11
#line 9 "tune.ct"	/* so errors will point into this source file */
#endif			/* {{somehow doesn't work for pdp11 compiler. sigh}} */

#define NOEXTERNS
#define _TUNE_C_

#include "tune.h"

RCS("$Id: tune.ct,v 14.31.0.7 1993/10/29 02:43:04 tom Exp tom $")

/* shame we have to duplicate this from jove.h! */
#define DEF_STR(Name,Var,Len,Type)	char	*Var
#define _IF(x)	/* nada */

#define UX(x)
#define ST(x)
#define PC(x)
#define MC(x)
#define VMS(x)

#if unix
#   undef UX
#   define UX(x) x
#endif
#if vms
#   undef VMS
#   define VMS(x) x
#endif
#ifdef ATARIST
#   undef ST
#   define ST(x) x
#   define STRSIZE	64
#endif
#ifdef MSDOS
#   undef PC
#   define PC(x) x
#   if _ANSI_CPP_
	/* Initialize string so that executable can be patched, if desired. */
#	define PADSTR	":....3....:....4....:....5....:....6..."
#   else
#	define STRSIZE	64
#	define PADSTR
#   endif
#endif
#ifdef MAC /* [TRH 13-Feb-91] Mac stuff is just a wild guess at the moment! */
#   undef MC
#   define MC(x) x
#   define STRSIZE	64
#endif

#ifndef STRSIZE
#   define STRSIZE
#endif

char tmp_file_path[STRSIZE] =		/* for patching purposes... */
		UX("TMPDIR")
		VMS("TMPDIR")
		ST("d:\\tmp")
		MC("")
		PC("c:\\tmp\0..1....:....2...." PADSTR);

#if !(unix || vms)
/* deliberately non-const */ int
	CacheSize = NBUF;		/* so it can be patched */
#endif

/* deliberately non-const */ char
	d_tempfile[] =	"jdatXXXXXX",	/* buffer lines go here */
	p_tempfile[] =	"jrecXXXXXX",	/* line pointers go here */

	Recover[STRSIZE] =
		UX("LIBDIR/recover")
		VMS("LIBDIRrecover")
		ST("d:\\jove\\recover.ttp")
		MC("/jove/lib/recover")
		PC("c:\\etc\\jove\\recover.exe\0" PADSTR),

		/* copy of "cmds.doc" lives in the doc subdirectory */
	CmdDb[STRSIZE] =
		UX("LIBDIR/cmds.doc")
		VMS("LIBDIRcmds.doc")
		ST("d:\\jove\\jove.hlp")
		MC("/jove/lib/jove.hlp")
		PC("c:\\etc\\jove\\jove.hlp\0..." PADSTR),

	SystemRc[STRSIZE] =
		UX("JOVERC")
		VMS("JOVERC")
		ST("d:\\jove\\jove-sys.rc")
		MC("/jove/lib/joverc")
		PC("c:\\etc\\jove\\jove-sys.rc\0" PADSTR),

#if !unix
#   ifdef MSDOS
	/* RE pattern matching allowed device names. */
	DevNames[] = "\\{CON,NUL,PRN,LPT[123],AUX,COM[1-4],CLOCK\\$\\}\\{\\..*,\\}$",
#   endif
#   ifdef ATARIST
	/* Supply a default PATH for the desktop.  If any shell supplies
	   a significant PATH (longer than ";C:"), that is used instead.
	 */
	Path[128] = "PATH=.;c:\\bin;d:\\bin",
#   endif

	Home[STRSIZE] =
		VMS("sys$login:")
		ST("c:")
		MC("")
		PC("c:\0.:....1....:....2....:...3....:...."),
#endif

	JoveRc[] =
		UX("~/.joverc")
		VMS("~/.joverc")
		ST("~\\jove.rc")
		MC("~/.joverc")
		PC("~\\jove.rc"),
#ifdef PIPEPROCS
	Portsrv[] =	"LIBDIR/portsrv",
	KbdProc[] =	"LIBDIR/kbd",
#endif
#ifndef TINY
	JoveHlp[] =		/* the user's personal help database */
		UX("~/.jovehelp")
		VMS("~/.jovehelp")
		ST("~\\jove.hlp")
		MC("~/.jovehelp")
		PC("~\\jove.hlp"),
#endif
	Root[] =
		UX("/")
		VMS("/")	/* ? */
		ST("\\.")
		MC("/")		/* ? */
		PC("\\."),

	DevNull[] =
		UX("/dev/null")
		VMS("NL:")
		ST("")
		MC("")		/* ? */
		PC("NUL"),
#ifndef TINY
	BadFChars[] =
		UX("!$^&*()~`{}\"'\\|<>?[]; \177")
		/* we check UNIXified filenames so typical VMS
		   filename delimiters are included here too. */
		VMS(" !#%^&'()*+,:<=>?[\\]^`{|}~\177")
		ST("!$^&*()~`{}\"'/|<>?[]; \177")
		MC("*~{}?[] \177")		/* JOVEs meta-chars, actually */
		PC("$^&*()~`{}\"'|<>?[]; +,="),
#endif
#ifdef TINY
#   if unix
	ctimeProg[] = "LIBDIR/ctime",
#   endif
#endif
	DevTty[] =
		UX("/dev/tty")
		VMS("TT:")
		ST("con:")
		MC("")		/* ? */
		PC("CON");

DEF_STR( "tmp-file-pathname", TmpFilePath, 40, V_FILENAME ) = tmp_file_path;

#ifndef NOPROCS
DEF_STR( "shell", Shell, 40, V_FILENAME ) _IF(ndef NOPROCS) =
		UX("SHELL")
		VMS("DCL")	/* dummy */
		ST("")
		MC("")
		PC("command.com\0..:....2....:....3....:....");

DEF_STR( "shell-flags", ShFlags, 16, V_STRING ) _IF(ndef NOPROCS) =
		UX("-c")
		VMS("")		/* dummy */
		ST("")
		MC("")
		PC("/c\0.:....1....:");
#endif /* NOPROCS */

/*======================================================================
 * $Log: tune.ct,v $
 * Revision 14.31.0.7  1993/10/29  02:43:04  tom
 * STRSIZE: make patchable strings longer.
 *
 * Revision 14.31  1993/02/16  16:24:19  tom
 * add ctimeProg[] #ifdef TINY.
 *
 * Revision 14.30  1993/01/26  18:43:17  tom
 * cleanup whitespace; some random optimizations.
 *
 * Revision 14.26  1992/08/26  23:57:04  tom
 * add RCS directives.
 *
 */
