Re: [PHP4BETA] cvs: /php4/ext/standard file.c

From: Date: Mon, 24 Apr 2000 14:53:18 +0000
Subject: Re: [PHP4BETA] cvs: /php4/ext/standard file.c
References: 1 2 3 4  Groups: php.version4 
Request: Send a blank email to php-version4+get-13970@lists.php.net to get a copy of this message
Andrei Zmievski wrote: > > 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 > > Never mind, your right. SEEK_CUR is defined on my system #define SEEK_CUR 2 And I somehow doubt that 2 is going to be the current position in the file all of the time. Sterling

« previous php.version4 (#13970) next »