<commit_before>// Copyright 2015-2017 the u-root Authors. All rights reserved
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package main

import (
	"fmt"
	"io"
	"log"
	"reflect"
	"strconv"

	"golang.org/x/sys/unix"
)

type (
	// tty is an os-independent version of the combined info in termios and window size structs.
	// It is used to get/set info to the termios functions as well as marshal/unmarshal data
	// in JSON formwt for dump and loading.
	tty struct {
		Ispeed int
		Ospeed int
		Row    int
		Col    int
		Line   int
		Min    int
		Time   int

		CC map[string]uint8

		Opts map[string]bool
	}
)

func gtty(fd int) (*tty, error) {
	term, err := unix.IoctlGetTermios(fd, unix.TCGETS)
	if err != nil {
		return nil, err
	}
	w, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
	if err != nil {
		return nil, err<commit_msg>cmds/stty: remove unused members from tty struct<commit_after>// Copyright 2015-2017 the u-root Authors. All rights reserved
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package main

import (
	"fmt"
	"io"
	"log"
	"reflect"
	"strconv"

	"golang.org/x/sys/unix"
)

type (
	// tty is an os-independent version of the combined info in termios and window size structs.
	// It is used to get/set info to the termios functions as well as marshal/unmarshal data
	// in JSON formwt for dump and loading.
	tty struct {
		Ispeed int
		Ospeed int
		Row    int
		Col    int

		CC map[string]uint8

		Opts map[string]bool
	}
)

func gtty(fd int) (*tty, error) {
	term, err := unix.IoctlGetTermios(fd, unix.TCGETS)
	if err != nil {
		return nil, err
	}
	w, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
	if err != nil {
		return nil, err
{'fraction_non_alphanumeric': 0.0945945945945946, 'fraction_numerical': 0.010135135135135136, 'mean_word_length': 3.0294784580498866, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1416463', 'n_tokens_mistral': 687, 'n_tokens_neox': 639, 'n_words': 239}