📄 exprompt.1
字号:
.\" Copyright (c) 1986-1990 Entropic Speech, Inc..\" Copyright (c) 1991 Entropic Research Laboratory, Inc.; All rights reserved.\" @(#)exprompt.1 1.16 01 Apr 1997 ESI/ERL.ds ]W (c) 1991 Entropic Research Laboratory, Inc..TH EXPROMPT 1\-ESPS 01 Apr 1997.SH "NAME"exprompt \- interactive ESPS parameter entry in a pop-up window.SH "SYNOPSIS".B exprompt[.BI \-P.I param_file] [.B \-n] [.BI \-c.I checkfile] [.BI\-h.I help_name] [.B \-z] [ .BI \-X " x_pos"] [ .BI \-Y " y_pos"] [.BI \-x.I debug_level]param_out.SH "DESCRIPTION".PP\fIExprompt\fP is an X Windows program that displays an interactiveform for entering ESPS parameters and produces a new parameter file(for use in subsequent processing) based on the user's entries. \fIexpromptrun\fP(1\-\s-1ESPS\s+1) runs an ESPS program (after prompting for parameters)..PP\fIExprompt\fR processes the ESPS parameter file \fIparam_file \fP and(optionally) ESPS Common. It then pops up a window containing anentry for each of the indefinite paramaters in \fIparam_file\fP(parameters with values assigned using the "?=" operator). Each suchentry has the name of the parameter and a space for filling in thedesired value. Default values from the parameter file are filled ininitially. If a prompt string was included in the parameter file, thestring is displayed above the corresponding parameter entry..PPIf the parameter definition in the parameter file includes theoptional set of discrete choices, the window entry for the parametercontains a set of screen buttons, one for each choice \- the userselects the parameter value by clicking with the mouse on the desiredchoice. If discrete choices were not provided in the parameter file,the window entry for the parameter contains space in which the usercan type the desired value..PPBefore displaying the interactive window, \fIexprompt\fP creates theoutput parameter file \fIparam_out\fP, and fills it with definitionsfor all of the parameters in \fIparam_file\fP and ESPS Common (if Common is processed). The initial values in \fIparam_out\fP arethe default values from \fIparam_file\fP, perhaps modified by Commonprocessing. .PPWhenever the user enters a valid new value for a parameter in the\fIexprompt\fP window (by typing a value and then RETURN, or bypushing a selection button), the output file \fIparam_file\fP isupdated. Input parameters are checked for data type format. Iflimits are provided for numeric parameters in the parameter file, thelimits are checked. In some applications, it is convenient to leavethe \fIexprompt\fP window up while some other program makes use of the updated parameter file (e.g., the user might type a command in a shell window). Note that, while the \fIexprompt\fPwindow remains up, \fIparam_file\fP will not be updated with atyped-in value unless a RETURN is typed. .PPTwo or three screen buttons are provided in a panel at the top of the\fIexprompt\fP window. The button DEFAULTS reverts all parametervalues to the defaults that were in the parameter file (as updated byCommon). The button DONE causes \fIexprompt\fP to write all theparameter values (even if a RETURN hasn't been typed in an entryfield) and exit. Use this when you have finished entering values.The state of the output parameter file will correspond to the state ofthe window when DONE is selected..PPIf the \fB\-h\fP option was used, a HELP button is also provided.Selecting it causes a help file to be displayed in a text window. If the \fIhelp_name\fP specified with \fB\-h\fP has a leading "." or"/", it is interpreted as the path to a pure ASCII file containinghelp information. If there is no leading "." or "/", \fIhelp_name\fPis interpreted as the name of an ESPS program for which the parametersare intended. In this case, HELP presents a copy of the correspondingESPS manual page in a text window. (To obtain it, \fIeman\fP is runand the output is stripped of format control strings.) In both cases,the text window includes a FIND button to facilitate string searching..PPIf the user does not exit via the "DONE" button (e.g., a window-managerquit operation is used, an explicit kill signal is sent to the process, etc.), \fIexprompt\fP deletes \fIparam_out\fP before exiting. An error message is output in this case provided that \-\fBz\fP is not used. .PP\fIexprompt\fP exits with status 0 if the parameter file was readsuccessfully, the user exited via the "DONE" button, and allparameters were written successfully. If there was trouble processingthe input parameter file, \fIexprompt\fP exits with status 1. If theuser exits via the "DONE" button but the parameters were not writtensuccessfully, \fIexprompt\fP exits with status 2. If \fIexprompt\fPexits for other reasons, the exit status is 3; the most common reasonsare inability to create a window in the first place, a window-managerquit operation, or an explicit kill signal. .SH OPTIONS.PPThe following options are supported:.TP.BI \-P " param_file" " \fR[params]\fP"Specifies the name of the ESPS parameter file to process. If you wantto force the parameter to come only from ESPS common, use "\fB\-P\fP/dev/null". .TP.BI \-n Do not process ESPS Common (i.e., always get the parameter value fromthe file specified by the \fB\-P\fP option). (Within \fIexprompt\fP, theeffect of \fB\-n\fP is to have \fIread_params\fP (3\-\s-1ESPS\s+1)called with the SC_NOCOMMON flag.) Note also that Common processing can also be disabled by setting the unix environment variableUSE_ESPS_COMMON to "off". It is an error to specify both \fB\-n\fP and\fB\-c\fP. .TP.BI \-c " checkfile"If the ESPS Common file exists, this option specifies that the Commonfile should be processed only if the \fIcheckfile\fP matches the valueof the \fIfilename\fP in the Common file. This option will have noeffect if the unix environment variable USE_ESPS_COMMON is "off". Itis an error to specify both \fB\-n\fP and \fB\-c\fP..TP.BI \-h " help_name"Causes a HELP button to be provided in the \fIexprompt\fP window.Selecting this button brings up a help file in a text window. If\fIhelp_name\fP has a leading "." or "/", it is interpreted as thepath to a pure ASCII file containing help information. If there is noleading "." or "/", \fIhelp_name\fP is interpreted as the name of anESPS program for which the parameters are intended. In this case,HELP presents a copy of the corresponding ESPS manual page in a textwindow. (To obtain it, \fIeman\fP is run and the output is strippedof format control strings.) In both cases, the text window includes aFIND button to facilitate string searching..TP.B \-zSpecifies that \fIexprompt\fP operate silently; conditions such as "noparameters", "no indefinite paramters", "exit without DONE", etc. arenot reported..TP .BI \-X " x_pos"Specifies the x-position (in the root window) of the frame displayedby \fIexprompt\fP. Both \fIx_pos\fP and \fIy_pos\fP must be specifiedand be non-negative; otherwise, the positioning will be left up to thewindow manager. The standard XView \fB-Wp\fP and standard X11\fB-geometry\fP options can also be used to position the window. .TP .BI \-Y " y_pos"Specifies the y-position (in the root window) of the frame displayedby \fIexprompt\fP. Both \fIx_pos\fP and \fIy_pos\fP must be specifiedand be non-negative; otherwise, the positioning will be left up to thewindow manager. The standard XView \fB-Wp\fP and standard X11\fB-geometry\fP options can also be used to position the window. .TP.BI \-x " debug_level \fR[0]\fP"If \fIdebug_level\fP is positive,.I expromptoutputs debugging messages. The messages proliferate as .I debug_level increases. For level 0, there is no output..SH "ESPS PARAMETERS".PPThe ESPS parameter file specified by the \fB\-P\fP option is processedonly to obtain parameter specifications. In this respect,\fIexprompt\fP is quite different from most other ESPS programs, whichuse the parameter file to pass parameter values that control theoperation of the program..SH ESPS HEADERS.PPNo ESPS files are processed by \fIexprompt\fP..SH ESPS COMMON.PPParameter processing by \fIexprompt\fP follows standard ESPSconventions: Unless the parameter value is overridden by the value inESPS Common, the default value displayed by \fIexprompt\fP is the valuefrom the parameter file \fIparam_file\fP. This default value will beoverridden by the value in Common (if the Common file exists andcontains a value for the parameter), provided that ESPS Commonprocessing is enabled and that the Common file is younger than theparameter file. If a \fIcheckfile\fP is specfied by means of the\fB\-c\fP option, the parameter file value for \fIparam_name\fP will beoverridden by the value in Common only if \fIcheckfile\fP is identicalto the \fIfilename\fP entry in the Common file..PPESPS Common processing is enabled unless the unix environment variableUSE_ESPS_COMMON is "off" or the \fB\-n\fP is specified. The defaultESPS Common file is .espscom in the user's home directory. This maybe overridden by setting the environment variable ESPSCOM to thedesired path. User feedback from parameter and Common file processing(by the library \fIread_params\fP and \fIgetsym\fP functions) isdetermined by the environment variable ESPS_VERBOSE, with 0 causing nofeedback and increasing levels causing increasingly detailed feedback.If ESPS_VERBOSE is not defined, a default value of 3 is assumed..PPIt is an error to give both \fB\-n\fP and \fB\-c\fP..SH EXAMPLES.PP\fIExprompt\fP is used to create parameter files interactively, withthe output file intended as the parameter file for some ESPSprocessing program. This is particularly useful in writing shellscripts. For example, the sequence .nf exprompt \-h fft \-P/usr/esps3/lib/Pfft fft.params fft \-P fft.params input.sd \- | plotspec \- .fiwill display a window in which the user fills in FFT parameters; afterthe user clicks on DONE, the fft is performed and the results plotted.Suppose the following script is called "xparam":.nf #! /bin/sh exprompt \-h $1 \-P/usr/esps3/lib/P$1 temp.param $1 \-P temp.param $2 $3Then xparam fft input.sd output.fspec.fiwill result in the interactive execution of\fIfft\fP(1\-\s-1ESPS\s+1). Thus, \fIxparam\fP is the X Windows equivalent of\fIeparam\fP(1\-\s-1ESPS\s+1). For an alternative, see\fIexpromptrun\fP (1\-\s-1ESPS\s+1). .SH "FUTURE CHANGES".PP\fIxprompt\fP will be modified to test whether or not it is being rununder X Windows; if not, the indefinite parameters will be determined by means of prompts using stdin and stdout. .SH "SEE ALSO".PP\fIgetparam\fP (1\-\s-1ESPS\s+1), \fIespsenv\fP (1\-\s-1ESPS\s+1),\fIread_params\fP (3\-\s-1ESPS\s+1),\fIexpromptrun\fP(1\-\s-1ESPS\s+1), \fIexv_prompt_params\fP(3\-\s-1ESPSxu\s+1) .SH "REFERENCE".PP"Parameter and Common Files in ESPS", ETM-S-86-12.SH "BUGS".PPArray parameters (float and int arrays) are not supported yet. .PPVertical and horizontal scrollbars are provided (their use may benecessary in the case of large parameter files). Owing to bugs in thecurrent version of the xview library, however, their behavior is not reliable. For example, joining a split vertical scrollbar can cause a core dump. .PPIf Common is processed and is newer than \fIparam_file\fP, the output \fIparam_file\fP will include all parameters defined in Common,even if they were not also defined in \fIparam_file\fP. .SH "AUTHOR".PPManual page and code by John Shore.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -