home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume3 / getpath / sample.c < prev   
C/C++ Source or Header  |  1989-02-03  |  502b  |  21 lines

  1. /* sample.c  -- example of use of getpath.c */
  2.  
  3. #include "getpath.h"
  4.  
  5. main()
  6. {
  7.      path_t *file_path;
  8.      char   file_name[81];
  9.  
  10.      printf("\n Enter a DOS file name: [d:][\path]name[.ext]\n");
  11.      scanf("%s", file_name);
  12.      file_path = getpath(file_name);
  13.      printf("\n file disk = %s\n", file_path->fil_disk);
  14.      printf(" file path = %s\n", file_path->fil_path);
  15.      printf(" file name = %s\n", file_path->fil_name);
  16.      printf(" file ext  = %s\n", file_path->fil_ext);
  17.  
  18.      exit(0);
  19. }
  20.  
  21.