Commit Graph

79 Commits

Author SHA1 Message Date
mbalmer
40c86e8b4e Remove the advertising clause with the explicit ok from Perry E. Metzger. 2012-03-06 16:26:01 +00:00
wiz
d47aeb29ac Use mdoc macros only. 2012-03-02 14:36:04 +00:00
mbalmer
d13b2dd8ad Add msg_printf(fmt, ...), a function to display raw messages without
going through the message catalog.
2012-03-02 14:27:48 +00:00
mbalmer
a4373e9a91 Removing trailing whitespace. 2012-03-02 13:11:57 +00:00
riz
dface83f37 MENU_name -> MSG_name 2012-01-11 00:30:56 +00:00
joerg
88e16b2390 Simplify markup. 2010-05-14 17:24:38 +00:00
dsl
99db72360c Remove some sign compare warnings. 2010-01-02 16:08:20 +00:00
christos
e2f4586574 option noinput 2009-10-29 14:37:56 +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
997634fe14 Fix preamble to match order set out by mdoc(7). Discussed with wiz. 2009-03-09 19:24:26 +00:00
christos
9f409e218e eliminate an alloca use. 2006-12-03 01:18:34 +00:00
dsl
0eca4248ac Fix requests for msg input with a NULL target buffer (or zero length one)
to core dumps from sysinsts mbr code (and others) that use message boxes
for 'press enter to continue' actions.
Fixes PR/34206
2006-09-06 19:24:15 +00:00
dsl
895acb9f43 Rename 'max_chars' to 'val_buf_len' to make it clearer that it has to include
the trailing NUL.
2006-09-06 19:13:51 +00:00
he
eb8d767d84 Sorry, fix syntax error in previous. 2006-05-12 07:20:13 +00:00
he
afd5b9b6d3 Appease gcc 3.3.3 -Wuninitialized warning; fixes build problem for
a multitude of archtectures (prep, alpha, i386, acorn32 and probably
more).
To be documented in doc/HACKS.
2006-05-12 07:19:43 +00:00
dsl
52375ca1f4 If the user removed the default string (after we had put it into the buffer
area - rather than in []), then don't reinstate it on exit
2005-04-09 13:12:31 +00:00
dsl
c68edd41b3 Add (unsigned char) cast to ctype functions
Fixes problems displaying German 'sharp-s', see PR install/27281
2004-11-05 20:45:48 +00:00
dsl
ca03792fbe Remove _erase_ch() it isn't used any more 2004-10-16 12:49:14 +00:00
dsl
43a4fc0e11 NetBSD curses gives the wrong data when you read curscr, need to
add a doupdate() so we save from the correct screen image.
2004-08-14 15:15:57 +00:00
dsl
13a7bd52d8 Save and restore screen underneath prompt boxes 2004-08-13 18:26:52 +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
52ebceff84 Improve editing of input fields:
<- and -> move within the field
-> will pull default string into empty buffer
^H (etc) will delete default string from buffer (first press)
Put default string into display buffer if long and input in box.
Scroll input text if longer than space on line.
2004-06-05 19:05:36 +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
wiz
4dff07bdce Bump date for previous. 2003-10-15 20:02:10 +00:00
dsl
556e606c59 Add a msg_row() function that returns the current screen row.
Allows sysinst to place menus below any header text.
Remove msg_*.1 man pages for all the functions (they are in the wrong place
are a fair waste of directory space).
2003-09-25 18:32:10 +00:00
dsl
ee1a61d7eb No need for wrefresh() in msg_clear(), screen will be updated later.
Stops obvious redraw of header of some menus.
2003-07-28 09:55:24 +00:00
dsl
5cd6e49033 Change variable name to compiles with WARNS=3 2003-07-25 07:48:02 +00:00
lukem
abcf838dab only use __RCSID() if it is #defined 2003-07-17 08:33:03 +00:00
itojun
2fe0488981 use bounded string op 2003-07-14 09:33:08 +00:00
dsl
f2c019d534 Change 'Magic number' of menu text files.
Correct calculation of window width in msg_prompt_win().
2003-07-07 12:22:35 +00:00
dsl
e2724ab4be Add support for reading messages from a text file - msg_file() and msg_string().
Use subwin() in msg_prompt_win() now libcurses is fixed.
Some KNF changes I seem to have forgotten to commit on their own :-(
2003-06-27 22:11:59 +00:00
agc
a8d6388e6f Add NetBSD RCS Ids. 2003-06-23 13:05:47 +00:00
dsl
62a063f96b Change msg_window() to return old window (temp buffer size isn't too important)
Change msg_promt_win() to create the window.
Number MSG_xxx from 1 (because 0 is NULL)
2003-06-10 17:24:17 +00:00
dsl
15cd94ddd8 Add msg_prompt_win() that will prompt in the specified window (instead of
the default one), and with a box around the window if >= 3 lines.
Stop the char delete from killingthe RHS of any box.
Make msg_string a noop for invalid strings (might be quoted text).
2003-06-04 19:00:26 +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
christos
c3e2d898b4 produce lint free code. 2003-01-10 20:00:50 +00:00
wiz
e65d3f8091 Begin new sentences on new lines. Minor mdoc improvements. 2002-09-26 01:26:53 +00:00
lukem
2c16ea6f7e use NETBSDSRCDIR as appropriate 2002-09-19 11:31:21 +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
wiz
d2d0c78429 Use standard headers. 2001-12-01 20:43:39 +00:00
wiz
aded0d2cce Whitespace cleanup. 2001-12-01 16:43:07 +00:00
tv
36d6a03ffd Formatting cleanup. 2001-11-12 20:26:55 +00:00
bjh21
92fa26019d Move the default path definition from msgdb.c to a new pathnames.h, as
required by KNF.  This will also be required to allow msgc to be installed
into ${TOOLDIR} properly.
2001-10-15 22:11:12 +00:00
jmc
7399da0682 Add appropriate ifdefs so tools reachovers build clean 2001-10-05 22:54:51 +00:00
wiz
d6493c16ff Fix typos and wording. 2000-12-04 22:33:52 +00:00
jhawk
52e42eac03 Document paragraph-filling behavior of msg_display{,_add}(), and
document function of msg_table_add(). What a whacko api.
2000-07-06 20:10:42 +00:00
jhawk
4ac74dd2e6 Add msg_*() functions to NAME (they are already in SYNOPSIS), and
add MLINKS for them. Perhaps later on they should be broken out into
a section other than 1? At least now they are findable via "man -k" etc.
2000-07-06 19:30:11 +00:00
matt
fcd0fb118f Make gcc 2.96 (and maybe earlier) happier. Include <stdlib.h>,<string.>,
etc. as appropriate to get exit,srncmp,abs,abort,etc.
Add -I${.CURDIR} to a few Makefiles
2000-07-03 02:51:12 +00:00