~arivigo/sline

3a198dc197645c4311d2b181ddcbe74b12c38419 — Ariadna Vigo 6 months ago 9be5923
man/sline_history_get: documenting sline_history_get()
2 files changed, 33 insertions(+), 2 deletions(-)

M Makefile
A man/sline_history_get.3
M Makefile => Makefile +2 -2
@@ 6,8 6,8 @@ include config.mk

SRC = history.c sline.c strlcpy.c
OBJ = ${SRC:.c=.o}
MAN = man/sline.3 man/sline_end.3 man/sline_errmsg.3 man/sline_setup.3 \
      man/sline_set_prompt.3 man/sline_version.3
MAN = man/sline.3 man/sline_end.3 man/sline_errmsg.3 man/sline_history_get.3 \
      man/sline_setup.3 man/sline_set_prompt.3 man/sline_version.3

all: options libsline.a ${LIBFULLNAME}


A man/sline_history_get.3 => man/sline_history_get.3 +31 -0
@@ 0,0 1,31 @@
.TH SLINE 3 sline\-VERSION
.SH NAME
.PP
sline_history_get \- Retrieve entries from command history
.SH SYNOPSIS
.PP
.B #include <sline.h>
.PP
.B const char 
.BI "*sline_history_get(int " pos );
.SH DESCRIPTION
.PP
.BR sline_history_get ()
prints the command history entry at index
.I pos
to standard output.
.PP
If command history has been set using
.BR sline_setup (3),
commands will be recorded sequentially from index zero (0) onwards.
.SH RETURN VALUE
.PP
.BR sline_history_get ()
returns a constant string containing the entry requested 
or
.I NULL
if the index points to an invalid location.
.SH SEE ALSO
.PP
.BR sline (3), 
.BR sline_setup (3)