Solved

Unbuffered input, input form on VMS.

Posted on 1997-11-16
2
253 Views
Last Modified: 2010-04-15
Hello, I hope someone can help:

I would like to use an "instant response" menu for a VMS C program that I am writing. I am working on Open VMS AXP 6.1 with Dec C 4.0. The getch() type functions are not available. setvbuf with the unbuffered option does not work either. Every input function (even file I/O directed at stdin) waits for the user to press enter before the program continues. I want it to allow the user to press only one key. I even tried closing stdin and reopening it using "SYS$INPUT" as the file, then using setvbuf, but that did not work either. Unbuffered input works with Cobol programs on this system so I think it should be possible with C.
 
Also, I would really like to design a nice input form with multiple fields that would allow the user to use the arrow or tab keys to move between fields. Does anyone know of any nice headers or libraries to allow me to do this?

Any suggestions will be greatly appreciated - even if it is to tell me that it cannot be done. (or at least is not worth it for a small program) Thank you very much.

P.S.
I am a student, and I need this information for a college project that I am working on. None of the CIS Professors currently know how to do this, however, they all would like to know. So, if you know the answer, it will get a LOT of use by many future students I am sure. Thanks again.

                                     Dave                        
0
Comment
Question by:dave_c
2 Comments
 
LVL 2

Expert Comment

by:obg
ID: 1256353
I'm sorry if this is a poor answer, but you will have to use a "qiow" call. I have forgot the parameters, as the have removed the only VMS system I had access to long ago... If I where you, I'd check with my system administrator.
0
 
LVL 5

Accepted Solution

by:
julio011597 earned 100 total points
ID: 1256354
I'm afraid it is not worth a small program.

This said, you need the curses library to do what you want.
Have a look at curses(3) man page:

"The Curses package allows: overall screen, window, and pad manipulation; output to windows and pads; reading terminal input; control over terminal and Curses input and output options; environment query routines; color manipulation; use of soft label keys; terminfo database access; and access to low-level Curses routines."

BTW, you have no chance to read a single character with stdio library.

HTH, julio
0

Featured Post

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question