cl_proc()

Displays the choice list, passes control to the user for selection, andremoves the choice list from the screen

Call  
#include <vv_clist.h>
int cl_proc(start_item, clistp)
 
int start_item Choice list item initially highlighted
CLISTPTR clistp Choice list to process
Returns  
AC_EXIT The user selected an item from the choice list.
AC_QUIT The user quit without choosing an item from the choice list
0 Error. VV_ERR is set to one of the following:
  KWDNOTFOUND

ERRREAD

FILETOOBIG

MEMLACK

The keyword marking the choice list was not found in the memory file.

An error occurred while trying to read the memory file.

The keyworded section used by the choice list is too large to fit in the memory file.

There is insufficient memory to allocate the underlying screen image.

Description

cl_proc() calls mf_kwdset() to set the memory file to operate within the appropriate keyworded section. If the choice list is not already displayed, the choice list is placed on the screen. The starting choice list item specified in the call is initially highlighted. Next, the keyboard is scanned for user input and processed using the choice list keytable CLETP.

The user may move up or down in the choice list, quit, or select an item. If the user selects an item, the number of the item selected is transferred to the item number member of the choice list structure, and AC_EXIT is returned. If the user quits, the current item number member is left unchanged, and AC_QUIT is returned.

cl_proc() leaves the choice list on the screen if it found the choice list already displayed. If cl_proc() had to display the choice list, the choice list is removed from the screen.

If a keyword was set prior to calling this function, the memory file is restored so that it operates on the keyworded section that was active when cl_proc() was called.

Related Functions

cl_dn(), cl_rd(), cl_up()


Home Contents Previous Next