Commit Graph

48 Commits

Author SHA1 Message Date
martin
7c9e4fdc5a msg_table_add(): fix mishap in the format safety changes in r1.45 2019-11-16 17:38:09 +00:00
joerg
85722e51b9 Do the fmtcheck for both message lookups to satisfy format string
literal checks.
2019-06-25 21:09:33 +00:00
martin
ec547ea245 Re-add msg_clear() accidently dropped in previous. 2019-06-20 11:31:12 +00:00
christos
0e1db64433 Introduce _fmt_ flavors of the menu functions that take a formatting string
so we can use fmtcheck(3) to check the formats of the messages strings.
2019-06-20 00:45:18 +00:00
martin
f239a04691 msg_prompt_win: allow automatic window height calculation (by passing
height = -1).
2019-03-01 17:02:21 +00:00
martin
cf341f607a Support redrawing all windows when in a msg prompt via Ctrl-l. 2019-01-22 18:39:49 +00:00
martin
0053548254 msg_prompt_win: if the default string fits, show it separately even
in fixed size windows. Previously it would only show up when auto-sizing
prompts figured it would fit (probably an oversight).
2019-01-21 20:28:08 +00:00
mbalmer
40c86e8b4e Remove the advertising clause with the explicit ok from Perry E. Metzger. 2012-03-06 16:26:01 +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
dsl
99db72360c Remove some sign compare warnings. 2010-01-02 16:08:20 +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
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
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
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
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
christos
c3e2d898b4 produce lint free code. 2003-01-10 20:00:50 +00:00
cgd
4515ccfe3e nuke msg_printf() and msg_printf_add(). 1999-07-04 22:55:48 +00:00
cgd
a70b70f98d const-ify strings as appropriate, and convert message 'numbers' from
ints to 'msg's.  'msg' is currently typedef'd as 'const char *', but it'll
become more complex eventually.
1999-07-04 21:30:14 +00:00
cgd
efb4e0892c oops, forgot an _ 1999-07-04 10:39:40 +00:00
cgd
8b6866fc0b privatize msg_beep 1999-07-04 10:35:19 +00:00
cgd
4443f1b7ab nuke msg_{,no}echo, add msg_prompt_noecho 1999-07-04 10:29:30 +00:00
cgd
ed2a9c9df9 nuke msg_prompt_str, msg_prompt_addstr, and msg_table (unused), and make
msg_vprintf private.
1999-07-04 10:13:12 +00:00
cgd
e7861bf936 turn on automatic text layout for the printf and display fns 1999-07-04 09:37:18 +00:00
cgd
e8b59e21bb provide APIs (currently mostly undocumented) to print pre-formatted
(table) text.
1999-07-04 07:40:51 +00:00
cgd
b9b5f1fc26 implement word kill with control-W 1999-06-23 17:42:11 +00:00
cgd
3788a37507 add code to do dynamic message text layout, currently completely disabled. 1999-06-23 17:32:32 +00:00
cgd
beba4bb3e5 replace lots of wclear()/wmove() calls with calls to msg_clear(). wmove()
to 0,0 was unnecessary because wclear() is documented to do that.  also,
the immediate wrefresh() done by msg_clear() means that if we can take
advantage of full screen clear sequence, we will.
1999-06-23 09:19:33 +00:00
cgd
82ecc5c4d7 don't bother calculated up MAXSTR, especially since the value calculated
is _bogus_ in the face of printf-like message formatting!  Instead,
calcuate the max size to format when the message window is set.  We know
that we'll never want to format more characters than can fit in the window.
1999-06-22 15:00:37 +00:00
cgd
49aa92dfc0 don't dereference NULL when thinking about copying the default 1999-06-19 00:40:29 +00:00
cgd
5fa829d0bd teach the message prompting code to use control-U as line kill character.
(not really the right thing, but it already hard-codes backspace and
delete rather than using the terminal settings...)
1999-06-19 00:13:19 +00:00
cgd
a8d01c6140 fix an off-by-one error (it would put up to max_chars plus NUL into the string,
which is one too many).  Also, msgc manual page says that 'def' and 'val'
can be the same string, but the way input was done (characters typed
went directly into val) meant that the contents of 'def' would be corrupted.
If the user backspaced to the beginning of the line and hit return (to accept
the default), they'd get a combination of the old default string and the
new characters they typed.  alloca() a buffer an put new input there to
avoid this problem.
1999-06-19 00:00:48 +00:00
veego
635cf4e57c It was a bad idea to call a function 'beep'.
Rename it to msg_beep to avoid conflicts with the new curses.h.
1999-04-25 09:10:07 +00:00
phil
584c2298f0 Import a simple message system with 'compiled' messages. Used by
the net system install program.
1997-09-26 21:16:38 +00:00