diff options
Diffstat (limited to 'lib/libforms')
| -rw-r--r-- | lib/libforms/Makefile | 2 | ||||
| -rw-r--r-- | lib/libforms/bindings.c | 12 | ||||
| -rw-r--r-- | lib/libforms/examples/Makefile | 2 | ||||
| -rw-r--r-- | lib/libforms/objects.c | 18 |
4 files changed, 6 insertions, 28 deletions
diff --git a/lib/libforms/Makefile b/lib/libforms/Makefile index 36b0c4f88f83..55e06c1e2bf5 100644 --- a/lib/libforms/Makefile +++ b/lib/libforms/Makefile @@ -11,7 +11,7 @@ CLEANFILES+= lex.c parser.c y.tab.h beforeinstall: @(cd ${.CURDIR}; cmp -s forms.h ${DESTDIR}/usr/include/forms.h || \ - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 forms.h \ + install -c -o ${BINOWN} -g ${BINGRP} -m 444 forms.h \ ${DESTDIR}/usr/include/forms.h;) .include <bsd.lib.mk> diff --git a/lib/libforms/bindings.c b/lib/libforms/bindings.c index 4ebdd8d99b73..947b5ee47bdd 100644 --- a/lib/libforms/bindings.c +++ b/lib/libforms/bindings.c @@ -45,12 +45,6 @@ bind_tuple(hash_table *htable, char *name, { struct Tuple *tuple; - /* First check to see if we've been bound in already */ - if (hash_search(htable, tuple->name, NULL, NULL)) { - warn("Duplicate tuple name, %s, skipping", name); - return (ST_ERROR); - } - tuple = malloc(sizeof (struct Tuple)); if (!tuple) { warn("Couldn't allocate memory for new tuple"); @@ -61,8 +55,10 @@ bind_tuple(hash_table *htable, char *name, tuple->type = type; tuple->addr = fn; - /* Insert it */ - hash_search(htable, tuple->name, tuple, NULL); + if (hash_search(htable, tuple->name, tuple, NULL)) { + warn("Duplicate tuple name, %s, skipping", name); + return (ST_ERROR); + } #ifdef DEBUG debug_dump_table(htable); diff --git a/lib/libforms/examples/Makefile b/lib/libforms/examples/Makefile index b14392f7b6a2..4389b705c043 100644 --- a/lib/libforms/examples/Makefile +++ b/lib/libforms/examples/Makefile @@ -11,7 +11,7 @@ FORMDIR=${.CURDIR}/../obj FORMDIR=${.CURDIR}/.. .endif -LDADD = -L${FORMDIR} -lforms -lncurses -lmytinfo -ll +LDADD = -L${FORMDIR} -lforms -ldialog -lncurses -lmytinfo -ll DPADD = ${LIBFORMS} ${LIBNCURSES} .include <bsd.prog.mk> diff --git a/lib/libforms/objects.c b/lib/libforms/objects.c index 0e3c29492bf2..0a51caeda958 100644 --- a/lib/libforms/objects.c +++ b/lib/libforms/objects.c @@ -371,21 +371,3 @@ add_menu_option(MENU_OBJECT *menu, char *option) return (++menu->no_options); } - - -/* Default object functions */ - -void -draw_box(OBJECT *object) -{ - /* Gross hack for now */ - ncurses_draw_box(object); -} - -void -draw_shadow(OBJECT *object) -{ - /* Gross hack for now */ - ncurses_draw_shadow(object); -} - |
