home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 400-499 / ff473.lzh / CNewsSrc / cnews_src.lzh / man / fgetmfs.man < prev    next >
Text File  |  1991-01-05  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4. FGETMFS(3)             C LIBRARY FUNCTIONS             FGETMFS(3)
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      fgetmfs - read an arbitrarily long, possibly continued line
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ffffggggeeeettttmmmmffffssss....hhhh>>>>
  14.  
  15.      cccchhhhaaaarrrr ****ffffggggeeeettttmmmmffffssss((((ssssttttrrrreeeeaaaammmm,,,, lllliiiimmmmiiiitttt,,,, ccccoooonnnntttt))))
  16.      FFFFIIIILLLLEEEE ****ssssttttrrrreeeeaaaammmm;;;;
  17.      iiiinnnntttt lllliiiimmmmiiiitttt,,,, ccccoooonnnntttt;;;;
  18.  
  19.      cccchhhhaaaarrrr ****ffffggggeeeettttmmmmssss((((ssssttttrrrreeeeaaaammmm))))
  20.      FFFFIIIILLLLEEEE ****ssssttttrrrreeeeaaaammmm;;;;
  21.  
  22.      cccchhhhaaaarrrr ****ccccffffggggeeeettttmmmmssss((((ssssttttrrrreeeeaaaammmm))))
  23.      FFFFIIIILLLLEEEE ****ssssttttrrrreeeeaaaammmm;;;;
  24.  
  25. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  26.      _F_g_e_t_m_f_s reads an arbitrarily long line from _s_t_r_e_a_m, allocat-
  27.      ing  memory  via  _m_a_l_l_o_c(3)  as  needed.   If  _l_i_m_i_t is non-
  28.      negative, _f_g_e_t_m_f_s will read no more than  _l_i_m_i_t  bytes  from
  29.      _s_t_r_e_a_m.   For  efficiency,  if  _c_o_n_t is not _C_O_N_T__N_O, such as
  30.      _C_O_N_T__N_O_S_P_C or _C_O_N_T__S_P_C, occurrences of  a  backslash  and  a
  31.      newline  together and in that order will be deleted from the
  32.      input stream; if _c_o_n_t is _C_O_N_T__N_O_S_P_C,  any  whitespace  after
  33.      the  newline  in  the input stream will also be deleted from
  34.      it.
  35.  
  36.      The  macros  _f_g_e_t_m_s  (to  read  without  continuations)  and
  37.      _c_f_g_e_t_m_s  (to read with continuations and remove leading whi-
  38.      tespace) should be  used  instead  when  the  _l_i_m_i_t  is  not
  39.      needed.
  40.  
  41.      _F_g_e_t_m_f_s is intended to  provide  a  reliable  mechanism  for
  42.      reading  input  containing lines of arbitrary length, rather
  43.      than trusting that no line with be longer  than  some  arbi-
  44.      trary tolerance.
  45.  
  46.      The memory returned by _f_g_e_t_m_f_s should be  returned  when  no
  47.      longer needed via _f_r_e_e(3).
  48.  
  49. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  50.      _m_a_l_l_o_c(3), _f_g_e_t_s(3)
  51.  
  52. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  53.      Returns NULL (0) if memory cannot be allocated or upon read-
  54.      ing end-of-file; use _f_e_o_f(_s_t_r_e_a_m) to distinguish.
  55.  
  56. HHHHIIIISSSSTTTTOOOORRRRYYYY
  57.      Written by Geoff Collyer at the  University  of  Toronto  as
  58.      part of the C news project.
  59.  
  60.  
  61.  
  62.  
  63. Sun Microsystems       Last change: local                       1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. FGETMFS(3)             C LIBRARY FUNCTIONS             FGETMFS(3)
  71.  
  72.  
  73.  
  74. BBBBUUUUGGGGSSSS
  75.      It's too slow.
  76.      The meaning of the _c_o_n_t flag is ugly, but layering this form
  77.      of continuation on top is even slower.
  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. Sun Microsystems       Last change: local                       2
  130.  
  131.  
  132.  
  133.