LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 947|回复: 2

Need your help---about programming with c

[复制链接]
发表于 2003-7-8 14:33:10 | 显示全部楼层 |阅读模式
Hi,I need your help
I am developing a program which need input password under text mode.I have seached a little from a book,but it did not mention of how to input a string without ouputting.
I get the struct is :
struct termios
{
tcflag_t c_iflag;
tcfalg_t c_oflag;
  ///c_oflag   I think I should set some value here,but I do know what should I set
tcfalg_t c_cflag;
.....
}
by the way,I do not want to invoke system("stty -cho");
OK,help me ,please
发表于 2003-7-8 19:04:48 | 显示全部楼层
c_lflag &=~ECHO;
c_lflag |=ECHONL;
 楼主| 发表于 2003-7-10 22:17:06 | 显示全部楼层
谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表