home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / config / config.readme < prev    next >
Text File  |  1977-12-31  |  2KB  |  49 lines

  1. Short:    Very easy access to config files
  2. Author:   Adam@beachyhd.demon.co.uk (Adam Dawes)
  3. Uploader: Adam@beachyhd.demon.co.uk (Adam Dawes)
  4. Type:     dev/c
  5.  
  6.  
  7. Introduction
  8. ~~~~~~~~~~~~
  9.  
  10. Well, I hate Windows as much as the next man, but occasionally I stumble
  11. across a good idea hidden away within the operating system.
  12.  
  13. There are a couple of functions buried in there for reading and writing
  14. configuration files, and they actually make things very easy. I decided I'd
  15. had enough of messing around with config files on my Amiga, so I've ported
  16. the functions to Amiga C.
  17.  
  18. The idea is that the configuration files take a definitive structure which
  19. the Config functions can understand. Each config file is split in to a
  20. number of "Sections" (which are stored in the config file as a keyword
  21. inside square brackets). In each of these sections are a number of "Items",
  22. each of which contains an actual data item. The items are local to the
  23. section that contains them, so it's perfectly legal to use one item name in
  24. several sections, they'll all be treated separately.
  25.  
  26. The beauty behind the functions is you don't have to worry about creating
  27. files or scanning through them. Even when it comes to reading data, you
  28. don't have to care if the config file exists or not as you provide a
  29. default value to use if the file/section/item cannot be located.
  30. Everything is automated within the Config functions.
  31.  
  32.  
  33.  
  34. Full documentation is included within the archive.
  35.  
  36.  
  37. ============================= Archive contents =============================
  38.  
  39. Original  Packed Ratio    Date     Time    Name
  40. -------- ------- ----- --------- --------  -------------
  41.     6087    1835 69.8% 25-May-96 15:50:32  Config.c
  42.     8250    3016 63.4% 25-May-96 16:09:48  Config.guide
  43.      756     324 57.1% 25-May-96 15:28:28  Config.h
  44.     7286    2757 62.1% 25-May-96 16:09:54  Config.txt
  45.     2747     625 77.2% 25-May-96 15:28:26  ConfigTest.c
  46.      202      74 63.3% 25-May-96 15:29:36  DMakeFile
  47. -------- ------- ----- --------- --------
  48.    25328    8631 65.9% 25-May-96 23:33:00   6 files
  49.