diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-07-14 14:01:36 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-07-14 14:01:36 +0000 |
commit | 7c690c1aa838ce557a7140db128970d6149b34d6 (patch) | |
tree | 5205a5ffae5e2d9b6ee74c0df561f0dd164f7814 /contrib/dialog/help.c | |
parent | e54e39a5004441432886ee2a43973c797fafdfd8 (diff) | |
parent | 94f19e002939203294adf4d18b410183682bd2de (diff) | |
download | FreeBSD-src-7c690c1aa838ce557a7140db128970d6149b34d6.zip FreeBSD-src-7c690c1aa838ce557a7140db128970d6149b34d6.tar.gz |
Update dialog to 1.1-20110707.
Diffstat (limited to 'contrib/dialog/help.c')
-rw-r--r-- | contrib/dialog/help.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/contrib/dialog/help.c b/contrib/dialog/help.c new file mode 100644 index 0000000..8ba9229 --- /dev/null +++ b/contrib/dialog/help.c @@ -0,0 +1,43 @@ +/* + * $Id: help.c,v 1.2 2011/06/25 00:27:16 tom Exp $ + * + * help.c -- implements the help dialog + * + * Copyright 2011 Thomas E. Dickey + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License, version 2.1 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to + * Free Software Foundation, Inc. + * 51 Franklin St., Fifth Floor + * Boston, MA 02110, USA. + */ + +#include <dialog.h> + +/* + * Display a help-file as a textbox widget. + */ +int +dialog_helpfile(const char *title, + const char *file, + int height, + int width) +{ + int result = DLG_EXIT_ERROR; + + if (!dialog_vars.in_helpfile && file != 0 && *file != '\0') { + dialog_vars.in_helpfile = TRUE; + result = dialog_textbox(title, file, height, width); + dialog_vars.in_helpfile = FALSE; + } + return (result); +} |