

            svrest (2) --- restore shell variables from a file       05/27/83


          | _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

          |      integer function svrest (file, trace)
          |      character file (ARB)
          |      bool trace

          |      Library:  vshlib (shell routine library)


          | _F_u_n_c_t_i_o_n

          |      'Svrest'  takes  a  file written by 'svsave' and attempts to
          |      merge the variables in the file with those  on  the  current
          |      lexic  level.  Variables already in existence at the current
          |      level will not be replaced.  'File' is the name of the  file
          |      containing  the  'svsave'd  variables.   If  'trace' is set,
          |      'svrest' produces a trace of the restoration  consisting  of
          |      each variable followed by its value printed on the terminal.
          |      The function returns ERR if the file cannot be read or if it
          |      is misformatted; otherwise, the function returns OK.


          | _I_m_p_l_e_m_e_n_t_a_t_i_o_n

          |      If  the  file  cannot  be  opened then 'svrest' returns ERR,
          |      otherwise it reads pairs of lines containing the  names  and
          |      values  of  the  variables.   For  each pair of the lines it
          |      calls 'svmake' to merge  the  variables  with  the  existing
          |      ones.   If it reads a name without a corresponding value, it
          |      closes the file and returns ERR.


          | _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d

          |      none


          | _C_a_l_l_s

          |      close, open, print, svmake


          | _S_e_e _A_l_s_o

          |      other sv?* routines (2)













            svrest (2)                    - 1 -                    svrest (2)


