Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Test for seekability?

Reply
Thread Tools

Test for seekability?

 
 
Steve
Guest
Posts: n/a
 
      10-19-2003

It seems that the return values of fseek() and ftell() are undefined for
non-seekable devices. So is there any way to test whether a stream is
seekable?

 
Reply With Quote
 
 
 
 
Irrwahn Grausewitz
Guest
Posts: n/a
 
      10-19-2003
Steve <> wrote:

>It seems that the return values of fseek() and ftell() are undefined for
>non-seekable devices. So is there any way to test whether a stream is
>seekable?


The return values of fseek and ftell are well defined:

fseek() returns nonzero for a request that cannot be satisfied.

ftell() function returns -1L on failure and stores an implementation-
defined positive value in errno.

You may use these to determine if you can set/get the file position
indicator for a stream.

Regards
--
Irrwahn
()
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
test test test richard Computer Support 3 01-24-2007 05:18 AM
TEST TEST Test...Blah Blah Blah generalbatguano@pacbell.net Computer Support 2 09-15-2006 03:47 AM
TEST TEST Test...Blah Blah Blah Generalbatguano@pacbell.net Computer Support 6 09-13-2006 01:53 AM
TEST TEST TEST Gazwad Computer Support 2 09-05-2003 07:32 PM
test test test test test test test Computer Support 2 07-02-2003 06:02 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57