From: Paul Eggert Date: Fri, 2 Jul 1999 21:25:09 +0000 (+0000) Subject: (rmt_lseek__): Convert lseek whence values to portable integers on the wire. X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=db6dc02fa83b1010e02e67472ae22c61542a7ba8;p=chaz%2Ftar (rmt_lseek__): Convert lseek whence values to portable integers on the wire. --- diff --git a/src/rtapelib.c b/src/rtapelib.c index c9cd90e..0afdec9 100644 --- a/src/rtapelib.c +++ b/src/rtapelib.c @@ -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)