<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi, <br>
<br>
write your own small wrapper function with the third parameter which
translates relative positions to absolute positions. It is not so
difficult, just a little bit of math (and physfs_tell). The worst is
probably SEEK_END. If Physfs_uint64 is a problem for you, try a weak
& dynamic typed language.<br>
<br>
On 03.12.2012 19:37, fy wrote:
<blockquote cite="mid:op.woq7c7sf3gjxnn@xxx-1" type="cite">
<style type="text/css">body { font-family:'宋体'; font-size:13px}</style>
在 Tue, 04 Dec 2012 00:27:45 +0800,Tim Čas
<a class="moz-txt-link-rfc2396E" href="mailto:darkuranium@gmail.com"><darkuranium@gmail.com></a> 写道:<br>
<br>
<blockquote style="margin: 0 0 0.80ex; border-left: #0000FF 2px
solid; padding-left: 1ex">One more thing, which I forgot to
mention...<br>
<br>
... I don't know whether seeking w/ fseek before the start of
file is implementation-defined or straight out undefined. In
either case, the Vorbis API should not be doing the former
because of portability concerns, and should not be doing the
latter because, well, it's undefined.<br>
<br>
If it's the former (impl-defined) and you're feeling paranoid,
you can always just do the thing I've specified in the previous
email -- what's important is that it's consistent.<br>
If it's the latter (undefined), you don't need to worry about
handling it at all, since for all the standard cares, it could
summon (in the case of fseek) nasal demons.<br>
<br>
That's in theory anyways -- in practice, as stated, I highly
doubt the API would do such a nasty thing due to the
aforementioned reasons.</blockquote>
<div><br>
</div>
<div>OK. Now I tired, but failed.</div>
<div><br>
</div>
<div>Then I load whole file into memory.I got a record of func
calls by codes of stackoverflow :</div>
<div><br>
</div>
<div>SEEK_END<br>
SEEK_END<br>
SEEK_SET<br>
SEEK_SET</div>
<div><br>
</div>
<div>The "fromwhere" parameter is REALLY needed.</div>
<div><br>
</div>
<div><br>
</div>
<div>As to this code snippet,</div>
<div><br>
</div>
<div>> if(type == SEEK_CUR)<br>
> {<br>
> if(pos < -diff) // in other words, if `pos + diff` would
be negative<br>
> pos = 0;<br>
> else<br>
> pos += diff;<br>
> }</div>
<div><br>
</div>
<div>It can't be so easy.</div>
<div><br>
</div>
<div><br>
</div>
<div>Anyway the problem is solved, not in the best way.</div>
<div><br>
</div>
<div>So I think it should be patched.</div>
<div><br>
</div>
<div><br>
</div>
<div id="M2Signature">
<div>-- </div>
<div>使用Opera的电子邮件客户端:<a moz-do-not-send="true"
href="http://www.opera.com/mail/">http://www.opera.com/mail/</a></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
physfs mailing list
<a class="moz-txt-link-abbreviated" href="mailto:physfs@icculus.org">physfs@icculus.org</a>
<a class="moz-txt-link-freetext" href="http://icculus.org/mailman/listinfo/physfs">http://icculus.org/mailman/listinfo/physfs</a>
</pre>
</blockquote>
<br>
</body>
</html>