Re: [PHP4BETA] cvs: /php4/ext/standard file.c
| From: | Sterling Hughes | Date: | Mon, 24 Apr 2000 14:31:38 +0000 |
| Subject: | Re: [PHP4BETA] cvs: /php4/ext/standard file.c | ||
| References: | 1 2 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-13966@lists.php.net to get a copy of this message | ||
Andrei Zmievski wrote:
>
> On Sun, 23 Apr 2000, Sterling Hughes wrote:
> > sterling Sun Apr 23 12:16:54 2000 EDT
> >
> > Modified files:
> > /php4/ext/standard file.c
> > Log:
> > @-Add an optional third argument to fseek to indicate were to seek from. (Sterling)
>
> That's not what I think fseek's third argument should be. It needs to
> provide SEEK_SET, SEEK_CUR, SEEK_END constants and use those. I'll
> change it.
>
> -Andrei
>
I think all that needs to be done is to register the constants. If you
use the third argument (in the C code), then the only thing that can be
used are SEEK_SET, SEEK_CUR and SEEK_END. Whereas with this
implementation SEEK_SET, SEEK_CUR and SEEK_END will all work, because
fseek((FILE *)what, (*arg2)->value.lval, SEEK_CUR);
is the same as:
fseek((FILE *)what, (*arg2)->value.lval + SEEK_CUR, SEEK_SET);
And you can also specify offsets which are not SEEK_CUR, SEEK_SET and
SEEK_END (I couldn't do this by using seekfrom as the third argument.)
-Sterling
-Sterling