

            markf (2) --- get the current position of a file         03/25/82


            _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 file_mark function markf (fd)
                 file_des fd

                 Library:  vswtlb (standard Subsystem library)


            _F_u_n_c_t_i_o_n

                 'Markf' is used to determine the current position of an open
                 file.  The position is normally recorded and later reused by
                 'seekf' for random I/O.

                 The  single  argument  specifies  a  file  whose position is
                 desired.  The function return is ERR if the  position  could
                 not  be  determined  or if "position" has no meaning for the
                 device currently associated with the given file descriptor.


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 If necessary, 'markf' calls 'flush$' to empty the  Subsystem
                 buffer  belonging  to  the  file.  If the file is associated
                 with a terminal  device,  'tmark$'  is  called  to  get  the
                 position.   Similarly,  'dmark$'  is called if the file is a
                 disk file.  The null device is always at position zero.


            _C_a_l_l_s

                 mapsu, flush$, tmark$, dmark$


            _B_u_g_s

                 'Markf' may fail between two characters in a  line,  because
                 files  under  Primos  are  word-addressed, rather than byte-
                 addressed.  'Markf' should only be used at  word  boundaries
                 (for  binary files) or line boundaries (for standard charac-
                 ter files).


            _S_e_e _A_l_s_o

                 dmark$ (6), tmark$ (6), seekf (2)












            markf (2)                     - 1 -                     markf (2)


