diff --git a/usr.bin/menuc/main.c b/usr.bin/menuc/main.c index 2140cc5f2b88..1a6f7ae225f9 100644 --- a/usr.bin/menuc/main.c +++ b/usr.bin/menuc/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.5 1999/06/20 02:07:18 cgd Exp $ */ +/* $NetBSD: main.c,v 1.6 1999/06/20 05:41:45 cgd Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -83,7 +83,7 @@ main (int argc, char **argv) default_info.helpstr = NULL; default_info.exitstr = NULL; default_info.mopt = 0; - default_info.x = 0; + default_info.x = -1; default_info.y = 0; default_info.h = 0; default_info.w = 0; diff --git a/usr.bin/menuc/menu_sys.def b/usr.bin/menuc/menu_sys.def index 9e0db931e8bf..cd60f793d8dc 100644 --- a/usr.bin/menuc/menu_sys.def +++ b/usr.bin/menuc/menu_sys.def @@ -1,4 +1,4 @@ -/* $NetBSD: menu_sys.def,v 1.19 1999/06/20 02:07:18 cgd Exp $ */ +/* $NetBSD: menu_sys.def,v 1.20 1999/06/20 05:41:45 cgd Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -285,7 +285,9 @@ static void init_menu (struct menudesc *m) exit(1); } - if (m->x + m->w + wadd > max_cols) + if (m->x == -1) + m->x = (max_cols - (m->w + wadd)) / 2; /* center */ + else if (m->x + m->w + wadd > max_cols) m->x = max_cols - (m->w + wadd); /* Get the windows. */