github.com/ladydascalie/elvish@v0.0.0-20170703214355-2964dd3ece7f/sys/termios_32.go (about)

     1  // +build 386,darwin dragonfly freebsd linux netbsd openbsd
     2  
     3  package sys
     4  
     5  // The type of Termios.Lflag is different on different platforms.
     6  // This file is for those where Lflag is uint32.
     7  
     8  func setFlag(flag *uint32, mask uint32, v bool) {
     9  	if v {
    10  		*flag |= mask
    11  	} else {
    12  		*flag &= ^mask
    13  	}
    14  }