    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: The Wall</title>
        <link>https://members.accu.org/index.php/articles/972</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>




<div class="xar-mod-head"><span class="xar-mod-title">Letters to the Editor + CVu Journal Vol 12, #1 - Jan 2000</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c184/">Journal Columns</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c186/">LettersEditor</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c77/">CVu</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c128/">121</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/c186-128/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/articles/c186+128/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;The Wall</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 08 January 2000 13:15:34 +00:00 or Sat, 08 January 2000 13:15:34 +00:00</p>
<p><strong>Summary:</strong>&nbsp;</p>
<p><strong>Body:</strong>&nbsp;<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e22" id="d0e22"></a>File
Positioning by Waldo Posul</h2>
</div>
<p>Dear Editor,</p>
<p>I think Waldo is correct in assuming that file positioning is
difficult to do with standard C especially if it has to survive
file closure. I also think that it is essential to have this
functionality in any operating system that is going to be used with
large files. So important that any operating system without it will
fail. The key, therefore, is to design your own interface so that
any system specific code is hidden from your application. This
interface should include opening, closing, reading and writing as
well as positioning and error reporting. Fortunately this is only a
small set of operations and shouldn't impose too great an overhead
on an application of any size. Such an interface should come with a
test suite so that any implementation can be tested against a
common standard.</p>
<p>When it comes to implementation then, depending on the operating
system, fgetpos() and fsetpos() may well work as required. If they
don't then they may work if text files are opened as binary files
or, with Microsoft Windows, you might have to use SetFilePointer().
SetFilePointer() takes two 32 bit values for positioning so that
you can have a 63 bit offsets and deal with very large files.</p>
<p>One could try to avoid the problem instead. I would use a
database system (creating an application by next week rather than
next year). Alternatively you could try lots of small files, such
'a' for everything that begins with the letter 'a', etc, so that
fseek() will work. Whatever approach is used I don't like having
files open for long periods. I think it makes applications much
more vulnerable. I like to be able to open a file, update it and
then close it as quickly as possible. To be able to do this means
that you must have a persistent file positioning system that Waldo
wants.</p>
<p>Don Skene <tt class="email">&lt;<a href=
"mailto:donskene@cix.compulink.co.uk">donskene@cix.compulink.co.uk</a>&gt;</tt></p>
<p class="c3"><span class="remark">One subtle problem with such
persistent file positioning is that once the file is closed, some
other application may access it and make changes. I think that this
is one of the motives behind the constraints C places on guaranteed
behaviour.</span></p>
</div>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
