/*
**      $VER: AssignName 37.1 (6.9.96)
**
**      Demonstrates usage of AKCC_Assign()
**
**      (C) Copyright 1989-96 Andreas R. Kleinert
**      All Rights Reserved.
*/


#define __USE_SYSBASE

#include <akccplus/akccplus_all.h>
#include <proto/akccplus.h>

#include <stdlib.h>

#include <proto/exec.h>
#include <proto/dos.h>


struct AKCCPlusBase *AKCCPlusBase = N;

void main(long argc, char **argv)
{
 printf("\nAssignName V37.1, FREEWARE, (c) 1993-96 by Andreas R. Kleinert.\n");

 AKCCPlusBase = (struct AKCCPlusBase *) OpenLibrary("akccplus.library", 37);
 if(AKCCPlusBase)
  {
   char assign_name[256], assign_path[256];

   printf("\nEnter Assign Name (with \42:\42) :");
   scanf("%s", assign_name);

   printf("Enter Assign Path :");
   scanf("%s", assign_path);

   if(AKCC_Assign(assign_name, assign_path) == AKCC_TRUE) printf("\nDone.\n");
    else                                                  printf("\nAn error occured.\n");

   CloseLibrary((APTR) AKCCPlusBase);
  }else
  {
   printf("\n Can't open \42akccplus.library\42 V37+ !\n");
  }

 exit(0);
}
