/* LIV1.c  ( Lockup Install Version 1.c )  */

/* By Stuart Kelly */

/* Workbench 2 And Above ONLY */

/*
** You May Use This Program In Any Way You Wish.
** You May Change This Program In Any Way.
*/

/* Includes */
#include <stdio.h>
#include <string.h>
#include <clib/dos_protos.h>

/*
** Define VERSION_STRING For Later Use
*/
#define VERSION_STRING "LIV1.01 By Stuart Kelly"


/*
** UBYTE a pointer to the version of the program.
** This Is Read By Workbench`s Version Program.
*/

UBYTE *version = "\0$VER:"VERSION_STRING;


/*
** The Main Program
*/
void main(void)
{
 FILE *file_handle;

 int menu;
 menu=0;

 /*
 ** Print Up Menu
 ** Also Goto Here If Any Number Other Than 1 & 2 Is Entered
 */
 try_again:
 printf("\n Lockup Install Version 1\n");
 printf(" 1 - Install Lockup\n");
 printf(" 2 - Don`t Install Lockup\n");
 printf("  \n");
 printf(" Well-> ");
 scanf("%d",&menu);

 /*
 ** What Option Did The User Pick ?
 */
 if (menu==1) {
    printf("Installing\n");
    if (file_handle=fopen("ram:LI","w")) {
        fprintf(file_handle,"Installing Lockup...\n");
        fclose(file_handle);
        }
        goto end_prog;
        }
 else if (menu==2) {
  printf(" Quiting...\n");
  goto end_prog;
  }

 /*
 ** Didn`t Pick Any So Go Back To Menu
 */
 else goto try_again;



 /*
 ** End_prog:
 */
 end_prog:
 printf("LIV1 End...\n");
 return();
}
