Add a msg_row() function that returns the current screen row.

Allows sysinst to place menus below any header text.
Remove msg_*.1 man pages for all the functions (they are in the wrong place
are a fair waste of directory space).
This commit is contained in:
dsl 2003-09-25 18:32:10 +00:00
parent 2db4663338
commit 556e606c59
4 changed files with 18 additions and 19 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.14 2003/06/04 19:00:26 dsl Exp $
# $NetBSD: Makefile,v 1.15 2003/09/25 18:32:10 dsl Exp $
.include <bsd.own.mk>
@ -8,20 +8,6 @@ SRCS= msgmain.c msgparse.y msgscan.l msgdb.c util.c avl.c
CPPFLAGS+= -I. -I${.CURDIR}
YHEADER=
MLINKS+= msgc.1 msg_window.1 \
msgc.1 msg_window.1 \
msgc.1 msg_string.1 \
msgc.1 msg_clear.1 \
msgc.1 msg_standout.1 \
msgc.1 msg_standend.1 \
msgc.1 msg_display.1 \
msgc.1 msg_display_add.1 \
msgc.1 msg_prompt.1 \
msgc.1 msg_prompt_add.1 \
msgc.1 msg_prompt_win.1 \
msgc.1 msg_prompt_noecho.1 \
msgc.1 msg_table_add.1
.if ${MKSHARE} != "no"
FILES= msg_sys.def
FILESDIR= /usr/share/misc

View File

@ -1,4 +1,4 @@
/* $NetBSD: msg_sys.def,v 1.25 2003/07/28 09:55:24 dsl Exp $ */
/* $NetBSD: msg_sys.def,v 1.26 2003/09/25 18:32:10 dsl Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -495,3 +495,9 @@ msg_table_add(msg msg_no, ...)
va_end(ap);
}
int
msg_row(void)
{
return getcury(msg_win) + getbegy(msg_win);
}

View File

@ -1,4 +1,4 @@
.\" $NetBSD: msgc.1,v 1.18 2003/06/04 19:00:26 dsl Exp $
.\" $NetBSD: msgc.1,v 1.19 2003/09/25 18:32:10 dsl Exp $
.\"
.\" Copyright 1997 Piermont Information Systems Inc.
.\" All rights reserved.
@ -49,6 +49,7 @@
.Nm msg_prompt_add ,
.Nm msg_prompt_win ,
.Nm msg_prompt_noecho ,
.Nm msg_row ,
.Nm msg_table_add
.Nd simple message list compiler
.Sh SYNOPSIS
@ -79,6 +80,8 @@ msgc
.Fn msg_prompt_win "msg msg_no" "WINDOW *win" "const char *def" "char *val" "int max_chars" ...
.Ft void
.Fn msg_prompt_noecho "msg msg_no" "const char *def" "char *val" "int max_chars" ...
.Ft int
.Fn msg_row "void"
.Ft void
.Fn msg_table_add "msg msg_no" ...
.Sh DESCRIPTION
@ -198,5 +201,8 @@ is typed by the user.
.Pp
.Fn msg_prompt_win
uses the specified curses window instead of the default one.
.Pp
.Fn msg_row
return the current row - i.e.: getcury(msg_win) + getbegy(msg_win).
.Sh AUTHORS
Philip A. Nelson for Piermont Information Systems Inc.

View File

@ -1,4 +1,4 @@
/* $NetBSD: msgdb.c,v 1.18 2003/07/17 08:33:03 lukem Exp $ */
/* $NetBSD: msgdb.c,v 1.19 2003/09/25 18:32:10 dsl Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -41,7 +41,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
__RCSID("$NetBSD: msgdb.c,v 1.18 2003/07/17 08:33:03 lukem Exp $");
__RCSID("$NetBSD: msgdb.c,v 1.19 2003/09/25 18:32:10 dsl Exp $");
#endif
@ -173,6 +173,7 @@ write_msg_file ()
"void msg_prompt_win (msg, int, int, int, int,"
" const char *, char *, size_t, ...);\n"
"void msg_table_add(msg msg_no,...);\n"
"int msg_row(void);\n"
"\n"
"/* Message names */\n"
);