English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Unix.lseek versus Pervasives.pos
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-03-17 (22:46)
From: Shivkumar Chandrasekaran <shiv@e...>
Subject: [Caml-list] Unix.lseek versus Pervasives.pos

Currently I am trying to handle "LargeFiles" while marshalling caml 
values and I have run into this incidental problem (nothing to do with 
LargeFile). If I open a file with "open_out_bin", write to it using 
"output_value" and then try to determine the position in the file using 
"pos", I get the correct value. However, if I use Unix.lseek thus

Unix.lseek (Unix.descr_of_out_channel fd_out) 0 Unix.SEEK_CUR

I get a different value (so far always 0) than the one I get from

pos fd_out

The manual does not seem to help. Any advice will be appreciated. 


To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners