Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

completioneditor(3i) [debian man page]

MatchEditor(3I) 					    InterViews Reference Manual 					   MatchEditor(3I)

NAME
MatchEditor - StringEditor with string completion SYNOPSIS
#include <InterViews/compeditor.h> DESCRIPTION
CompletionEditor is a StringEditor subclass with the added ability to complete the current contents of the edit buffer against a specified set of strings. A CompletionEditor is often useful when a user must specify a selection from a large set of well-known strings--the user need only type the first few characters of the string; he types the completion character to fill out the remainder. When the user types the completion character, CompletionEditor checks the current string against the list of possible completions. If the current string is a prefix of one or more completion strings, characters are appended so that the edit string contains the longest common prefix; if the current string does not match any completion string, trailing characters are removed until the string matches at least one completion. In any case, if there is more than one possible completion of a string, CompletionEditor rings the workstation bell. PUBLIC OPERATIONS
CompletionEditor(ButtonState*, const char* sample, const char* done) Create a new CompletionEditor object. The ButtonState, sample string, and termination string are passed to the StringEditor con- structor. void Completions(const char* completions[], int count, char complete) Specify the list of completion strings and the completion character. The initial completion list is empty, and the completion char- acter defaults to a space. CompletionEditor does not copy the strings in the list. SEE ALSO
StringEditor(3I) InterViews 13 Dec 1989 MatchEditor(3I)

Check Out this Related Man Page

MatchEditor(3I) 					    InterViews Reference Manual 					   MatchEditor(3I)

NAME
MatchEditor - StringEditor with pattern matching SYNOPSIS
#include <InterViews/matcheditor.h> DESCRIPTION
MatchEditor is a StringEditor subclass that checks the validity of its contents against a specified pattern. It is suitable for entering strings that must conform to a particular format such as a number or a file name. The matching pattern is specified according to the rules of scanf(3). For example, a pattern of "%3d" will match a 3-digit integer, a pattern of "%[ab]" will match a string containing only a's and b's, and a pattern of "(%f, %f)" will match the string "(12.0, 5E23)". PUBLIC OPERATIONS
MatchEditor(ButtonState*, const char* sample, const char* done) Create a new MatchEditor object. The ButtonState, sample string, and termination string are passed to the StringEditor constructor. void Match(const char* pattern, boolean keystroke = true) Specify the pattern to match against. When MatchEditor performs matching, it will highlight any trailing part of the edit string that does not conform to pattern. The user can then correct the string. If keystroke is true, matching will occur on every key- stroke; otherwise matching will only occur on the completion of the edit. The initial pattern matches any string, and the initial value of keystroke is true. RESTRICTIONS
MatchEditor uses sscanf internally to check the pattern match. Different versions of sscanf have different scanning capabilities; check with your local version to see what patterns you can use. SEE ALSO
StringEditor(3I) InterViews 7 Dec 1989 MatchEditor(3I)
Man Page

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Average completion time calculation?

I've been trying all night to come up with a script that will take a file that contains job completion times like this as input: 18:30 17:45 16:39 18:01 17:50 ... and figure the Average completion time. I've tried several things, and I just can't seem to get it to figure correctly. I'm... (5 Replies)
Discussion started by: Seawall
5 Replies

2. UNIX for Advanced & Expert Users

how to get the percentage of completion? during a copy!

Hi all, I would like to know how to introduce that progress bar or the %of completion during copy of files... In the sense,I am copying a few files onto RAM at the boot time.... These 2 files combined take about 550mb of ram,so instead of just having a blinking cursor till the copy is over,i... (7 Replies)
Discussion started by: wrapster
7 Replies

3. UNIX for Dummies Questions & Answers

Print values of a string froma file

Hi, I have a problem in getting values of a specific string on a file, can you please help me what command or script that I will use to get it? I have a file with the following sample contents. I need to print the values of time. The time sometimes appears on column 2 or column 3. Please... (2 Replies)
Discussion started by: ayhanne
2 Replies

4. Shell Programming and Scripting

Common prefix of a list of strings

Is there a simple way to find the longest common prefix of a space-separated list of strings, optionally by field? For example, given input: "aaa_b_cc aaa_b_cc_ddd aaa_b_cc aaa_b_cd"with no field separator, output: aaa_b_cwith _ field separator, output: aaa_bI have an awk solution which... (1 Reply)
Discussion started by: CarloM
1 Replies