Commit Graph

157 Commits

Author SHA1 Message Date
blymn d84a936f4b Fix for PR lib/47398
Move cursor to end of the currently active field and sync the cursor
location so the cursor get positioned correctly when the form window
is refreshed.
2021-10-25 06:25:18 +00:00
blymn 5b90c1a33c Fix for PR lib/47397
Fix a misinterpretation of the role of field fore and back.  Now field
pad is rendered in the back attribute always instead of only being used
for the non-current field.
2021-10-19 21:22:20 +00:00
christos 0cf983201b - fix memory leak
- xxx questionable allocation
- remove casts
- use sizeof(*var)
- bcopy -> memcpy/memmove
2021-04-13 13:13:03 +00:00
mrg 6c68c9665f allocate the potential trailing nul as well. 2021-04-13 00:29:42 +00:00
roy aadfdb111b terminfo: promote numeric parameters from short to int
POSIX mandates implementations must support upto a short but may exceed it.
When NetBSD terminfo was implemented, no terminfo description used over
a short, but because ncurses has supported ints for some time, some now do.

Infact, such a terminfo description was imported where colour pairs for
screen-256color went up to 65536 which exposed a bug in the existing
implementation where it set to zero. Because the number might mean
something more than a range, we need to be able to store it accurately.

This requires a version bump because whilst the API hasn't changed thanks
to C int promotion, the ABI has. Also the underlying database structure
has changed as well - we now store the numeric paramter inside a uint32_t
field rather than a uint16_t one.
Whilst this change can still read the old style database, the old one
cannot read the new one and thus we now maintain the database as
terminfo2.cdb, leaving the old library and database alone so old programs
still work fine.

libcurses, libfrom, libmenu and libpanel have also been bumped to
accomoate this change.
2020-03-13 15:19:24 +00:00
blymn 4aba88d186 Bump major number due to libcurses major bump 2019-06-30 22:17:22 +00:00
msaitoh 54c9821e53 "s/ are are / are /" in comment. No functional change. 2018-11-08 06:34:40 +00:00
abhinav 8756784cea Remove duplicate MLINK entry for dup_field.3
(it's already defined 3 lines above)
2017-10-23 15:34:45 +00:00
abhinav 73341ac74a Add the function names to the NAME section 2017-10-23 15:23:55 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
dholland 6b93d6fdd7 PR 51190 David Binderman: simplify redundant conditionals.
Also add paranoia when looping on isdigit().
2016-05-30 17:48:29 +00:00
christos 23a151b438 PR/50919: David Binderman: Re-do all the debug stuff in a more sustainable way. 2016-03-09 19:47:13 +00:00
joerg 69a50ce4a2 Counting from 0 to n-1 can go wrong badly, if n is unsigned and zero and
the counter variable is not of a type larger than n. Fixes PR 50490.
2015-12-11 21:22:57 +00:00
joerg 53ebe24369 Constify set_field_buffer. 2015-09-07 15:50:49 +00:00
snj f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
christos f1abc9f9db goodbye CIRCLEQ, welcome TAILQ 2013-11-26 01:17:00 +00:00
christos cdffa8c1c4 Simplify previous. 2013-11-21 15:40:17 +00:00
blymn 0eefb0f72f Correct the allocation for the reformat buffer, thanks to mlelstv for
the fix.
2013-11-21 09:40:19 +00:00
mbalmer 8b29ccb36a Fix typo. 2013-01-19 16:11:03 +00:00
njoly 17568cd1bf Kill some extra spaces in function arguments. 2012-10-08 18:15:09 +00:00
matt 510d3d4c1d These directories default to WARNS=2 2012-03-21 05:38:49 +00:00
joerg 93a30e6d6f Kill a bunch of manual __attribute__ usages and replace them with the
equivalent sys/cdefs.h invocation.
2011-11-28 12:44:18 +00:00
joerg 896c6d5b09 Save space, kill some () 2011-05-23 20:43:02 +00:00
tnozaki 50eb6aadde cast isblank(3)'s argument to unsigned char. 2010-05-13 17:52:11 +00:00
joerg f63b030c15 Use .In instead of .Ar Pa for header files. 2010-03-22 21:58:31 +00:00
roy 98eb889579 Userland now builds and uses terminfo instead of termcap.
OK: core@, jdc@
2010-02-03 15:34:37 +00:00
christos 46edb91e9f bump shared libraries. 2009-01-11 03:07:47 +00:00
joerg cb41266e10 Depends on libcurses. 2008-03-11 23:06:04 +00:00
hubertf 55ac93d329 Remove more duplicate #includes, and a few spurious whitespaces at EOL
From Slava Semushin <slava.semushin@gmail.com>
2007-01-17 23:24:22 +00:00
dbj b41feff50f fixes for installing into a case insensitive $DESTDIR
when files may have hard links to a a name that only differs by case
  - change install to unconditionally remove its temporary file
    when installing hard links with -r.  This avoids problems when
    built with posix rename(2) semantics and reinstalling an existing
    hard link.
  - rework hard link targets in bsd.man.mk and bsd.links.mk
    to use makefile constructs instead of shell constructs
  - always reinstall hard links that may have case conflicts, even
    when MKUPDATE=yes, this ensures that they get added to METALOG
  - remove man pages which were hard linked to themselves in libform
  - remove improper hard link command for existing man page in libkrb5
  - fix libl's makefile to include bsd.lib.mk at end
  - remove shell quoting in link target for test's [.1 man page
2006-09-11 22:24:09 +00:00
christos 98527081b1 make debug build work. 2006-04-09 00:44:40 +00:00
christos 2ca947f5e7 Coverity CID 107[123]: Leave the assertions in the code, not only when DEBUG
is set.
2006-03-19 20:08:09 +00:00
christos 51566e9c85 Coverity CID 1553: Fix memory leak. While here, fix malloc calls:
- don't cast
- use sizeof(var) instead of sizeof(type)
2006-03-19 20:02:27 +00:00
wiz 9ea0254b5a We want size_t arguments, so just cast to size_t, instead of casting
to unsigned long and getting a warning on i386.
2006-02-07 20:07:42 +00:00
peter 3d73a5fb3f Add missing prototype for set_max_field() and bump date.
From xs at kittenz dot org in PR/18668.
2005-10-15 12:43:20 +00:00
wiz b86a72cb8b Improve RETURN VALUES section. 2004-11-24 12:47:20 +00:00
wiz 20a78941e4 Mark up TRUE and FALSE. 2004-11-24 12:42:51 +00:00
wiz f039f78c3f \-1, not -1. 2004-11-24 12:40:54 +00:00
wiz f91573afd7 Mark up NULL. 2004-11-24 12:26:23 +00:00
wiz 7b09170529 Use Aq instead of \*[Lt]\*[Gt]. 2004-11-24 12:12:19 +00:00
wiz a7804596c1 Bump date for previous; mark up defined values with Dv;
use Aq instead of \*[Lt]\*[Gt].
2004-11-24 12:09:13 +00:00
blymn 19f07fb20a * Rewrote internal handling of multiline field line data to fix a bug
where a newly opened line would immediately get wrapped out of existence.
  The old method of handling lines in a multiline field did not cope with
  this elegantly.

* Added new field flag O_REFORMAT which, when set, returns the field
  buffer with newlines inserted where the line wrapped.  Previously, there
  was no way of preserving the on screen format of a multiline field.

* Added new file gdbinit which contains a macro to verify and print
  the multiline field line data structure.

* Bumped libform major number due to changes in the _form_field structure.
2004-11-24 11:57:09 +00:00
itojun da88342476 NI_WITHSCOPEID was not picked up by IETF standardization process 2004-11-16 06:04:12 +00:00
dsl 1793b7dd69 Use (unsigned char) cast to sanitise arguments to ctype functions. 2004-10-28 21:14:52 +00:00
dsl d349cd6749 Fix a load of international alphabet problems with isxxx() and toupper()
Change isspace(*char_ptr) to isspace(*char_ptr & 0xff) so that the correct
piece of memory is looked at for the bit mask.
gcc optimises out the '& 0xff' (on i386 at least).
Fixes problems found by gcc when the splurious (int) cast is removed
from the #defines in ctype.h
2004-10-27 19:59:24 +00:00
simonb 9bc855a931 s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
2004-04-23 02:58:27 +00:00
wiz 6cbd2718d7 Use mdoc macros instead of roff to mark up table;
mark up some more stuff.
2004-04-21 11:45:42 +00:00
kim 293fb86ada Formatting tweaks to make things line up yet not have columns
run into each other.  Fix one typo while here.
2004-04-21 02:46:34 +00:00
jdc ad95b1541c Increment major number (to 4) because of the libcurses major number change
and because of the change to match_enum().
2004-03-22 19:00:09 +00:00
jdc 582694413f Correct the fourth parameter to match_enum() to "exact" instead of "no blanks".
From Brett Lymn.
Part of the fix for PR bin/24604.
2004-03-22 18:59:48 +00:00