wlan - Rip out all wlan locks part 1/2
[dragonfly.git] / lib / libedit / editline.3
1 .\" Copyright (c) 1997-2003 The NetBSD Foundation, Inc.
2 .\" All rights reserved.
3 .\"
4 .\" This file was contributed to The NetBSD Foundation by Luke Mewburn.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 .\" POSSIBILITY OF SUCH DAMAGE.
26 .\"
27 .\" $NetBSD: editline.3,v 1.57 2008/04/30 13:10:51 martin Exp $
28 .\" $DragonFly: src/lib/libedit/editline.3,v 1.5 2008/05/17 22:48:04 pavalos Exp $
29 .\"
30 .Dd April 5, 2008
31 .Os
32 .Dt EDITLINE 3
33 .Sh NAME
34 .Nm editline ,
35 .Nm el_init ,
36 .Nm el_end ,
37 .Nm el_reset ,
38 .Nm el_gets ,
39 .Nm el_getc ,
40 .Nm el_push ,
41 .Nm el_parse ,
42 .Nm el_set ,
43 .Nm el_get ,
44 .Nm el_source ,
45 .Nm el_resize ,
46 .Nm el_line ,
47 .Nm el_insertstr ,
48 .Nm el_deletestr ,
49 .Nm history_init ,
50 .Nm history_end ,
51 .Nm history ,
52 .Nm tok_init ,
53 .Nm tok_end ,
54 .Nm tok_reset ,
55 .Nm tok_line ,
56 .Nm tok_str
57 .Nd line editor, history and tokenization functions
58 .Sh LIBRARY
59 .Lb libedit
60 .Sh SYNOPSIS
61 .In histedit.h
62 .Ft EditLine *
63 .Fn el_init "const char *prog" "FILE *fin" "FILE *fout" "FILE *ferr"
64 .Ft void
65 .Fn el_end "EditLine *e"
66 .Ft void
67 .Fn el_reset "EditLine *e"
68 .Ft const char *
69 .Fn el_gets "EditLine *e" "int *count"
70 .Ft int
71 .Fn el_getc "EditLine *e" "char *ch"
72 .Ft void
73 .Fn el_push "EditLine *e" "const char *str"
74 .Ft int
75 .Fn el_parse "EditLine *e" "int argc" "const char *argv[]"
76 .Ft int
77 .Fn el_set "EditLine *e" "int op" "..."
78 .Ft int
79 .Fn el_get "EditLine *e" "int op" "..."
80 .Ft int
81 .Fn el_source "EditLine *e" "const char *file"
82 .Ft void
83 .Fn el_resize "EditLine *e"
84 .Ft const LineInfo *
85 .Fn el_line "EditLine *e"
86 .Ft int
87 .Fn el_insertstr "EditLine *e" "const char *str"
88 .Ft void
89 .Fn el_deletestr "EditLine *e" "int count"
90 .Ft History *
91 .Fn history_init
92 .Ft void
93 .Fn history_end "History *h"
94 .Ft int
95 .Fn history "History *h" "HistEvent *ev" "int op" "..."
96 .Ft Tokenizer *
97 .Fn tok_init "const char *IFS"
98 .Ft void
99 .Fn tok_end "Tokenizer *t"
100 .Ft void
101 .Fn tok_reset "Tokenizer *t"
102 .Ft int
103 .Fn tok_line "Tokenizer *t" "const LineInfo *li" "int *argc" "const char **argv[]" "int *cursorc" "int *cursoro"
104 .Ft int
105 .Fn tok_str "Tokenizer *t" "const char *str" "int *argc" "const char **argv[]"
106 .Sh DESCRIPTION
107 The
108 .Nm
109 library provides generic line editing, history and tokenization functions,
110 similar to those found in
111 .Xr sh 1 .
112 .Pp
113 These functions are available in the
114 .Nm libedit
115 library (which needs the
116 .Nm libtermcap
117 library).
118 Programs should be linked with
119 .Fl ledit ltermcap .
120 .Sh LINE EDITING FUNCTIONS
121 The line editing functions use a common data structure,
122 .Fa EditLine ,
123 which is created by
124 .Fn el_init
125 and freed by
126 .Fn el_end .
127 .Pp
128 The following functions are available:
129 .Bl -tag -width 4n
130 .It Fn el_init
131 Initialise the line editor, and return a data structure
132 to be used by all other line editing functions.
133 .Fa prog
134 is the name of the invoking program, used when reading the
135 .Xr editrc 5
136 file to determine which settings to use.
137 .Fa fin ,
138 .Fa fout
139 and
140 .Fa ferr
141 are the input, output, and error streams (respectively) to use.
142 In this documentation, references to
143 .Dq the tty
144 are actually to this input/output stream combination.
145 .It Fn el_end
146 Clean up and finish with
147 .Fa e ,
148 assumed to have been created with
149 .Fn el_init .
150 .It Fn el_reset
151 Reset the tty and the parser.
152 This should be called after an error which may have upset the tty's
153 state.
154 .It Fn el_gets
155 Read a line from the tty.
156 .Fa count
157 is modified to contain the number of characters read.
158 Returns the line read if successful, or
159 .Dv NULL
160 if no characters were read or if an error occurred.
161 .It Fn el_getc
162 Read a character from the tty.
163 .Fa ch
164 is modified to contain the character read.
165 Returns the number of characters read if successful, \-1 otherwise.
166 .It Fn el_push
167 Pushes
168 .Fa str
169 back onto the input stream.
170 This is used by the macro expansion mechanism.
171 Refer to the description of
172 .Ic bind
173 .Fl s
174 in
175 .Xr editrc 5
176 for more information.
177 .It Fn el_parse
178 Parses the
179 .Fa argv
180 array (which is
181 .Fa argc
182 elements in size)
183 to execute builtin
184 .Nm
185 commands.
186 If the command is prefixed with
187 .Dq prog :
188 then
189 .Fn el_parse
190 will only execute the command if
191 .Dq prog
192 matches the
193 .Fa prog
194 argument supplied to
195 .Fn el_init .
196 The return value is
197 \-1 if the command is unknown,
198 0 if there was no error or
199 .Dq prog
200 didn't match, or
201 1 if the command returned an error.
202 Refer to
203 .Xr editrc 5
204 for more information.
205 .It Fn el_set
206 Set
207 .Nm
208 parameters.
209 .Fa op
210 determines which parameter to set, and each operation has its
211 own parameter list.
212 .Pp
213 The following values for
214 .Fa op
215 are supported, along with the required argument list:
216 .Bl -tag -width 4n
217 .It Dv EL_PROMPT , Fa "char *(*f)(EditLine *)"
218 Define prompt printing function as
219 .Fa f ,
220 which is to return a string that contains the prompt.
221 .It Dv EL_REFRESH
222 Re-display the current line on the next terminal line.
223 .It Dv EL_RPROMPT , Fa "char *(*f)(EditLine *)"
224 Define right side prompt printing function as
225 .Fa f ,
226 which is to return a string that contains the prompt.
227 .It Dv EL_TERMINAL , Fa "const char *type"
228 Define terminal type of the tty to be
229 .Fa type ,
230 or to
231 .Ev TERM
232 if
233 .Fa type
234 is
235 .Dv NULL .
236 .It Dv EL_EDITOR , Fa "const char *mode"
237 Set editing mode to
238 .Fa mode ,
239 which must be one of
240 .Dq emacs
241 or
242 .Dq vi .
243 .It Dv EL_SIGNAL , Fa "int flag"
244 If
245 .Fa flag
246 is non-zero,
247 .Nm
248 will install its own signal handler for the following signals when
249 reading command input:
250 .Dv SIGCONT ,
251 .Dv SIGHUP ,
252 .Dv SIGINT ,
253 .Dv SIGQUIT ,
254 .Dv SIGSTOP ,
255 .Dv SIGTERM ,
256 .Dv SIGTSTP ,
257 and
258 .Dv SIGWINCH .
259 Otherwise, the current signal handlers will be used.
260 .It Dv EL_BIND , Xo
261 .Fa "const char *" ,
262 .Fa "..." ,
263 .Dv NULL
264 .Xc
265 Perform the
266 .Ic bind
267 builtin command.
268 Refer to
269 .Xr editrc 5
270 for more information.
271 .It Dv EL_ECHOTC , Xo
272 .Fa "const char *" ,
273 .Fa "..." ,
274 .Dv NULL
275 .Xc
276 Perform the
277 .Ic echotc
278 builtin command.
279 Refer to
280 .Xr editrc 5
281 for more information.
282 .It Dv EL_SETTC , Xo
283 .Fa "const char *" ,
284 .Fa "..." ,
285 .Dv NULL
286 .Xc
287 Perform the
288 .Ic settc
289 builtin command.
290 Refer to
291 .Xr editrc 5
292 for more information.
293 .It Dv EL_SETTY , Xo
294 .Fa "const char *" ,
295 .Fa "..." ,
296 .Dv NULL
297 .Xc
298 Perform the
299 .Ic setty
300 builtin command.
301 Refer to
302 .Xr editrc 5
303 for more information.
304 .It Dv EL_TELLTC , Xo
305 .Fa "const char *" ,
306 .Fa "..." ,
307 .Dv NULL
308 .Xc
309 Perform the
310 .Ic telltc
311 builtin command.
312 Refer to
313 .Xr editrc 5
314 for more information.
315 .It Dv EL_ADDFN , Xo
316 .Fa "const char *name" ,
317 .Fa "const char *help" ,
318 .Fa "unsigned char (*func)(EditLine *e, int ch)"
319 .Xc
320 Add a user defined function,
321 .Fn func ,
322 referred to as
323 .Fa name
324 which is invoked when a key which is bound to
325 .Fa name
326 is entered.
327 .Fa help
328 is a description of
329 .Fa name .
330 At invocation time,
331 .Fa ch
332 is the key which caused the invocation.
333 The return value of
334 .Fn func
335 should be one of:
336 .Bl -tag -width "CC_REDISPLAY"
337 .It Dv CC_NORM
338 Add a normal character.
339 .It Dv CC_NEWLINE
340 End of line was entered.
341 .It Dv CC_EOF
342 EOF was entered.
343 .It Dv CC_ARGHACK
344 Expecting further command input as arguments, do nothing visually.
345 .It Dv CC_REFRESH
346 Refresh display.
347 .It Dv CC_REFRESH_BEEP
348 Refresh display, and beep.
349 .It Dv CC_CURSOR
350 Cursor moved, so update and perform
351 .Dv CC_REFRESH .
352 .It Dv CC_REDISPLAY
353 Redisplay entire input line.
354 This is useful if a key binding outputs extra information.
355 .It Dv CC_ERROR
356 An error occurred.
357 Beep, and flush tty.
358 .It Dv CC_FATAL
359 Fatal error, reset tty to known state.
360 .El
361 .It Dv EL_HIST , Xo
362 .Fa "History *(*func)(History *, int op, ...)" ,
363 .Fa "const char *ptr"
364 .Xc
365 Defines which history function to use, which is usually
366 .Fn history .
367 .Fa ptr
368 should be the value returned by
369 .Fn history_init .
370 .It Dv EL_EDITMODE , Fa "int flag"
371 If
372 .Fa flag
373 is non-zero,
374 editing is enabled (the default).
375 Note that this is only an indication, and does not
376 affect the operation of
377 .Nm .
378 At this time, it is the caller's responsibility to
379 check this
380 (using
381 .Fn el_get )
382 to determine if editing should be enabled or not.
383 .It Dv EL_GETCFN , Fa "int (*f)(EditLine *, char *c)"
384 Define the character reading function as
385 .Fa f ,
386 which is to return the number of characters read and store them in
387 .Fa c .
388 This function is called internally by
389 .Fn el_gets
390 and
391 .Fn el_getc .
392 The builtin function can be set or restored with the special function
393 name ``EL_BUILTIN_GETCFN''.
394 .It Dv EL_CLIENTDATA , Fa "void *data"
395 Register
396 .Fa data
397 to be associated with this EditLine structure.
398 It can be retrieved with the corresponding
399 .Fn el_get
400 call.
401 .It Dv EL_SETFP , Fa "int fd" , Fa "FILE *fp"
402 Set the current
403 .Nm editline
404 file pointer for
405 .Dq input
406 .Fa fd
407 =
408 .Dv 0 ,
409 .Dq output
410 .Fa fd
411 =
412 .Dv 1 ,
413 or
414 .Dq error
415 .Fa fd
416 =
417 .Dv 2
418 from
419 .Fa fp .
420 .El
421 .It Fn el_get
422 Get
423 .Nm
424 parameters.
425 .Fa op
426 determines which parameter to retrieve into
427 .Fa result .
428 Returns 0 if successful, \-1 otherwise.
429 .Pp
430 The following values for
431 .Fa op
432 are supported, along with actual type of
433 .Fa result :
434 .Bl -tag -width 4n
435 .It Dv EL_PROMPT , Fa "char *(*f)(EditLine *)"
436 Return a pointer to the function that displays the prompt.
437 .It Dv EL_RPROMPT , Fa "char *(*f)(EditLine *)"
438 Return a pointer to the function that displays the rightside prompt.
439 .It Dv EL_EDITOR , Fa "const char *"
440 Return the name of the editor, which will be one of
441 .Dq emacs
442 or
443 .Dq vi .
444 .It Dv EL_GETTC , Fa "const char *name" , Fa "void *value"
445 Return non-zero if
446 .Fa name
447 is a valid
448 .Xr termcap 5
449 capability
450 and set
451 .Fa value
452 to the current value of that capability.
453 .It Dv EL_SIGNAL , Fa "int *"
454 Return non-zero if
455 .Nm
456 has installed private signal handlers (see
457 .Fn el_get
458 above).
459 .It Dv EL_EDITMODE , Fa "int *"
460 Return non-zero if editing is enabled.
461 .It Dv EL_GETCFN , Fa "int (**f)(EditLine *, char *)"
462 Return a pointer to the function that read characters, which is equal to
463 ``EL_BUILTIN_GETCFN'' in the case of the default builtin function.
464 .It Dv EL_CLIENTDATA , Fa "void **data"
465 Retrieve
466 .Fa data
467 previously registered with the corresponding
468 .Fn el_set
469 call.
470 .It Dv EL_UNBUFFERED , Fa "int"
471 Sets or clears unbuffered mode.
472 In this mode,
473 .Fn el_gets
474 will return immediately after processing a single character.
475 .It Dv EL_PREP_TERM , Fa "int"
476 Sets or clears terminal editing mode.
477 .It Dv EL_GETFP , Fa "int fd", Fa "FILE **fp"
478 Return in
479 .Fa fp
480 the current
481 .Nm editline
482 file pointer for
483 .Dq input
484 .Fa fd
485 =
486 .Dv 0 ,
487 .Dq output
488 .Fa fd
489 =
490 .Dv 1 ,
491 or
492 .Dq error
493 .Fa fd
494 =
495 .Dv 2 .
496 .El
497 .It Fn el_source
498 Initialise
499 .Nm
500 by reading the contents of
501 .Fa file .
502 .Fn el_parse
503 is called for each line in
504 .Fa file .
505 If
506 .Fa file
507 is
508 .Dv NULL ,
509 try
510 .Pa $PWD/.editrc
511 then
512 .Pa $HOME/.editrc .
513 Refer to
514 .Xr editrc 5
515 for details on the format of
516 .Fa file .
517 .It Fn el_resize
518 Must be called if the terminal size changes.
519 If
520 .Dv EL_SIGNAL
521 has been set with
522 .Fn el_set ,
523 then this is done automatically.
524 Otherwise, it's the responsibility of the application to call
525 .Fn el_resize
526 on the appropriate occasions.
527 .It Fn el_line
528 Return the editing information for the current line in a
529 .Fa LineInfo
530 structure, which is defined as follows:
531 .Bd -literal
532 typedef struct lineinfo {
533     const char *buffer;    /* address of buffer */
534     const char *cursor;    /* address of cursor */
535     const char *lastchar;  /* address of last character */
536 } LineInfo;
537 .Ed
538 .Pp
539 .Fa buffer
540 is not NUL terminated.
541 This function may be called after
542 .Fn el_gets
543 to obtain the
544 .Fa LineInfo
545 structure pertaining to line returned by that function,
546 and from within user defined functions added with
547 .Dv EL_ADDFN .
548 .It Fn el_insertstr
549 Insert
550 .Fa str
551 into the line at the cursor.
552 Returns \-1 if
553 .Fa str
554 is empty or won't fit, and 0 otherwise.
555 .It Fn el_deletestr
556 Delete
557 .Fa count
558 characters before the cursor.
559 .El
560 .Sh HISTORY LIST FUNCTIONS
561 The history functions use a common data structure,
562 .Fa History ,
563 which is created by
564 .Fn history_init
565 and freed by
566 .Fn history_end .
567 .Pp
568 The following functions are available:
569 .Bl -tag -width 4n
570 .It Fn history_init
571 Initialise the history list, and return a data structure
572 to be used by all other history list functions.
573 .It Fn history_end
574 Clean up and finish with
575 .Fa h ,
576 assumed to have been created with
577 .Fn history_init .
578 .It Fn history
579 Perform operation
580 .Fa op
581 on the history list, with optional arguments as needed by the
582 operation.
583 .Fa ev
584 is changed accordingly to operation.
585 The following values for
586 .Fa op
587 are supported, along with the required argument list:
588 .Bl -tag -width 4n
589 .It Dv H_SETSIZE , Fa "int size"
590 Set size of history to
591 .Fa size
592 elements.
593 .It Dv H_GETSIZE
594 Get number of events currently in history.
595 .It Dv H_END
596 Cleans up and finishes with
597 .Fa h ,
598 assumed to be created with
599 .Fn history_init .
600 .It Dv H_CLEAR
601 Clear the history.
602 .It Dv H_FUNC , Xo
603 .Fa "void *ptr" ,
604 .Fa "history_gfun_t first" ,
605 .Fa "history_gfun_t next" ,
606 .Fa "history_gfun_t last" ,
607 .Fa "history_gfun_t prev" ,
608 .Fa "history_gfun_t curr" ,
609 .Fa "history_sfun_t set" ,
610 .Fa "history_vfun_t clear" ,
611 .Fa "history_efun_t enter" ,
612 .Fa "history_efun_t add"
613 .Xc
614 Define functions to perform various history operations.
615 .Fa ptr
616 is the argument given to a function when it's invoked.
617 .It Dv H_FIRST
618 Return the first element in the history.
619 .It Dv H_LAST
620 Return the last element in the history.
621 .It Dv H_PREV
622 Return the previous element in the history.
623 .It Dv H_NEXT
624 Return the next element in the history.
625 .It Dv H_CURR
626 Return the current element in the history.
627 .It Dv H_SET
628 Set the cursor to point to the requested element.
629 .It Dv H_ADD , Fa "const char *str"
630 Append
631 .Fa str
632 to the current element of the history, or perform the
633 .Dv H_ENTER
634 operation with argument
635 .Fa str
636 if there is no current element.
637 .It Dv H_APPEND , Fa "const char *str"
638 Append
639 .Fa str
640 to the last new element of the history.
641 .It Dv H_ENTER , Fa "const char *str"
642 Add
643 .Fa str
644 as a new element to the history, and, if necessary,
645 removing the oldest entry to keep the list to the created size.
646 If
647 .Dv H_SETUNIQUE
648 was has been called with a non-zero arguments, the element
649 will not be entered into the history if its contents match
650 the ones of the current history element.
651 If the element is entered
652 .Fn history
653 returns 1, if it is ignored as a duplicate returns 0.
654 Finally
655 .Fn history
656 returns \-1 if an error occurred.
657 .It Dv H_PREV_STR , Fa "const char *str"
658 Return the closest previous event that starts with
659 .Fa str .
660 .It Dv H_NEXT_STR , Fa "const char *str"
661 Return the closest next event that starts with
662 .Fa str .
663 .It Dv H_PREV_EVENT , Fa "int e"
664 Return the previous event numbered
665 .Fa e .
666 .It Dv H_NEXT_EVENT , Fa "int e"
667 Return the next event numbered
668 .Fa e .
669 .It Dv H_LOAD , Fa "const char *file"
670 Load the history list stored in
671 .Fa file .
672 .It Dv H_SAVE , Fa "const char *file"
673 Save the history list to
674 .Fa file .
675 .It Dv H_SETUNIQUE , Fa "int unique"
676 Set flag that adjacent identical event strings should not be entered
677 into the history.
678 .It Dv H_GETUNIQUE
679 Retrieve the current setting if adjacent identical elements should
680 be entered into the history.
681 .It Dv H_DEL , Fa "int e"
682 Delete the event numbered
683 .Fa e .
684 This function is only provided for
685 .Xr readline 3
686 compatibility.
687 The caller is responsible for free'ing the string in the returned
688 .Fa HistEvent .
689 .El
690 .Pp
691 .Fn history
692 returns \*[Gt]= 0 if the operation
693 .Fa op
694 succeeds.
695 Otherwise, \-1 is returned and
696 .Fa ev
697 is updated to contain more details about the error.
698 .El
699 .Sh TOKENIZATION FUNCTIONS
700 The tokenization functions use a common data structure,
701 .Fa Tokenizer ,
702 which is created by
703 .Fn tok_init
704 and freed by
705 .Fn tok_end .
706 .Pp
707 The following functions are available:
708 .Bl -tag -width 4n
709 .It Fn tok_init
710 Initialise the tokenizer, and return a data structure
711 to be used by all other tokenizer functions.
712 .Fa IFS
713 contains the Input Field Separators, which defaults to
714 .Aq space ,
715 .Aq tab ,
716 and
717 .Aq newline
718 if
719 .Dv NULL .
720 .It Fn tok_end
721 Clean up and finish with
722 .Fa t ,
723 assumed to have been created with
724 .Fn tok_init .
725 .It Fn tok_reset
726 Reset the tokenizer state.
727 Use after a line has been successfully tokenized
728 by
729 .Fn tok_line
730 or
731 .Fn tok_str
732 and before a new line is to be tokenized.
733 .It Fn tok_line
734 Tokenize
735 .Fa li ,
736 If successful, modify:
737 .Fa argv
738 to contain the words,
739 .Fa argc
740 to contain the number of words,
741 .Fa cursorc
742 (if not
743 .Dv NULL )
744 to contain the index of the word containing the cursor,
745 and
746 .Fa cursoro
747 (if not
748 .Dv NULL )
749 to contain the offset within
750 .Fa argv[cursorc]
751 of the cursor.
752 .Pp
753 Returns
754 0 if successful,
755 \-1 for an internal error,
756 1 for an unmatched single quote,
757 2 for an unmatched double quote,
758 and
759 3 for a backslash quoted
760 .Aq newline .
761 A positive exit code indicates that another line should be read
762 and tokenization attempted again.
763 .
764 .It Fn tok_str
765 A simpler form of
766 .Fn tok_line ;
767 .Fa str
768 is a NUL terminated string to tokenize.
769 .El
770 .
771 .\"XXX.Sh EXAMPLES
772 .\"XXX: provide some examples
773 .Sh SEE ALSO
774 .Xr sh 1 ,
775 .Xr signal 3 ,
776 .Xr termcap 3 ,
777 .Xr editrc 5 ,
778 .Xr termcap 5
779 .Sh HISTORY
780 The
781 .Nm
782 library first appeared in
783 .Bx 4.4 .
784 .Dv CC_REDISPLAY
785 appeared in
786 .Nx 1.3 .
787 .Dv CC_REFRESH_BEEP ,
788 .Dv EL_EDITMODE
789 and the readline emulation appeared in
790 .Nx 1.4 .
791 .Dv EL_RPROMPT
792 appeared in
793 .Nx 1.5 .
794 .Sh AUTHORS
795 The
796 .Nm
797 library was written by Christos Zoulas.
798 Luke Mewburn wrote this manual and implemented
799 .Dv CC_REDISPLAY ,
800 .Dv CC_REFRESH_BEEP ,
801 .Dv EL_EDITMODE ,
802 and
803 .Dv EL_RPROMPT .
804 Jaromir Dolecek implemented the readline emulation.
805 .Sh BUGS
806 At this time, it is the responsibility of the caller to
807 check the result of the
808 .Dv EL_EDITMODE
809 operation of
810 .Fn el_get
811 (after an
812 .Fn el_source
813 or
814 .Fn el_parse )
815 to determine if
816 .Nm
817 should be used for further input.
818 I.e.,
819 .Dv EL_EDITMODE
820 is purely an indication of the result of the most recent
821 .Xr editrc 5
822 .Ic edit
823 command.