Solved

Unbuffered input, input form on VMS.

Posted on 1997-11-16
2
255 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
memory leak detection 9 111
valid enum? 6 81
smtp c source code 7 132
How to install SVN Command Line Client? 5 131
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…
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.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
Suggested Courses

737 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