01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SHFORM (I) {AT&T UNIX PC only ) SHFORM (I)<br />

NAME shform - displays menus and forms and returns user input to<br />

Bourne Shell procedures.<br />

SYNOPSIS<br />

RET = 'shform [-u] formname'<br />

DESCRIPTION<br />

The shform process displays a menu or form, waits for user input,<br />

and returns the result to the shell procedure.<br />

Formname is a text document, called a form description file, that<br />

describes the menu or form to be displayed. Entries in the file use<br />

a keyword = value syntax. (The form and menu keywords are<br />

described below.) The file must be located in the fusrflibfua<br />

directory. To insert a comment in the file, start the line with a<br />

pound sign ( # ).<br />

The value returned by the file is stored in the shell variable RET<br />

as a list of words separated by spaces. If an error occurs, then $?<br />

will contain an error code.<br />

-u causes shform to place its menu or form in the current window,<br />

resizing it appropriately to fix the menu or form. This option is<br />

recommended.<br />

Shform returns the following exit codes:<br />

0-AOK<br />

1 - Argument error<br />

2 - Out of memory (malloc failed)<br />

3 - Internal table overflow<br />

4 - Syntax error in form description file<br />

The words in $RET are as follows:<br />

word 1 = Name of terminating key<br />

if form, words 2 -n = Values of the form's fields<br />

if menu, word 2 = Name of selected menu item<br />

if multiselect menu, words 2 - n = Name of selected<br />

menu items<br />

Form Definition Keywords<br />

Form = form name<br />

Flags the start of a form. It is followed by a series of field<br />

definitions. The form name specified here is used as the<br />

title of the form. Only one Form keyword can be used in<br />

the file.<br />

Name = field name<br />

Follows a Form keyword and starts a field definition. The<br />

field name specified here is used as the prompt for the<br />

field. The field name definition is followed by field attribute<br />

definitions:<br />

Prompt = prompt string<br />

Displayed on the prompt line when the field is the current<br />

field.<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!