📄 xprompt.1
字号:
.\" Copyright (c) 1986-1990 Entropic Speech, Inc..\" Copyright (c) 1991 Entropic Research Laboratory, Inc.; All rights reserved.\" @(#)xprompt.1 1.9 6/21/91 ESI/ERL.ds ]W (c) 1991 Entropic Research Laboratory, Inc..TH XPROMPT 1\-ESPS 6/21/91.SH "NAME"xprompt \- interactive ESPS parameter entry in a pop-up window.SH "SYNOPSIS".B xprompt[.BI \-P.I param_file] [.B \-n] [.BI \-c.I checkfile] [.BI\-h.I help_name] [.B \-z] [.BI \-x.I debug_level]param_out.SH "DESCRIPTION".PP\fIXprompt\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. For a version that also runs an ESPS program (after prompting for parameters), see \fIxpromptrun\fP (1\-\s-1ESPS\s+1). .PP\fIXprompt\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, \fIxprompt\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\fIxprompt\fP window, the output file \fIparam_file\fP is updated.Note that that data entry requires that a RETURN by typed at the endof the entry string (See "BUGS"). Input parameters are checked for data typeformat. If limits are provided for numeric parameters in theparameter file, the limits are checked..PPTwo or three screen buttons are provided in a panel at the top of the \fIxprompt\fP window. The button DEFAULTS reverts all parametervalues to the defaults that were in the parameter file (as updated byCommon). The button DONE causes \fIxprompt\fP to exit. Use this whenyou have finished entering values. The state of the output parameterfile will correspond to the state of the window when DONE is selected (assuming that RETURNs have been typed as appropriate). .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..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 \fIxprompt\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 \fIxprompt\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 \fIxprompt\fP operate silently; conditions such as "no parameters" or "no indefinite paramters" are not reported. .TP.BI \-x " debug_level \fR[0]\fP"If \fIdebug_level\fP is positive,.I xpromptoutputs 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,\fIxprompt\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 \fIxprompt\fP..SH ESPS COMMON.PPParameter processing by \fIxprompt\fP follows standard ESPSconventions: Unless the parameter value is overridden by the value inESPS Common, the default value displayed by \fIxprompt\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\fIXprompt\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 xprompt \-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 xprompt \-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, "xparam" is the X Windows equivalent of\fIeparam\fP (1\-\s-1ESPS\s+1). For an alternative, see\fIxpromptrun\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), \fIxpromptrun\fP (1\-\s-1ESPS\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. .PPData entry in any numeric or text field does not take effect until aRETURN is typed; in a later version we will modify the action takenwhen "Done" is selected to check and write all fields..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. .SH "AUTHOR".PPManual page and code by John Shore.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -