seekf (2) --- position a file to a designated word 01/07/83 _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n integer function seekf (pos, fd[, xra]) file_mark pos file_des fd integer xra Library: vswtlb (standard Subsystem library) _F_u_n_c_t_i_o_n 'Seekf' is used to position the file pointer to a designated word. The first argument is an integer value which specifies the relative or absolute positioning value (depen- ding on the value of the third argument, 'xra'); if 'xra' equals ABS then positioning is from the beginning of the file, or if 'xra' equals REL then positioning is from the current position. The second argument is the file descrip- tor of the file whose file pointer is being manipulated. The third argument is optional. If omitted, the value ABS is assumed. The function return is OK if the positioning is successful, EOF if the end-of-the-file is reached, or ERR if 'fd' is an invalid file descriptor, if the error flag for the file is set, if the file device type is disk and 'xra' is ABS and 'pos' is negative, if the device type is terminal and 'xra' is ABS, or if the device type is terminal and 'pos' is negative. _I_m_p_l_e_m_e_n_t_a_t_i_o_n 'Seekf' first calls 'mapsu' to map any standard port descriptor it may have been passed into a file descriptor for further processing. The Primos routine MISSIN is called to determine if the 'xra' argument is missing; if so, then absolute positioning is assumed. Depending on the device type associated with the file, a device dependent driver is called: 'dseek$' (for disk) or 'tseek$' (for terminal). The device dependent drivers do the actual work of positioning. _C_a_l_l_s mapsu, dseek$, tseek$, flush$, Primos missin _B_u_g_s EOF is returned if any error occurs when reading from disk (in dseek$); the user is not informed of the true nature of the error. Do not seek to end-of-file on a terminal file; all further input from the terminal will be ignored. seekf (2) - 1 - seekf (2) seekf (2) --- position a file to a designated word 01/07/83 _S_e_e _A_l_s_o dseek$ (6), tseek$ (6), flush$ (6), mapsu (2) seekf (2) - 2 - seekf (2)