code: func SaveState(fd uintptr) (*State, error) {
  	var oldState State
  	if err := tcget(fd, &oldState.termios); err != 0 {
  		return nil, err
  	}
  
  	return &oldState, nil
  }
docs: // SaveState saves the state of the terminal connected to the given file descriptor.