home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 037.lha / DU / MyMisc.def < prev    next >
Text File  |  1987-05-16  |  1KB  |  55 lines

  1. DEFINITION MODULE MyMisc;
  2.  
  3. (* MODULE to read the directory of a current device or directory and
  4.    place names/sizes into DirTable  - also to Sort them in alphabetical
  5.    order (case insensitive)
  6. *)
  7.  
  8. FROM DOSFiles           IMPORT  FileLock;
  9. FROM MyGlobals          IMPORT  GadgetNames;
  10.  
  11. PROCEDURE ShowMem;
  12.  
  13. PROCEDURE CheckMessages():BOOLEAN;
  14.  
  15.  
  16. PROCEDURE Interrupt():BOOLEAN;
  17.  
  18.  
  19. PROCEDURE ReplaceRSDM(g:GadgetNames;VAR a:ARRAY OF CHAR);
  20.  
  21.  
  22. PROCEDURE ReadDirectory(lock:FileLock):BOOLEAN;
  23. (* Returns true if good read
  24.  
  25.    DirTable[0] contains the directory record and name.
  26.    DirTable[1] - DirTable[DirEntries] contains filenames & other info *)
  27.  
  28.  
  29. (*------------*)
  30.  
  31.  
  32. PROCEDURE QSort;
  33. (* Sort the directory - DirEntries is top 1 is bottom   *)
  34. (* Setup is bubble sort now - will change later         *)
  35. (* Still - only 4 seconds for 230 files at that         *)
  36.  
  37. (*----------*)
  38. PROCEDURE MoveString(VAR tgt,src:ARRAY OF CHAR; po,le:CARDINAL);
  39. (* move max of 'le' chars of src to tgt[po] *)
  40. (* not including ending null                *)
  41.  
  42.  
  43. PROCEDURE DisplayName(file,pos:CARDINAL);
  44.  
  45.  
  46. PROCEDURE DisplayFiles(ind:CARDINAL);
  47.  
  48.  
  49. PROCEDURE NewDir;
  50. (* Display a new directory *)
  51.  
  52. PROCEDURE ClearTable;
  53.  
  54. END MyMisc.
  55.