]> Dogcows Code - chaz/tar/commitdiff
(rmt_lseek__): Convert lseek whence values to portable integers on the wire.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 2 Jul 1999 21:25:09 +0000 (21:25 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 2 Jul 1999 21:25:09 +0000 (21:25 +0000)
src/rtapelib.c

index c9cd90e6010471966ad2e139478e5a703ff18383..0afdec9716f05c4ff2cc6e8064a8430174407075 100644 (file)
@@ -586,6 +586,14 @@ rmt_lseek__ (int handle, off_t offset, int whence)
   if (offset < 0)
     *--p = '-';
 
+  switch (whence)
+    {
+    case SEEK_SET: whence = 0; break;
+    case SEEK_CUR: whence = 1; break;
+    case SEEK_END: whence = 2; break;
+    default: abort ();
+    }
+
   sprintf (command_buffer, "L%s\n%d\n", p, whence);
 
   if (do_command (handle, command_buffer) == -1)
This page took 0.024958 seconds and 4 git commands to generate.