evap_pac(2)

NAME
evap_pac (Process Application Commands) allows you to embed evaluate_parameters in your application: it handles all user input and parameter processing. You provide the command processors and evap_pac calls them automatically. The command processors themselves call evaluate_parameters to process their command line, therefore all the benefits of using evaluate_parameters on the command line apply to your application's command processing as well. See also evap(2), evap.c(2), evap.pl(2) and evap.tcl(2).

SYNOPSIS

evap_pac Prompt InputFile Commands

DESCRIPTION

Prompt is the application's prompt string. InputFile is the application's input file. Commands is a list of application command names and command processors. The synopsis is a simple reminder of the evap_pac calling sequence; please refer to the actual C, Perl and Tcl sample code. Execute commands similar to the following to create working sample programs:
    mkdir sama
    cd sama
    ar p /usr/local/lib/libevapmm.a samples_shar01 > samples_shar01
    sh samples_shar01
    make -f Makefile.smp
    sama_c
    sama_pl
    sama_tcl
evap_pac has two builtin command processors:
  !                             - bang, execute shell commands
  display_application_commands  - list all valid commands
You should provide at least one command processor - the command to exit your application. If not, an end-of-file must be entered to exit. Once inside the application, use `display_application_commands' to see a list of valid commands for the application. Application commands can have aliases too - for instance, you can use `disac' to list valid application commands. For each command, you can specify `-?', `-brief_help' or `-full_help' to see command and parameter help information. Try `disac -full_help' to see help on `display_application_commands'. If you'd like to use evaluate_parameters as an embedded command line parser without calling evap_pac, simply set the `embed flag' TRUE before calling evaluate_parameters, as shown below:
    extern int evap_embed; evap_embed = 1; /* C */
    $evap'evap_embed = 1;                  #  Perl
    global evap_embed; set evap_embed 1;   #  Tcl
Note that setting the `embed flag' alters evaluate_parameters' exit behavior, so be sure to read the section "RETURN VALUES" in the appropriate man page.

RETURN VALUES

evap_pac() exits on end-of-file with no return code.

FILES
See the shar file `samples_shar01' in the `ar' library file /usr/local/lib/libevapmm.a.

AUTHOR
Stephen O. Lidie, lusol@Lehigh.EDU Copyright (C) 1994 - 1994, Stephen O. Lidie and Lehigh University. All rights reserved.

SEE ALSO
evap(2)
evap.c(2)
evap.pl(2)
evap.tcl(2)
evap_pac(2)
addmm,add_message_modules(1)
disci,display_command_information(1)
genmp,generate_man_page(1)
genpdt,generate_pdt(1)
gentkp,generate_tk_program(1)