printing control Characters in addch(), echochar()

printing control Characters in addch(), echochar()

Post by chol.. » Sun, 08 Aug 1999 04:00:00

 Does anyone know how to print control chacters in addch() and

  every time I print control chacters, it gives \[(something).



1. addch prints undesired character

   I am writing a program on HP-UX that has to accept a password. The
password string should be displayed as ***.. on the screen. I am using
noecho() function of curses library to set echo to off. For each
character that I receive from the user I display a '*' by using
addch('*). My piece of code roughly looks like this
void main() {


   Call a function that does some data base operation through proc code

   Get characters from the user
   addch('*'); //for each character

If the user enters password as secret. Instead of displaying ****** on
the screen, I get P*****. I don't know why this P is getting printed.
If I comment out the function that makes proc calls, then the display
part works fine. But with the proc code I always get some vague

Will anybody help me?

Thanks in advance
Sumanth G

Sent via
Before you buy.

2. How does a program get the command arguments of a process?

3. ncurses and characters safe to addch/addstr

4. funny in 'test'

5. Print control characters

6. permission settings in /dev/

7. Printing control characters to a printer with LPR

8. Make partition bootable with a kernel or bootrom?

9. Print queue control characters

10. can't print out line feed and carriage return (control character) on a network printer.

11. HP 500C -- ascii test prints OK, PostScript prints special characters

12. No cups printing system in Control Center's Printing Manager