// Open connects to the existing window with the given id.
// If ctl is non-nil, Open uses it as the window's control file
// and takes ownership of it.

Open connects to the existing window with the given id.
If ctl is non-nil, Open uses it as the window's control file
and takes ownership of it.
// Open connects to the existing window with the given id . // If ctl is non - nil Open uses it as the window ' s control file // and takes ownership of it .
func Open(id int, ctl *client.Fid) (*Win, error) {
	fsysOnce.Do(mountAcme)
	if fsysErr != nil {
		return nil, fsysErr
	}
	if ctl == nil {
		var err error
		ctl, err = fsys.Open(fmt.Sprintf("%d/ctl", id), plan9.ORDWR)
		if err != nil {
			return nil, err
		}
	}
	w := new(Win)
	w.id = id
	w.ctl = ctl
	w.next = nil
	w.prev = last
	if last != nil {
		last.next = w
	} else {
		windows = w
	}
	last = w
	return w, nil
}
func Open ( id int , ctl * client . Fid ) ( * Win , error ) { fsysOnce . Do ( mountAcme ) if fsysErr != nil { return nil , fsysErr } if ctl == nil { var err error ctl , err = fsys . Open ( fmt . Sprintf ( " " , id ) , plan9 . ORDWR ) if err != nil { return nil , err } } w := new ( Win ) w . id = id w . ctl = ctl w . next = nil w . prev = last if last != nil { last . next = w } else { windows = w } last = w return w , nil }
Open connects to the existing window with the given id.
Open connects to the existing window with the given id .