Re: [PHP4BETA] cvs: /php4/ext/standard file.c
| From: | Andrei Zmievski | Date: | Mon, 24 Apr 2000 14:35:23 +0000 |
| Subject: | Re: [PHP4BETA] cvs: /php4/ext/standard file.c | ||
| References: | 1 2 3 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-13968@lists.php.net to get a copy of this message | ||
On Mon, 24 Apr 2000, Sterling Hughes wrote:
> 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.)
No, that will not work. What will you have as the value for SEEK_CUR?
SEEK_CUR should be simply a constant that maps to C's fseek().
-Andrei
"Music expresses that which can not be said
and on which it is impossible to be silent."
-Victor Hugo