Commit Graph

33 Commits

Author SHA1 Message Date
blymn 680d3cd9aa Fixed casting bug in array indexing, a signed char was being sign
extended when cast to unsigned, made the cast "unsigned char"
2001-01-10 14:02:31 +00:00
itojun c8df79fc84 do not call wrefresh() uncondintionally from wgetch(). call it only
when the window was touched (is_wintouched()).
the previous behavior damaged existing applications, especially when it issues
lots of subwindow manipulation and mvcur().

it was introduced in 1.23 -> 1.24 or sometime before.
2000-09-23 09:34:07 +00:00
itojun 2e661a4ef6 free region got from t_getstr(). we will experience memory leak if
we call initscr() multiple times (rare, but it's better to be pedant).
2000-07-31 18:55:35 +00:00
itojun 78d8274105 fix 8bit cleanness of getch() and wgetch(). never use char variable against
stdio functions which return "int" (including getchar()).
the bug was introduced in 1.9 -> 1.10.  fixes PR10723.
2000-07-31 16:22:46 +00:00
jdc c1ea940db9 Send 'ks' sequence from first call to keypad(win, TRUE) only and not from
wgetch().  Don't send 'ke' sequence from keypad(win, FALSE) or wgetch().
This makes us compatible with Solaris.
Suggested by ITOH Yasufumi.
2000-05-25 06:46:26 +00:00
jdc 985e3d49d7 Send, if necessary, 'ks' or 'ke' sequences from keypad() and wgetch().
Fixes PR 10116.
2000-05-17 16:23:49 +00:00
blymn 2128c86b68 * Made erasechar and killchar into functions
* Modified __init_getch to use termcap handle that has been allocated
  (_cursesi_genbuf) instead of refetching it.
* Make wgetstr support erase - this is not a full blown SUSv2 version
  but it is a start.
2000-05-01 12:30:30 +00:00
mycroft 317366b8b0 No, really, make sure ECHO is cleared in cbreak() mode too. 2000-04-27 17:50:01 +00:00
jdc 7b941b625f Add extra KEY_* definitions (from SUSv2).
Fix `gcc -Wuninitialized`.
2000-04-27 00:23:26 +00:00
blymn cf5ffc46f2 * Fixed bug in copywin which was copying more than it should.
* Changed call to wrefresh in wgetch to be before input read.
* Changed default old cursor mode to be high vis in curs_set
* Added documentation for various new functions to fns.doc.
2000-04-23 14:14:49 +00:00
thorpej 6600b61c73 Fully initialize the structure allocated in new_keymap(). 2000-04-22 21:14:19 +00:00
blymn 5cd0c74b1f * Added ungetch
* Converted inkey and getch to use getchar instead of read so ungetch
  will work.
2000-04-22 14:32:44 +00:00
jdc 91b2edc9db Make sure we don't read a negative character value (again). 2000-04-18 21:44:48 +00:00
blymn ec6e2540fe Multiple fixes:
* Added Bill's fixes for errors when compiling with WARNS=1
* Incorporated fixes to make usage of unctrl consistent in debug and
  made improvements to ctrace - it now timestamps it's output better.
* Reduced the number of mallocs done by __init_getch by allocating key
  structs in bunches instead of singly.
* Removed the shadowing of global declarations in newwin and subwin
  functions
2000-04-17 12:25:45 +00:00
jdc 79c6a0c665 Add a missing __restore_termios() in an error return.
Don't display the character on curscr if the terminal has echo on :
  - doing so will break the tracking of curscr->cury|x if we've just refreshed
  a non-fullscreen window
  - with echo on, the terminal displays the character for us anyway
2000-04-15 22:59:05 +00:00
blymn aaf74682b9 Added functions to replace what were previously macros in curses.h
(this is a requirement of SUSv2) - the old macro behaviour can be
restored by defining _CURSES_USE_MACROS.
Changed function prototypes to use ANSI style.
All externally visible functions now have ANSI style declarations.
2000-04-15 13:17:02 +00:00
jdc 1aa45522c2 Make sure we don't read a negative character value. 2000-04-12 21:34:24 +00:00
blymn 23464ee534 Made data structures opaque 2000-04-11 13:57:08 +00:00
simonb 6ae0eb50e6 Only unctrl() the first 256 input values.
This and the previous curses patches were from Brett Lymn.
1999-12-07 03:53:11 +00:00
simonb e07c905939 Get rid of the evil trailing spaces and tabs. 1999-06-28 13:32:43 +00:00
simonb 56351da429 Make a few private variables and functions static. 1999-06-15 04:50:28 +00:00
pk 6c4ae8ffb4 Re-arrange some code to approach our regular style. 1999-06-06 21:05:03 +00:00
pk d467771b45 Hang on to the termcap buffer that we have tgetent() fill.
(someone ows me two hours worth of beer for this... :-)
1999-06-06 20:43:00 +00:00
mrg 586d4ce109 Upgrades the standard NetBSD curses library to provide some
of the SYSV curses facilities.  The added features are the collapsing
of arrow and function keysequences (as defined by termcap for the
terminal) into symbolic code returns thus relieving the application of
recognising multi-character key sequences.  Other features are the
capability to perform a timed wait for a key (good for when you are
not sure if there is a keypress ready or not) and the capability for
turning off the inter-key timeout when assembling multi-character
function keys.

this work was done by Julian Coleman <J.D.Coleman@newcastle.ac.uk>
and blymn@baea.com.au (Brett Lymn).  i'm just integrating it.  thanks
HEAPS guys!
1999-04-13 14:08:17 +00:00
perry 0b7831a37b remove obsolete register declarations 1998-02-03 19:12:13 +00:00
mikel 716747aa72 RCSid police, fix warnings 1997-07-22 07:36:20 +00:00
cgd d29088dab1 clean up import 1994-08-17 21:51:41 +00:00
cgd 2f65b6139d repeat after me: "I hate rcs ids" 1993-11-09 04:06:43 +00:00
cgd 019bbd1316 update to new version from berkeley. doesn't compile yet, nor
does it have rcsid's.  this is for diffs.
1993-11-09 03:34:01 +00:00
mycroft 62a3457d0e New version from uunet. 1993-08-07 05:48:37 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
alm 75de25bb93 added Andrew Chernov's patch set:
Standard curses library use eight bit for standout mode, so
8-bit characters displays like highlighted 7-bit characters.

This patch produce library which is fully compatible with all curses
programs and add 8-bit chars to all input/display functions.
---
I don't think, that any programs wish to use internal curses
attribute _STANDOUT directly, in expressions like:
        addch( ch | _STANDOUT );
        Normal interface use standout() and standend() functions instead.
        Many programs use 'char' type (with sign extention) for input characters
        and sign extention becomes _STANDOUT mode in this case.
        So, I refuse this future and allow 8-bit characters for programs,
        which is designed for 7-bit only ('char' type using instead of
        'unsigned char').
---
This small patch fix unpleasant standard curses bug:
curses can't expand TAB at all (but tries).
A man who wrote this curses misplace SYNC_IN and SYNCH_OUT,
this patch exchange macro calls.

This patch useful for standard 7-bit curses too, for this
you must delete '_' symbol before waddbytes and apply patch.
---
Oh, NO! This curses are really buggy!

This small patch fix following problem:
[ assumed scrollok(stdscr, TRUE) ]
when addch(ch) at lower right corner of screen, curses are realy
gone mad instead if simple scrolling... Curses code assumed that
this will be done correctly, but implement it with two bugs.
1993-07-09 05:34:14 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00