# Added an explicit type for the termios constants \(\#10266\) · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/2dae860de3494f97c9477af9282fe0131ff5c4cb)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 2dae860de3494f97c9477af9282fe0131ff5c4cb

Requested commit: 2dae860de3494f97c9477af9282fe0131ff5c4cb

Commit: 2dae860de3494f97c9477af9282fe0131ff5c4cb

Tree: 85bd76fc7f54cf0a6e55435ad8e154f50e2b6e5a

Author: Zapolsky Anton

Committer: GitHub

## Message

````
Added an explicit type for the termios constants (#10266)

Adds the `tcflag_t` type to the termios constants.
This is made to allow bitwise operations on the termios
constants without an integer cast, e.g.:

```zig
var raw = try std.os.tcgetattr(std.os.STDIN_FILENO);
raw.lflag &= std.os.linux.ECHO | std.os.linux.ICANON;
```
instead of

```zig
var raw = try std.os.tcgetattr(std.os.STDIN_FILENO);
raw.lflag &= ~@intCast(u32, std.os.linux.ECHO | std.os.linux.ICANON);
```

Contributes to #10181

````

## Parents

- [282e2c714fe36480ac0a4bef38d6209737819229](https://git.cafe/gitcafe/zig/commit/282e2c714fe36480ac0a4bef38d6209737819229?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/2dae860de3494f97c9477af9282fe0131ff5c4cb?format=markdown)
