update to Thomas Dickey's fixed version. add license marker.

ok robert@
This commit is contained in:
sthen 2008-06-30 12:58:04 +00:00
parent bedfe24e50
commit cb1f10b94c
9 changed files with 33 additions and 152 deletions

View File

@ -1,19 +1,29 @@
# $OpenBSD: Makefile,v 1.15 2007/09/15 23:54:16 merdely Exp $
# $OpenBSD: Makefile,v 1.16 2008/06/30 12:58:04 sthen Exp $
COMMENT= format the display of a shell script
COMMENT = format the display of a shell script
DISTNAME= dialog-0.6z
PKGNAME= ${DISTNAME}p0
CATEGORIES= misc
MASTER_SITES= ${MASTER_SITE_SUNSITE:=utils/shell/}
V = 1.1-20080316
DISTNAME = dialog-${V}
PKGNAME = dialog-${V:S/-/./}
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c curses
EXTRACT_SUFX = .tgz
USE_GMAKE= Yes
NO_REGRESS= Yes
CATEGORIES = misc
MASTER_SITES = ftp://invisible-island.net/dialog/
HOMEPAGE = http://invisible-island.net/dialog/dialog.html
# LGPL
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB = c m ncurses
CONFIGURE_STYLE=gnu
MAKE_FILE = makefile
NO_REGRESS = Yes
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
MD5 (dialog-0.6z.tar.gz) = aAElngPSwH85S7tLsm38XQ==
RMD160 (dialog-0.6z.tar.gz) = F0pmQCeQOIs6za0bSeYk/vzy37A=
SHA1 (dialog-0.6z.tar.gz) = PJSDVUu7Y7uIOOH3sx8mAKMxmK0=
SHA256 (dialog-0.6z.tar.gz) = W2D2cZqlx8WvmYxFUGIAj8mpFdPw0tpeAi5RZUuMKBo=
SIZE (dialog-0.6z.tar.gz) = 50901
MD5 (dialog-1.1-20080316.tgz) = PSYsvEHk2yMlHnvpJMSiiw==
RMD160 (dialog-1.1-20080316.tgz) = 28LsGPsYHKO+b6kr4EKfsrGysrE=
SHA1 (dialog-1.1-20080316.tgz) = 3hNmJv1PPt91s5l9dbub8VHrOfA=
SHA256 (dialog-1.1-20080316.tgz) = vRGsvFdEKTAWDbvOotUCSifHF3TCRBLES5zezpiU5wc=
SIZE (dialog-1.1-20080316.tgz) = 373022

View File

@ -1,49 +0,0 @@
$OpenBSD: patch-Makefile,v 1.1 2007/10/26 22:00:31 ajacoutot Exp $
--- Makefile.orig Thu Jan 9 07:19:34 1997
+++ Makefile Fri Oct 26 23:53:28 2007
@@ -17,10 +17,10 @@ HAVE_RC_FILE=true
# can be disabled to make dialog a bit smaller (could be done for more things)
HAVE_GUAGE=true
-BINDIR = /usr/bin
-MANDIR = /usr/man/man1/
+BINDIR = ${PREFIX}/bin
+MANDIR = ${PREFIX}/man/man1/
-CC = gcc
+#CC = gcc
CPP = gcc -E
OPTIM = -O2 -Wall -Wstrict-prototypes -fomit-frame-pointer -pipe
#OPTIM = -O -Wall -Wstrict-prototypes -g -pipe
@@ -29,8 +29,8 @@ OPTIM = -O2 -Wall -Wstrict-prototypes -fomit-frame-poi
#----------------------------------------------------------------------------
# do not edit below this line
-CFLAGS = $(OPTIM) -DLOCALE -DVERSION=\"0.6z\"
-LDFLAGS = -L .
+CFLAGS += -DLOCALE -DVERSION=\"0.6z\"
+LDFLAGS += -L .
LDLIBS = -ldialog
OBJS = checklist.o inputbox.o menubox.o msgbox.o \
@@ -42,8 +42,8 @@ CFLAGS+=-DHAVE_LIBGPM
OBJS+=mouse.o
endif
ifeq ($(HAVE_NCURSES), true)
-CFLAGS+=-DHAVE_NCURSES -I/usr/include/ncurses
-LDLIBS+=-lncurses
+CFLAGS+=-DHAVE_NCURSES -I/usr/include/curses
+LDLIBS+=-lcurses
endif
ifeq ($(HAVE_RC_FILE), true)
CFLAGS+=-DHAVE_RC_FILE
@@ -59,7 +59,8 @@ SRCS = $(OBJS:.o=.c)
all: libdialog.a dialog
libdialog.a: $(OBJS)
- ar rcs libdialog.a $(OBJS)
+ ar rc libdialog.a $(OBJS)
+ ranlib libdialog.a
dialog: dialog.o

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-dialog_c,v 1.1 2007/10/26 22:00:31 ajacoutot Exp $
--- dialog.c.orig Thu Jan 9 07:14:39 1997
+++ dialog.c Fri Oct 26 23:53:28 2007
@@ -56,7 +56,7 @@ static struct Mode modes[] =
{"--radiolist", 9, 0, 3, j_radiolist},
{"--inputbox", 5, 6, 1, j_inputbox},
#ifdef HAVE_GUAGE
- {"--guage", 6, 6, 1, j_guage},
+ {"--gauge", 6, 6, 1, j_guage},
#endif
{NULL, 0, 0, 0, NULL}
};
@@ -197,7 +197,7 @@ fprintf(stderr," %s [--title <title>] [--separat
\n --checklist <text> <height> <width> <list height> <tag1> <item1> <status1>...\
\n --radiolist <text> <height> <width> <list height> <tag1> <item1> <status1>...\n",name);
#ifdef HAVE_GUAGE
-fprintf(stderr," --guage <text> <height> <width> <percent>\n");
+fprintf(stderr," --gauge <text> <height> <width> <percent>\n");
#endif
exit (-1);
}

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-dialog_man,v 1.1 2007/10/26 22:00:31 ajacoutot Exp $
--- dialog.man.orig Thu Jan 9 07:15:24 1997
+++ dialog.man Fri Oct 26 23:53:28 2007
@@ -41,7 +41,7 @@ these types of dialog boxes are implemented:
.BR yes/no " box," " menu" " box," " input" " box,"
.BR message " box," " text" " box," " info" " box,"
'\" NOHAVEGUAGE
-.BR guage " box,"
+.BR gauge " box,"
'\" NOHAVEGUAGE
.BR checklist " box, and" " radiolist" " box."
.SH OPTIONS
@@ -189,14 +189,14 @@ that you can indicate which entry is currently selecte
.IR status " to " on "."
'\" NOHAVEGUAGE
-.IP "\fB\-\-guage \fItext height width percent\fR"
-.RB "A " guage " box displays a meter along the bottom of the box.
+.IP "\fB\-\-gauge \fItext height width percent\fR"
+.RB "A " gauge " box displays a meter along the bottom of the box.
The meter indicates the percentage. New percentages are read from
standard input, one integer per line. The meter is updated
to reflect each new percentage. If stdin is XXX, then the first
line following is taken as an integer percentage, then subsequent
lines up to another XXX are used for a new prompt.
-The guage exits when EOF is reached on stdin.
+The gauge exits when EOF is reached on stdin.
'\" NOHAVEGUAGE
'\" NOHAVERC

View File

@ -1,24 +0,0 @@
$OpenBSD: patch-guage_c,v 1.1 2007/10/26 22:00:31 ajacoutot Exp $
--- guage.c.orig Sat Aug 12 00:54:52 1995
+++ guage.c Fri Oct 26 23:53:28 2007
@@ -86,16 +86,16 @@ dialog_guage (const char *title, const char *prompt, i
if (feof (stdin))
break;
- gets (buf);
+ fgets (buf, sizeof(buf), stdin);
if (buf[0] == 'X') {
/* Next line is percentage */
- gets (buf);
+ fgets (buf, sizeof(buf), stdin);
percent = atoi (buf);
/* Rest is message text */
prompt_buf[0] = '\0';
- while (strncmp (gets (buf), "XXX", 3))
- strcat (prompt_buf, buf);
+ while (strncmp (fgets (buf, sizeof(buf), stdin), "XXX", 3))
+ strlcat (prompt_buf, buf, sizeof(prompt_buf));
prompt = prompt_buf;
} else
percent = atoi (buf);

View File

@ -1,3 +1,3 @@
Dialog is typically invoked from a shell script and puts nice
yes-no/checklist/radio-button - menus on your screen.
(Text is just passed on as arguments to dialog.)
Dialog is typically invoked from a shell script to provide a set of
curses widgets, e.g. yes/no, checklists, input boxes, menus, progress
boxes, text boxes, etc.

View File

@ -1,3 +1,3 @@
@comment $OpenBSD: PLIST,v 1.6 2004/09/15 17:54:15 espie Exp $
bin/dialog
@comment $OpenBSD: PLIST,v 1.7 2008/06/30 12:58:04 sthen Exp $
@bin bin/dialog
@man man/man1/dialog.1

View File

@ -1,5 +0,0 @@
fixed some trivial buffer overflows in guage.c
other boundary checking errors abound, not just in string manipulation -
e.g. draw_* routines, etc. nothing security-critical, just not robust.