home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / Replacements / AKCC35.lha / Programmers / Examples / AssignName.c next >
Encoding:
C/C++ Source or Header  |  1994-12-30  |  1.1 KB  |  43 lines

  1.  
  2.  /* AssignName V37.3                                           */
  3.  /* FREEWARE.                                                  */
  4.  /* (c) 1993-94 by Andreas R. Kleinert.                        */
  5.  /* Demonstrates use of the Assign()-Function.                 */
  6.  /* Written in SAS/C V6.51.                                    */
  7.  
  8. #include <akcc_gen0/akcc_gen0_pragma.h>
  9.  
  10. #include <stdlib.h>
  11.  
  12. #include <proto/exec.h>
  13.  
  14.  
  15. struct AKCCBase *AKCCBase = N;
  16.  
  17. void main(long argc, char **argv)
  18. {
  19.  printf("\nAssignName V37.3, FREEWARE, (c) 1993-94 by Andreas R. Kleinert.\n");
  20.  
  21.  AKCCBase = (struct AKCCBase *) OpenLibrary("akcc_gen0.library", 37);
  22.  if(AKCCBase)
  23.   {
  24.    char assign_name[256], assign_path[256];
  25.  
  26.    printf("\nEnter Assign Name (with \42:\42) :");
  27.    scanf("%s", assign_name);
  28.  
  29.    printf("Enter Assign Path :");
  30.    scanf("%s", assign_path);
  31.  
  32.    if(AKCC_Assign(assign_name, assign_path) == AKCC_TRUE) printf("\nDone.\n");
  33.     else                                                  printf("\nAn error occured.\n");
  34.  
  35.    CloseLibrary((APTR) AKCCBase);
  36.   }else
  37.   {
  38.    printf("\n Can't open \42akcc_gen0.library\42 V37+ !\n");
  39.   }
  40.  
  41.  exit(0);
  42. }
  43.