Commit Graph

103 Commits

Author SHA1 Message Date
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
dsl
13d47d34ac Finger trouble in previous commit. 2003-05-09 10:21:43 +00:00
wiz
846b4ae5e2 Join some lines; mdoc improvements; use more macros. 2003-05-09 08:20:27 +00:00
dsl
7eb71f323d Update man page for recent changes, update code to match man page... 2003-05-09 07:30:50 +00:00
phil
706027816a Remove extra characters in example strings. 2003-05-09 05:28:30 +00:00
dsl
b143b30e1c Accept variable names for menu titles and options to allow internationalisation.
Allow user code to define a hook to lookup message texts before any get used.
It is now possible to have a langauge independant menu file.
2003-05-08 16:20:56 +00:00
dsl
f579b0bca7 Let page up/down go to first/last menu item when it is already showing. 2003-05-07 16:54:39 +00:00
dsl
13bfd47102 Add left and right arrows to list of keys that page menes up/down.
Make 'page down' go to 'exit' extry on menu (not stop one short).
Make 'exitstring' imply 'exit'.
2003-05-07 16:39:45 +00:00
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
christos
c3e2d898b4 produce lint free code. 2003-01-10 20:00:50 +00:00
wiz
e0f83e44f2 Replace some \n with \en for correct display. Closes PR 18539. 2002-10-05 11:17:32 +00:00
wiz
11b1026044 Ispell. Begin new sentences on a new line. mdoc fixes. 2002-09-26 01:19:38 +00:00
wiz
caa8358c81 Correct `.Na' misuses reported in bin/17007, and some other mandoc improvements
while I'm here.
2002-05-24 22:09:20 +00:00
blymn
19f21e4357 Modified input key handling to use libcurses keypad mode to assemble
multi-byte key sequences instead of doing it itself.
2002-04-04 14:11:23 +00:00
phil
9ee53e66b1 Fix bug in AVL tree routines. Correct man page. 2002-03-21 05:15:39 +00:00
tv
081041f2f7 MAX has special meaning in host tools. #undef it first. 2002-03-07 20:43:29 +00:00
ross
2a76afae02 Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:36:18 +00:00
tv
9fbd88883c Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
  sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
2002-01-31 22:43:33 +00:00
tv
a328e34106 Make almost all tools compile and run properly on non-NetBSD hosts. (In
particular, most tools now run correctly on Solaris 7.)
2002-01-29 10:20:28 +00:00
lukem
b0b0a32ad7 Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly).
Otherwise the appropriate MKxxx=no won't be defined .
2001-12-12 12:24:19 +00:00
tv
8e6f7afb5b MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
ross
a15e9b5f48 tweak previous for lp64 so sysinst will compile on alpha 2001-12-08 01:10:37 +00:00
christos
5c04ef3caa Fix for the new curses code. Inspired by changes from MINOURA Makoto. 2001-12-06 16:38:30 +00:00
wiz
d41c96b482 Sort sections, punctuation nits, use standard headers.. 2001-12-01 20:39:13 +00:00
wiz
aded0d2cce Whitespace cleanup. 2001-12-01 16:43:07 +00:00
perry
c50182835e 1) Use standard box drawing characters. It looks a whole lot better
than *'s.
2) On displays that handle color, do a cheesy white-on-blue theme.

As silly as it may seem, many people seem to respond better to color
and nice borders for sysinst.

XXX will rig up a way to do this more cleanly.
2001-11-17 01:12:47 +00:00
tv
36d6a03ffd Formatting cleanup. 2001-11-12 20:26:55 +00:00
bjh21
e0b2c4633d Move hard-coded /usr/share/misc from mdb.c to pathnames.h, in accordance
with KNF.
2001-10-15 22:20:03 +00:00
jmc
7399da0682 Add appropriate ifdefs so tools reachovers build clean 2001-10-05 22:54:51 +00:00