home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / LANGUAGS / C / MFILE.LBR / MFILE.DZC / MFILE.DOC
Text File  |  2000-06-30  |  4KB  |  109 lines

  1.         >>>>>>>>>>>>>>>>|<<<<<<<<<<<<<<<
  2.                 >>            MFILE           <<
  3.         >>>>>>>>>>>>>>>>|<<<<<<<<<<<<<<<
  4.  
  5. >>>>AUTHORS<<<<
  6.  
  7. Copyright
  8.     Colin McCormack (Tangled Web Software Pty. Ltd.).
  9.     Peter Gron.
  10.     Australian Federal Government. (Australian Tax Office).
  11.  
  12. (Wσ haΣ aε applicatioε whicΦ needeΣ 4░ file≤ a⌠ oncσ anΣ tha⌠ i≤ ì
  13. wh∙ wσ wrotσ mfile.)
  14.  
  15. >>>>PURPOSE<<<<
  16.  
  17. Mfilσ i≤ ß ├ languagσ utilit∙ designeΣ t∩ overcomσ thσ ì
  18. limitation≤ man∙ ├ package≤ anΣ operatinτ system≤ imposσ oε thσ ì
  19. maximuφ numbe≥ oµ file≤ ß prograφ caε havσ opeε concurrently.
  20.  
  21. Mfilσ wil∞ permi⌠ aε arbitrar∙ numbe≥ oµ file≤ t∩ bσ accesseΣ b∙ ì
  22. ß program¼ withou⌠ thσ program(mer⌐ havinτ t∩ explicitl∙ opeε o≥ ì
  23. closσ any file≤ t∩ makσ rooφ fo≥ others.
  24.  
  25. >>>>INTERFACE DETAILS<<<<
  26.  
  27. ┴ prograφ whicΦ use≤ mfile≤ accesse≤ file≤ viß thσ macro≤ defineΣ ì
  28. iε mfile.Φ whicΦ ma≡ ß (hopefull∙ universal⌐ se⌠ oµ system filσ ì
  29. primitive≤ ont∩ aε identica∞ se⌠ whicΦ look≤ afte≥ thσ temporar∙ ì
  30. closinτ anΣ transparen⌠ re-openinτ oµ file≤ whicΦ thσ prograφ ì
  31. need≤ t∩ acces≤ witΦ finσ graineΣ interleavinτ oµ access.
  32. See mfile.h for interface detail.
  33.  
  34. >>>>INTERNAL DETAILS<<<<
  35.  
  36. Thσ worδ mfilσ doe≤ i≤ minima∞ iε thσ casσ tha⌠ ß referenceΣ filσ ì
  37. i≤ actuall∙ current¼ mfilσ simpl∙ check≤ tha⌠ anΣ returns« Iε thσ ì
  38. othe≥ case¼ thσ filσ i≤ reopeneΣ afte≥ anothe≥ i≤ potentiall∙ ì
  39. closed« Iε practicσ wσ finΣ thσ overheaΣ acceptable¼ wherσ thσ ì
  40. alternativσ woulΣ bσ les≤ clea≥ codσ anΣ possibl∙ les≤ efficien⌠ ì
  41. ad-hoπ codσ t∩ perforφ thσ samσ function.
  42.  
  43. Mfilσ keep≤ ß lis⌠ oµ al∞ file≤ currentl∙ open¼ iε orde≥ oµ ì
  44. reference¼ mos⌠ recentl∙ referenceΣ first« Wheε mfilσ i≤ ì
  45. requesteΣ t∩ opeε ß ne≈ file¼ i⌠ wil∞ firs⌠ closσ thσ leas⌠ ì
  46. recentl∙ useΣ filσ (iµ necessary⌐ t∩ makσ rooφ fo≥ thσ newl∙ ì
  47. openeΣ file« Thσ techniquσ useΣ i≤ commoε amongs⌠ application≤ ì
  48. whicΦ requirσ thσ distributioε oµ ß scarcσ resourcσ (iε thi≤ casσ ì
  49. filσ descriptors⌐ amongs⌠ ß potentiall∙ large≥ numbe≥ oµ ì
  50. consumer≤ (iε thi≤ casσ concurrentl∙ opeε files).
  51.  
  52. Thσ lis⌠ oµ opeε file≤ i≤ actuall∙ ß doubl∙ linkeΣ lis⌠ oµ ß typσ ì
  53. calleΣ (╔ think⌐ ß dequeue« Thi≤ implementatioε permit≤ additioε ì
  54. t∩ thσ to≡ anΣ deletion≤ froφ an∙ placσ iε thσ list¼ a≤ wel∞ a≤ ì
  55. traversa∞ iε eithe≥ order« Thσ lis⌠ i≤ kep⌠ iε reversσ orde≥ oµ ì
  56. expecteΣ probabilit∙ oµ nex⌠ reference.
  57. Thσ routine≤ whicΦ managσ thσ queuσ unde≥ insertioε anΣ deletioε ì
  58. arσ presenteΣ iε dequeue.[ch▌ anΣ arσ probabl∙ suitablσ fo≥ othe≥ ì
  59. application≤ requirinτ manipulatioε oµ thi≤ datß structure.
  60.  
  61. >>>>PORTABILITY<<<<
  62.  
  63. Thσ desigε objective≤ werσ Transparency¼ Efficienc∙ anΣ ì
  64. Reliability« Thσ codσ shoulΣ bσ fairl∙ portable¼ witΦ thσ cavea⌠ ì
  65. tha⌠ eacΦ filσ systeφ i≤ likel∙ t∩ havσ somσ variatioε iε thσ ì
  66. synta° anΣ functioε oµ it≤ systeφ leve∞ filσ system« Thi≤ ì
  67. modificatioε wil∞ hopefull∙ bσ trivia∞ iε almos⌠ al∞ cases.
  68.  
  69. >>>>SYSTEM DEPENDANT ENHANCEMENT<<<<
  70.  
  71. Thσ assumption≤ madσ fo≥ currenc∙ arσ minimal« Mfilσ assume≤ tha⌠ ì
  72. upoε creatioε oµ ß file¼ it≤ namσ i≤ known« I⌠ furthe≥ assume≤ ì
  73. tha⌠ eacΦ filσ has¼ a⌠ al∞ point≤ wherσ i⌠ caε bσ used¼ ß knowε ì
  74. positioε froφ whicΦ thσ nex⌠ reaΣ o≥ writσ wil∞ occur« Thσ mean≤ ì
  75. oµ determininτ ß file'≤ curren⌠ positioε i≤ lseek().
  76. Iµ yo⌡ havσ acces≤ t∩ you≥ ├ compiler'≤ ruε timσ librar∙ source¼ ì
  77. yo⌡ ma∙ bσ ablσ t∩ ge⌠ thi≤ informatioε int∩ thσ mfilσ filσ ì
  78. descripto≥ morσ efficientl∙ b∙ referencσ t∩ thσ hos⌠ filσ ì
  79. descriptor« Thi≤ i≤ straightforwarΣ anΣ probabl∙ advisable.
  80. The effected functions are mSave() and mRestore() - and of course
  81. the file descriptor data type MFD.
  82.  
  83. >>>>LEGALESE<<<<
  84.  
  85. Permission is granted to use and freely distribute any software
  86. herewith enclosed on the following conditions:
  87.  
  88. 1⌐ Copyrigh⌠ statu≤ i≤ no⌠ misrepresenteΣ anΣ copyrigh⌠ remain≤ ì
  89.    witΦ thσ authors
  90. 2) Authorship not misrepresented and is fully attributed.
  91. 3) No commercial profit is to be gained by resale or repackaging
  92.    or translation of this software (unless we get a cut).
  93.  
  94. Thi≤ doesn'⌠ meaε wσ won'⌠ le⌠ yo⌡ *use¬ i⌠ iε somethinτ yo⌡ ì
  95. writσ fo≥ sale¼ bu⌠ iµ yo⌡ distributσ thσ source¼ yo⌡ can'⌠ takσ ì
  96. mone∙ fo≥ ou≥ labour.
  97.  
  98. 8th June 1987.
  99. Colin McCormack,
  100. colinm@runx.oz        <-- UUCP
  101.  
  102. 061 (02) 808 1951    <-- Telecom
  103.  
  104. 5/1A McPherson St.    <-- Post
  105. Meadowbank, 2114.
  106. Sydney, New South Wales.
  107. Australia.
  108.  
  109.