Commit Graph

131 Commits

Author SHA1 Message Date
christos 926a7cc331 option noinput 2009-10-29 14:35:25 +00:00
joerg 5f6627fa61 mandoc(1): -width is redundant for a item list 2009-07-11 18:38:30 +00:00
drochner 0fa7059102 define YY_NO_INPUT where appropriate, from Kurt J. Lidl per PR misc/41160 2009-04-20 16:05:29 +00:00
lukem c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
joerg 1cc1109801 Specify width for tag list. 2009-03-10 20:23:47 +00:00
joerg 997634fe14 Fix preamble to match order set out by mdoc(7). Discussed with wiz. 2009-03-09 19:24:26 +00:00
tls 2a6850b9a9 Fix PR37377 from Devon O'Dell: num_menus can be referenced without being
emitted if dynamic menus are not enabled.
2008-01-16 09:21:33 +00:00
he d59cb8e7b8 Fully initialize the last element of menu_def[]. 2006-10-23 19:29:48 +00:00
reed 37bfcfc9dd Another mispelling fix. I should have done these all in one commmit
but I was editing several files and didn't realize the multiple
were all in one file.
2006-06-17 02:27:05 +00:00
reed 5cb179a5f0 Fix typo (or mispelling). 2006-06-17 02:19:57 +00:00
reed c5f16e7060 Fix mispelling. 2006-06-17 02:06:17 +00:00
dsl 2acc3971af Allow menu entry option names to be code fragments that (should) call
wprintw(menu->mw, ftm, args) to generate the menu label.
Allows static menu labels to contain the current value (like a lot of the
dynamic menus do).
Correct width calculations, and bound menu table lookup.
2006-02-20 21:06:40 +00:00
simonb 3cebd9325e White space nit- don't put a space before/after increment/decrement
operators.
2005-02-11 06:21:21 +00:00
wrstuden 699e5d41fb In procese_menu, make sure we initializie the menus
_before_ we access the MENUS macro. Otherwise we get a segfault.
2004-09-17 18:27:28 +00:00
wrstuden e22217703e Catch up with current menuc. 2004-09-17 18:16:44 +00:00
wrstuden af7a153178 Scoot a menu so it fits better in an xterm. 2004-09-17 18:16:31 +00:00
wrstuden 3f87739bc4 Add parenthesis to silence a compiler warning. 2004-09-17 18:15:01 +00:00
dsl c4d2d498a2 Call doupdate() before copying out of stdscr (avoids PR 26660)
Delete a diagnostic variable.
2004-08-14 15:51:08 +00:00
wiz 27ef0f1c37 Sort sections; avoid to mark up punctuation unnecessarily; use \*[Lt]\*[Gt]
instead of <>; use Sq.
2004-08-02 22:27:36 +00:00
dsl f5b2286ba1 Support menu windows that preserve the underlying screen contents.
(Needs a libcurses fix as well).
No need to ponce about with __m_endwin (to remember we've done endwin()),
   the old recovery was wrong in any case - but I've left something that
   will do an explicit redraw.
Allow the 'help' text to be from a variable (and hence translated).
Fix the display of help so that the screen underneath is actually cleared.
Preserve the screen contents while displaying help - redraw is too hard.
Use endwin(); doupdate(); to do the full refresh when ^L is typed.
Move menus up the screen if they would hit the bottom with too few lines
   to show an item and the scroll text (happens with big titles).
Make 'y=0' center the window vertically - use of 0 means you can't have
   a menu starting on the topline, but this is unlikely to be a problem.
Make all the menu options settable from the control file, not just from
   dynamic menus.
Redo menu option list part of man page.
2004-08-02 21:29:07 +00:00
dsl e92cba3e15 Make '0' be a valid number 2004-07-18 10:57:32 +00:00
jmc b2f782612f Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
2004-06-20 22:20:14 +00:00
dsl 273835431b Allow menu boxes to be forced down the screen if the message text is long. 2004-02-29 23:13:23 +00:00
dsl e2be127214 Use an array of pointers to menu definitions so the array can grow without
leaving code having stale pointers to menu ites.
2003-12-21 21:42:48 +00:00
dsl 092f7d2e16 Add '[no] clear' to lex/yacc spec.
Fix some menu sizing bugs for menus where the user code changes the size.
Don't reduce the size of a menu with 'scroll' every timeit is displayed.
2003-11-30 09:22:25 +00:00
dsl 1cedefc117 - Call delwin() when we stop displaying a window, saves space and newwin
is fast enough anyway.  Lets the calling code change some fields (eg
  the title for the 'yes/no' menu) between calls.
- Don't update m->x, m->y, m->w the changed values aren't needed once
  the window has been created.
- Allow the window title to span multiple lines.
- Fix a nasty bug caused by having pointers into the memory area freed
  by realloc when creating lots of dynamic menus.
- Fix check that ought to have allowed dynamic menus to be deleted.
2003-11-22 22:18:32 +00:00
dsl 33dbb7eda9 Fix box width calculation for menus without a 'shortcut' ("a: "). 2003-11-20 13:03:44 +00:00
wiz 6b3137c450 Bump date for last changes; remove duplicate "the"; mark up NULL. 2003-11-11 13:41:37 +00:00
lukem 171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
dsl 51fe540362 Add an MC_ALWAYS_SCROLL to mean "always allow space for 'scrolltext'".
All scrolltext to be #defined so it can be translated.
2003-10-18 18:26:53 +00:00
dsl 0795bf3e7a Allow -ve integer constants in menu file.
Make y == -1 => after current messages (if msg_defs.h included).
Defer menu initialisation until after post_act() called (so function can
fiddle with more things.)
2003-09-27 09:44:13 +00:00
takemura ffd38d4b14 Fixed array index checking to avoid segmentation fault problem. 2003-09-21 02:17:39 +00:00
dsl 048dfb4fde More tweaks for sysinst.
Let 'display action' routine set menu->cursel (ie default menu item).
Remove 'opt' parameter I added to action routine (not that useful).
Make man page slightly closer to reality.
2003-07-27 07:21:57 +00:00
dsl 2304abbd2b Spinkle some consts and remove/change parameter names so that sysinst
will compile with WARNS=3.
2003-07-25 07:22:05 +00:00
itojun 425dfd313c style 2003-07-23 04:12:33 +00:00
lukem abcf838dab only use __RCSID() if it is #defined 2003-07-17 08:33:03 +00:00
dsl f19029a851 Add OPT_IGNORE flag which makes menu item inactive.
Add menu-dependant function to draw menu lines (when opt_name NULL).
2003-07-07 12:20:56 +00:00
dsl e28e42e092 Improve diagnostic message 2003-06-27 22:06:14 +00:00
agc a8d6388e6f Add NetBSD RCS Ids. 2003-06-23 13:05:47 +00:00
dsl 18439070c7 Do not let the cursor sit on menu lines that do nothing.
(Maybe page up/down should behave similarly - but that one is harder)
2003-06-16 20:57:43 +00:00
dsl 19605a628c Add extra command 'allow dynamic messages' which will push all texts through
the msgc translation service.
Allow for texts being NULL as well as "", don't use strlen() to test for "".
2003-06-10 17:19:04 +00:00
dsl 3c95a92e07 More changes to improve sysinst:
- pass 'menudesc' and 'arg' values to post_act() and exit_act()
- add set_menu_numopt() for variable length menus
- fix (badly broken) allocation/free of dynamic menus
- option to allow default selection to be the exit line
2003-06-09 18:48:40 +00:00
dsl 3f8c566477 Add 'exit' (for exit text) parameter to new_menu() for dynamic menus.
Correct calculation of menu height and whether scrolling needs (was wrong
if a height was specified that was smaller that the number of lines needed).
Move keypad(m->mw, TRUE) to stop core dump when newwin() fails.
Allow for calling code hacking m->h (to reduce number of lines displayed).
Add a MC_NOCLEAR option to leave menu text showing when doing action.
2003-06-04 19:07:39 +00:00
dsl 6af8425f81 Add a 'void *' argument to process_menu() so that some more global variables
can be killed.
2003-06-03 11:51:56 +00:00
dsl 76c4788c16 More trivial changes...
Exclude '<: page up, >: page down' line from m->h count to simplify code.
2003-06-03 08:49:53 +00:00
dsl 99778eca69 Whitespace and other layout stuff.
Change an elsif sequence to switch()
2003-06-02 21:19:35 +00:00
lukem 826a14607a Now that <bsd.prog.mk> DTRT if HOSTPROG is defined (i.e, it is a no-op),
there's no need to special-case .include-ing it.
2003-05-18 07:57:31 +00:00
dsl 826d79a6f7 Re-instate last change, the sysinst I've just commited doesn't stand
a chance unless those fields are const char *.
2003-05-16 19:57:22 +00:00
lukem b86763939b Revert part of previous, and remove "const" from "char *opt_name" and
"char *title", since it causes compile problems for the only program
that uses menuc (sysinst).
2003-05-09 12:07:53 +00:00
dsl 66fb8e715d Need 'const' on local variable - since I added const to the structure field. 2003-05-09 10:24:50 +00:00