home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / new / util / cdity / runlist2 / source / fr.c < prev    next >
C/C++ Source or Header  |  1994-10-07  |  1KB  |  55 lines

  1.  
  2. #include <clib/asl_protos.h>
  3. #include <clib/exec_protos.h>
  4. #include <clib/alib_stdio_protos.h>
  5. #include <dos/dosasl.h>
  6. #include <exec/libraries.h>
  7.  
  8. int CXBRK(void) { return(0); }
  9. int chkabort(void) { return(0); }
  10.  
  11. UBYTE *vers = "\0$VER: FR 1";
  12.  
  13. void main(void);
  14.  
  15. struct Library *AslBase;
  16.  
  17. struct TagItem frtags[] =
  18. {
  19.     ASL_Hail,       (ULONG)"    >>  FR v1 <<   Requester   ",
  20.     ASL_Height,     (UWORD)200,
  21.     ASL_Width,      (UWORD)320,
  22.     ASL_LeftEdge,   (UWORD)0,
  23.     ASL_TopEdge,    (UWORD)0,
  24.     ASL_OKText,     (ULONG)"O KAY",
  25.     ASL_CancelText, (ULONG)"not OK",
  26.     ASL_File,       (ULONG)" ",
  27.     ASL_Dir,        (ULONG)"SYS:",
  28.     TAG_DONE
  29. };
  30.  
  31.  
  32.  
  33. void main()
  34. {
  35.  
  36.     struct FileRequester *fr;
  37.  
  38.     if (AslBase = OpenLibrary("asl.library", 36L))
  39.     {
  40.         if (fr = (struct FileRequester *)
  41.             AllocAslRequest(ASL_FileRequest, frtags))
  42.         {
  43.  
  44.             if (AslRequest(fr, 0L))
  45.                 printf("file choice = %s%s\n", fr->rf_Dir, fr->rf_File);
  46.             else
  47.                 printf("User Cancelled\n");
  48.  
  49.         }
  50.  
  51.         FreeAslRequest(fr);
  52.     }
  53.     CloseLibrary(AslBase);
  54. }
  55.