home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource3 / 121_01 / fseek.doc < prev    next >
Encoding:
Text File  |  1985-08-21  |  1.9 KB  |  69 lines

  1.  
  2.  
  3.      FSEEK (2)                 BDS C Users' Group                 FSEEK (2)
  4.  
  5.  
  6.  
  7.  
  8.      NAME   
  9.      NAME 
  10.           fseek - routines required by more 
  11.  
  12.  
  13.      SYNOPSIS   
  14.      SYNOPSIS 
  15.           fseek     
  16.           fseek() 
  17.           ftell     
  18.           ftell() 
  19.  
  20.  
  21.      DESCRIPTION   
  22.      DESCRIPTION 
  23.           _____                                                     
  24.           Fseek consists of two routines: fseek and ftell.  These 
  25.           provide Unix-like facilities for character seek & positional 
  26.           query to BDS C programs.  
  27.           Fseek is called with 3 arguments: filedesc, position, and 
  28.           code.  Filedesc is the I/O buffer pointer, position is an 
  29.           int saying where we want to be, and code tells how to 
  30.           interpret position: 
  31.                0     absolute, characters
  32.                1     relative, characters
  33.                2     from end, characters
  34.                3     absolute, sectors
  35.                4     relative, sectors
  36.                5     from end, sectors
  37.           Ftell is called with one argument, the filedesc (I/O buffer 
  38.           pointer).  It returns the current position in th file.  
  39.  
  40.  
  41.      CAVEATS   
  42.      CAVEATS 
  43.           This program was tested with v1.50 of the BDS C compiler 
  44.           under CP/M 2.2.  It should work with other versions of BDS C 
  45.           and CP/M, but has not been tested.  
  46.  
  47.  
  48.      EXAMPLES   
  49.      EXAMPLES 
  50.           fseek(file,0,0)     seeks to the beginning of the file
  51.  
  52.  
  53.      BUGS   
  54.      BUGS 
  55.           Codes 2 and 5 for fseek are not implemented although they 
  56.           exist in Unix V6.  The routine returns ERROR if called with 
  57.           code 2 or 5.  
  58.  
  59.  
  60.      NOTES   
  61.      NOTES 
  62.           Used in more.c.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.                                       -1-
  85.  
  86.  
  87.      0     absolute, characters
  88.                1     relative, characters
  89.