[plug] C codeing .... a question.

Anthony J. Breeds-Taurima tony at cantech.net.au
Fri Nov 27 15:23:22 WST 1998


Hello All,
	I need some help with a small C problem.

I have a perl script that I want to convert to C ...

--Snip
print "Enter your Password: --- you know you can trust me: ";
system ("/bin/stty","-echo");
chop($linein = <STDIN>);
system ("/bin/stty","echo");
print "Thank you\n";
--Snip

You get the Idea ...

Well the print and chop lines are easy (printf and scanf with the appropriate
buffers and terminating NULL's to be on the safe side)

Its the telling the terminal to "-echo" && "echo" I'm having troubles with ...
I'm sure I can do it with ncurses BUT I'd like to avoid that if at all
possible.

I'd took a stab in the dark and looked in to ioctl ... But I couldn't find
much info ... 

Can anyone point me at a good WWW site or give me a snippet of code ???



Yours Tony.



More information about the plug mailing list