function read_untilstring, unit, strg
;===================================
;returns 1 if eof reached
  on_error,2
  s=''
  while (s ne strg) and (not eof(unit)) do begin 
    ;readf,unit,s
    s=readstringbig(unit)
    ;print,s
  endwhile
  if eof(unit) then return,1 else return,0
end