
/* FAME Door Beginning Source
 *
 * $VER:TestDoor.c v0.22
 *
 * All you need are the includes and headers!
 *
 * Used tab size: 2
 */

/* Includes:
 */

#include <FAME/FAMEPublic.h>

/* Global variables:
 */

#ifdef LATTICE
int CXBRK(void) {return(0);} /* Disable Lattice CTRL-C handling */
int chkabort(void) {return(0);}
#endif

/* Prototypes:
 */

void ShutDown(int code);

/* main() entry point:
 */

void main(int argc, char *argv[])
{
	char str[256];

  if(argc < 2) {

    printf("\nSorry, %s is a Door and must be called from FAME BBS!\n\n",argv[0]);
    exit(RETURN_ERROR);
  }
  SPrintf((STRPTR)FAMEDoorPort,"FAMEDoorPort%ld",FAMEAtol(argv[1]));
  if(PortStart())
		PortEnd(40);

/* Place your own code in here:
 */

	str[0] = '\0';

	PutString("\r\nTell me something>: ",0);
	GetString(str,50);
	PutStringFormat("\r\nYou said: %s\r\n\n",str);

/* Ending Door!
 */

	ShutDown(0);
}

/* Shutdown:
 */

void ShutDown(int error)
{
  PortEnd(error);
}

