~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_seek.cc

Merged in Eric's whitespace cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
#include "mysys_priv.h"
17
17
 
18
 
/* 
 
18
/*
19
19
  Seek to a position in a file.
20
20
 
21
21
  ARGUMENTS
22
22
  File fd          The file descriptor
23
23
  my_off_t pos     The expected position (absolute or relative)
24
 
  int whence       A direction parameter and one of 
 
24
  int whence       A direction parameter and one of
25
25
                   {SEEK_SET, SEEK_CUR, SEEK_END}
26
26
  myf MyFlags      MY_THREADSAFE must be set in case my_seek may be mixed
27
27
                   with my_pread/my_pwrite calls and fd is shared among
29
29
 
30
30
  DESCRIPTION
31
31
    The my_seek  function  is a wrapper around the system call lseek and
32
 
    repositions  the  offset of the file descriptor fd to the argument 
 
32
    repositions  the  offset of the file descriptor fd to the argument
33
33
    offset according to the directive whence as follows:
34
34
      SEEK_SET    The offset is set to offset bytes.
35
35
      SEEK_CUR    The offset is set to its current location plus offset bytes
37
37
 
38
38
  RETURN VALUE
39
39
    my_off_t newpos    The new position in the file.
40
 
    MY_FILEPOS_ERROR   An error was encountered while performing 
 
40
    MY_FILEPOS_ERROR   An error was encountered while performing
41
41
                       the seek. my_errno is set to indicate the
42
42
                       actual error.
43
43
*/