Operating System - HP-UX
1832853 Members
3011 Online
110047 Solutions
New Discussion

Re: CUE is written in what language?

 
SOLVED
Go to solution
Chua Wen Ching
Regular Advisor

CUE is written in what language?

Hello, i really need some help. As you can i am a student studying in my college where they are using HP-UX 10.20. Dumb terminals with keyboard only. No color but monochrome monitors. For my final project, i want to create a Unix application like Character Terminal User Environment (CUE) interface where you can use the arrow keys and tab keys. CUE doesn't look like c shell (curses), bourne shell or korn shell. Can anyone tell me what it is written with so i can make a research on it. Please view the attachment for the CUE sample source code. Use wordpad to view it in windows. Thank you for your help.
wenching
7 REPLIES 7
harry d brown jr
Honored Contributor
Solution

Re: CUE is written in what language?


Actually it looks very pascal'ish, but I believe it's just a configuration type file for CUE.

good luck!

live free or die
harry
Live Free or Die
Chua Wen Ching
Regular Advisor

Re: CUE is written in what language?

PASCAL? What is a configuration file for? Is there any solution for me to create something like CUE interface. As you know the hp-ux 10.20 that my org use does have any x windows because they have only monochrome monitors. But i don't want to do with cobol or even pascal. Can bourne shell do something like using arrow keys or even tab. Can tput command do that? Anyway thanks for your help. Thank you.
wenching
Bill Hassell
Honored Contributor

Re: CUE is written in what language?

To write a menuing program, I would suggest using a POSIX shell, not Bourne. On HP-UX, the Bourne shell is very hard to find (/usr/old/bin/sh). You may be confusing the Bourne shell with /usr/bin/sh which is the HP-UX POSIX shell with virtually identical features as found in Korn shell and BASH.

The tput interface is perfect for handling a huge variety of character-mode terminals. NOTE: there is no ASCII character for arrow keys--these are preprogrammed by the terminal to either: execute locally and send nothing to the computer, or with an special-key enabling sequence, the arrow keys will transmit 2 or more characters with each keystroke. This is how vi enables the arrow keys to move around the screen.

tput is an interface to the terminfo database (man terminfo and man tput) which is based on the Curses library of terminal controls. For multi-character sequences, there is a special handler in the datacomm driver that knows the two characters were sent very close to each other. This allows the 2 characters to be treated separately or as a pair, depending on how much time occurred between characters.

tput handles output, sensing and input conditions based on the terminfo man page.


Bill Hassell, sysadmin
Chua Wen Ching
Regular Advisor

Re: CUE is written in what language?

So POSIX Shell can do cursors. I will look forward on how to code in POSIX. Anyway i quite confuse does a vi editor uses tput to do curses? How does a vi editor enable cursor/curses? I am able to make the cursor at a selected position, reverse video - use video or echo "ctrl + v + esc ...". But i want my unix application with some advanced interface like drop down menu (like CUE interface). Is there more hints on learning curses / cursor in POSIX? Thank you for your help and reply.
wenching
Bill Hassell
Honored Contributor

Re: CUE is written in what language?

The POSIX shell (and ksh and bash, etc) do not know anythihng about the Curses library. It is the use of the tput command that allows a script to access terminal features--tput uses the Curses library.

The vi editor is written in the C language and calls the Curses library routines directly.

Now for fancy features like a drop down menu, you will have to code a very large number of steps. Your script will be very lengthy (1000's of lines) to read each character you type, trap the cursor position, remember what was on the screen, rewrite specific areas of the screen, monitor the selection and then restore the missing screen elements when the menu disappears.

You may have to compromise on your menu system to design a simpler interface.


Bill Hassell, sysadmin
Chua Wen Ching
Regular Advisor

Re: CUE is written in what language?

Actually i willing to code for 1000++ code as long that i can get distinction for my project. As long someone can willing to give me more hints on the script used. I tried to man terminfo and i found that there are many function to do cursus. Can i not implement the functions in C but in POSIX. Can tput command call the function? Thank you for your help.
wenching
Chua Wen Ching
Regular Advisor

Re: CUE is written in what language?

No other solutions to create drop down menu or scroll bar using bourne shell programming. Can i use the tput command to call the curses function. I saw a sample c code where it uses tputs(curses function). Can it be done in bourne shell. Or can i create the drop down menu in C and integrate it into bourne shell programming. I only worried bourne and c cannot integrate properly as i wanted. Anyway thank you for your help.
wenching