Solved

Unbuffered input, input form on VMS.

Posted on 1997-11-16
2
246 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
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 for-loops in the C programming language.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now