home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / ixemul-39.47-env-bin.lha / man / cat3 / fseek.0 < prev    next >
Text File  |  1993-12-07  |  4KB  |  133 lines

  1.  
  2. FSEEK(3)                   UNIX Programmer's Manual                   FSEEK(3)
  3.  
  4. NNAAMMEE
  5.      ffggeettppooss, ffsseeeekk, ffsseettppooss, fftteellll, rreewwiinndd - reposition a stream
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<ssttddiioo..hh>>
  9.  
  10.      _i_n_t
  11.      ffsseeeekk(_F_I_L_E _*_s_t_r_e_a_m, _l_o_n_g _o_f_f_s_e_t, _i_n_t _w_h_e_n_c_e)
  12.  
  13.      _l_o_n_g
  14.      fftteellll(_F_I_L_E _*_s_t_r_e_a_m)
  15.  
  16.      _v_o_i_d
  17.      rreewwiinndd(_F_I_L_E _*_s_t_r_e_a_m)
  18.  
  19.      _i_n_t
  20.      ffggeettppooss(_F_I_L_E _*_s_t_r_e_a_m, _f_p_o_s___t _*_p_o_s)
  21.  
  22.      _i_n_t
  23.      ffsseettppooss(_F_I_L_E _*_s_t_r_e_a_m, _f_p_o_s___t _*_p_o_s)
  24.  
  25. DDEESSCCRRIIPPTTIIOONN
  26.      The ffsseeeekk() function sets the file position indicator for the stream
  27.      pointed to by _s_t_r_e_a_m. The new position, measured in bytes, is obtained by
  28.      adding _o_f_f_s_e_t bytes to the position specified by _w_h_e_n_c_e. If _w_h_e_n_c_e is set
  29.      to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to the start
  30.      of the file, the current position indicator, or end­of­file, respective­
  31.      ly.  A successful call to the ffsseeeekk() function clears the end­of­file in­
  32.      dicator for the stream and undoes any effects of the ungetc(3) function
  33.      on the same stream.
  34.  
  35.      The fftteellll() function obtains the current value of the file position indi­
  36.      cator for the stream pointed to by _s_t_r_e_a_m.
  37.  
  38.      The rreewwiinndd() function sets the file position indicator for the stream
  39.      pointed to by _s_t_r_e_a_m to the beginning of the file.  It is equivalent to:
  40.  
  41.            (void)fseek(stream, 0L, SEEK_SET)
  42.  
  43.      except that the error indicator for the stream is also cleared (see
  44.      clearerr(3)).
  45.  
  46.      The ffggeettppooss() and ffsseettppooss() functions are alternate interfaces equivalent
  47.      to fftteellll() and ffsseeeekk() (with whence set to SEEK_SET ), setting and stor­
  48.      ing the current value of the file offset into or from the object refer­
  49.      enced by _p_o_s. On some (non­UNIX) systems an ``_f_p_o_s___t'' object may be a
  50.      complex object and these routines may be the only way to portably reposi­
  51.      tion a text stream.
  52.  
  53. RREETTUURRNN VVAALLUUEESS
  54.      The rreewwiinndd() function returns no value.  Upon successful completion,
  55.      ffggeettppooss(), ffsseeeekk(), ffsseettppooss() return 0, and fftteellll() returns the current
  56.      offset.  Otherwise, -1 is returned and the global variable errno is set
  57.      to indicate the error.
  58.  
  59. EERRRROORRSS
  60.      [EBADF]   The _s_t_r_e_a_m specified is not a seekable stream.
  61.  
  62.      [EINVAL]  The _w_h_e_n_c_e argument to ffsseeeekk() was not SEEK_SET, SEEK_END, or
  63.                SEEK_CUR.
  64.  
  65.  
  66.      The function ffggeettppooss(), ffsseeeekk(), ffsseettppooss(), and fftteellll() may also fail and
  67.      set _e_r_r_n_o for any of the errors specified for the routines fflush(3),
  68.      fstat(2),  lseek(2),  and malloc(3).
  69.  
  70. SSEEEE AALLSSOO
  71.      lseek(2)
  72.  
  73. SSTTAANNDDAARRDDSS
  74.      The ffggeettppooss(), ffsseettppooss(), ffsseeeekk(), fftteellll(), and rreewwiinndd() functions con­
  75.      form to ANSI C3.159­1989 (``ANSI C'').
  76.  
  77. BSD Experimental                 June 29, 1991                               2
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.