home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / cbbs_415.lzh / CBBS / CBBS.lzh / mem / doc next >
Text File  |  1989-09-01  |  3KB  |  61 lines

  1. I wrote the two programs in the 'c' directory called loadram and saveram.
  2. I use them to load (with loadram) the entire CBBS source and object into a
  3. ram: directory and then to save back to disk (using saveram) only those files
  4. that have changed. See the file 'loadram' in this directory for an example
  5. of how to call it. Unfortunately, these two programs can't be used to
  6. load bbs files into ram and periodically update them back to disk if they
  7. have been modified. This is because of a problem with the way 1.2 changes
  8. dates in a file and may be fixed in 1.3 ... see the PROBLEMS below.
  9.  
  10. Loadram has been modified so that if any files are to be copied that match
  11. the pattern "*.o" then these are remembered and copied last after everything
  12. else has been done. This is so that the date on the *.o file will be later
  13. than its corresponding *.c file so that 'make' will not try to remake the
  14. *.o file simply because it was copied into ram before its corresponding
  15. *.c file.
  16.  
  17. Loadram:
  18.    called by:  loadram ram-dir disk-dir filespecs ....
  19.  
  20. The specified ram-dir need not exist and will be created if absent. The
  21. disk-dir must exist. The filespecs can be individual file names or filenames
  22. with a wildcard "*" in them (UNIX-style). The * can ONLY be at the beginning
  23. or end of a filename. Thus, *.c or a5* are valid but a*b is not.
  24. The program will copy all specified files from the disk-dir into the
  25. ram-dir. It will then create in ram-dir a file (.loadram) that specifies the
  26. name of the disk-dir and the time that the copy was completed.
  27.  
  28. Saveram:
  29.    called by:   saveram [ram-dir [disk-dir]]
  30.  
  31. With no arguments, saveram opens the .loadram file in the current directory
  32. (it assumes you are connected to a ram directory in this case) and if it
  33. can't find the .loadram file it complains. If .loadram  exists then it
  34. uses the date in that file as the basis for determining whether a file in
  35. the ram-dir has been changed since the loadram was performed. If so it
  36. is written to the disk file specified in the .loadram file. A ram-dir can
  37. be specified as the first argument, and the disk directory in the .loadram
  38. file can be overridden by specifying the required disk directory name as
  39. the second argument.
  40. Saveram has been modified so that if no updates are required then it does
  41. not access the disk at all. (It used to check for the existence of the
  42. disk directory whether or not it was going to use it).
  43. Once saveram has has done the file updates (if any) it changes the date/time
  44. in .loadram to 'now'.
  45.  
  46. PROBLEMS:
  47. 1. When AMIGADOS renames a file it does NOT change the file's
  48.    date/time and therefore saveram can't detect that a renamed file has been
  49.    changed. This can cause problems if you do a loadram, rename a file, and
  50.    then a saveram, since saveram won't save the file under the new name.
  51.    SO BE CAREFUL OF RENAMING FILES WHEN USING loadram AND saveram.
  52. 2. The same kind of problem applies to a file that is opened, modified and
  53.    then closed (but which is not deleted and recreated). The date is not
  54.    changed so the saveram program will not see that a change has been made
  55.    and so won't save it. This is a real nuisance but I can't work around
  56.    it yet.
  57.  
  58.  
  59.  
  60.  
  61.