#ifdef MSDOS
#include <stdio.h>
#include <dir.h>
#include <dos.h>
#include <string.h>
#include <time.h>
#define TUTOR		1
#define STANDALONE	1
#define ASCII_TYPE 	0
#define tprintf printf
#define NULLCHAR ((char *) 0)
#define NULLFILE ((FILE *) 0)
#define READ_TEXT "rt"

char *Info, *Tutor, *News, *Hostname;

pwait (void * i) {}

tputs (char *str)
{
	fputs (str, stdout);
}

tputc (char c)
{
	putchar (c);
}

void
mygets (buf, size, here)
char *buf;
int size;
struct world *here;
{
	fgets(buf, size, stdin);
}

rdaemon (FILE *out, char *from, char *to, char *subject, char msgtype)
{
	puts ("------------------------------------------------------");
	puts ("On a TNOS system, a mail message WOULD have been sent\nat this point:\n");
	printf ("  From: %s\n  To: %s\n  Subject: %s\n  X-BBS-Msg-Type: %c\n", from, to, subject, msgtype);
	puts ("------------------------------------------------------");
}

/* replace terminating end of line marker(s) with null */
void
rip(s)
register char *s;
{
	register char *cp;

	if((cp = strchr(s,'\n')) != NULLCHAR)
		*cp = '\0';
}

sendfile (FILE *fp)
{
int c;
	while((c = getc(fp)) != EOF){
		if(putchar((char)c) == -1)
			break;
	}
}

#include "tutor.c"
#define DEMO
#include "color.c"

void
main(int argc, char *argv[])
{
char selection[10];
int select;
char *call;

	Info = "INFO";
	Tutor = "TUTOR";
	News = "NEWS";
	Hostname = "test.ampr.org";
	call = "N4WOW";

	puts ("\nThe TNOS Information Server Authoring System assumes that you have\nthe following sub-directories in your current directory:\n");
	puts ("   INFO, TUTOR, NEWS\n\nIf these do not exist in your current directory, don't blame me!    KO4KS\n");
	for ( ; ; )	{
		puts ("\nPick an information server...\n");
		puts ("     0 - Exit the Authoring System");
		puts ("     1 - Learning Center (TUTOR)");
		puts ("     2 - Information Center (INFO)");
		puts ("     3 - News Center (NEWS)");
		do	{
			puts ("\nEnter Selection:");
			gets (selection);
			select = atoi (selection);
			if (!select)
				break;
			if (select > 3)
				puts ("Invalid number... select 0 - 3!\007");
		} while (select > 3);
		if (!select)
			break;
		tutorserv (call, select - 1, 1, 1);
		puts ("\n\n");
	}
}
#endif /* MSDOS */

