Bert Belder
4abad2381e
win/tty: don't touch insert mode or quick edit mode
...
Hopefully this fixes joyent/node#4809 .
2013-03-05 20:05:58 +01:00
Bert Belder
8a99762c0e
win/tty: fix case where uv_read_start incorrectly reports failure
...
In very rare circumstances a uv_read_start() call on a uv_tty_t handle
in raw mode would return -1 but there was no actual failure. This patch
fixes that.
2013-03-05 20:05:57 +01:00
Ben Noordhuis
5b63285805
unix, windows: ANSI-fy uv_tty_reset_mode() prototype
2013-01-06 22:31:47 +01:00
Ben Noordhuis
5cb4197deb
Merge branch 'v0.8'
2012-10-25 04:43:19 +02:00
saghul
61ecb3415d
win: support compilation with Visual Studio 2008
2012-10-23 22:55:25 +02:00
Bert Belder
b2dc1e6d64
win/tty: reset background brightness when color is set to default
2012-09-14 17:50:45 +02:00
Bert Belder
a28f145269
windows: un-break writable tty handles
2012-09-14 02:46:33 +02:00
Bert Belder
b4a5bfb7e0
windows: style
2012-09-14 01:42:36 +02:00
Bert Belder
9aead82537
windows: rename UV_HANDLE_CLOSING to UV__HANDLE_CLOSING
2012-09-13 23:42:07 +02:00
Bert Belder
032c041790
windows: use UV_HANDLE_READABLE and UV_HANDLE_WRITABLE
...
These flags supersede UV_HANDLE_EOF and UV_HANDLE_SHUTTING. This patch
also moves a lot of stream related state-checking code to stream.c.
2012-09-03 21:09:40 +02:00
Bert Belder
637be161b3
windows: make active and closing handle state independent
2012-08-27 23:56:35 +02:00
Bert Belder
03bdfd08cc
windows: lock tty output before updating the virtual window size
2012-08-22 01:06:05 +02:00
Bert Belder
564e7c765c
windows: emit SIGWINCH when the console size changes
2012-08-22 00:43:55 +02:00
Bert Belder
95a742be02
Revert "windows: readable tty handles need access to console output"
...
This is not the way to go.
This reverts commit 1b929bfff5 .
2012-08-17 19:38:28 +02:00
Bert Belder
1b929bfff5
windows: readable tty handles need access to console output
...
Readable tty handles need to be able to update the virtual window,
so if uv_tty_t is initialized with a console input fd, additionally
open the console output.
2012-08-17 00:10:18 +02:00
Bert Belder
88634c1405
windows: separate uv_tty_t read state from write state
2012-08-17 00:10:15 +02:00
Ben Noordhuis
837edf4c0f
unix, windows: remove handle init counters
...
Remove the handle init counters, no one uses them.
2012-08-10 02:00:11 +02:00
Ben Noordhuis
cf05c5f0d6
Raise UV_ECANCELED on premature close.
...
Set the error code to the more appropriate UV_ECANCELED instead of UV_EINTR
when the handle is closed and there are in-flight requests.
2012-07-27 15:13:29 +02:00
Ben Noordhuis
95e89c6a0e
unix, windows: share uv__handle_init()
2012-06-13 01:28:58 +02:00
Bert Belder
60746b03cb
windows: move some stream functions to stream-inl.h
2012-06-04 18:04:47 +02:00
Bert Belder
d8b95eaffb
windows: inline a couple of handle functions
2012-06-02 23:38:16 +02:00
Bert Belder
d402604118
windows: inline a couple of inline request functions
2012-06-02 23:08:22 +02:00
Bert Belder
961e0cf8da
windows/tty: never report error after forcibly aborting line-buffered read
2012-06-02 03:08:48 +02:00
Ben Noordhuis
171ad8567d
unix, windows: add uv_walk()
...
Lets the libuv user iterate over the open handles. Mostly intended as a
debugging tool or a post-hoc cleanup mechanism.
2012-05-30 02:33:39 +02:00
Ben Noordhuis
9efa8b3571
unix, windows: rework reference counting scheme
...
This commit changes how the event loop determines if it needs to stay alive.
Previously, an internal counter was increased whenever a handle got created
and decreased again when the handle was closed.
While conceptually simple, it turned out hard to work with: you often want
to keep the event loop alive only if the handle is actually doing something.
Stopped or inactive handles were a frequent source of hanging event loops.
That's why this commit changes the reference counting scheme to a model where
a handle only references the event loop when it's active. 'Active' means
different things for different handle types, e.g.:
* timers: ticking
* sockets: reading, writing or listening
* processes: always active (for now, subject to change)
* idle, check, prepare: only active when started
This commit also changes how the uv_ref() and uv_unref() functions work: they
now operate on the level of individual handles, not the whole event loop.
The Windows implementation was done by Bert Belder.
2012-05-17 07:07:53 +02:00
Ben Noordhuis
ce129ac6e2
windows: remove unused variables
2012-05-03 19:50:49 +02:00
Bert Belder
e99fba47c8
Merge remote-tracking branch 'origin/v0.6'
...
Conflicts:
src/win/pipe.c
test/run-tests.c
2012-03-09 16:41:12 +01:00
Bert Belder
5d21056277
Windows: make sure that shutdown_cb is always called
...
This patch changes how uv-win uses the UV_SHUTTING and UV_SHUT flags.
UV_SHUT is now only used for tcp handles to track whether shutdown() has
actually been called. UV_SHUTTING has the more generic meaning of
"no longer readable". It would be good to replace it by an actual
UV_READABLE flag in the future.
This makes the shutdown_close_tcp and shutdown_close_pipe tests pass on
windows.
2012-03-09 16:31:16 +01:00
Bert Belder
95296dfa3c
Windows: make the refcount tests pass
2012-03-09 16:31:15 +01:00
Ben Noordhuis
4e1f2b1f64
Merge remote-tracking branch 'origin/v0.6'
2012-02-12 16:10:05 +01:00
Bert Belder
443445a3c6
Windows: reset brightness when reverting to default text color
2012-02-05 19:54:26 +01:00
Ben Noordhuis
3de0411591
Merge remote-tracking branch 'origin/v0.6'
2012-01-27 22:23:26 +01:00
Brandon Benvie
3ade5f0011
Windows: Add support for interpreting axiterm-style colors.
2012-01-23 20:06:24 +01:00
Shigeki Ohtsu
ba52023ef3
Fix missing increments of loop->counters
2011-12-12 18:01:26 +01:00
Bert Belder
9c064fbbd2
Win: utf-8 decoder bug when compiling with gcc
2011-12-01 22:45:58 +01:00
Bruce Mitchener
d513d9bb41
Fix typos.
2011-11-30 14:35:13 +01:00
Bert Belder
45882e0bdc
win: flush output buffer before doing a console reset
2011-10-21 18:42:38 -07:00
Bert Belder
fb7138614d
Improve ansi escape code support on windows
2011-10-20 19:31:24 -07:00
Igor Zinkovsky
54982a23ef
windows: stdio over non-overlapped pipes
2011-10-20 15:14:39 -07:00
Ryan Dahl
5656e3c8bd
Prepare for writable TTY to be blocking
2011-10-10 13:25:46 -07:00
Ryan Dahl
fe18438416
add uv_tty_reset_mode()
2011-09-30 13:09:06 -07:00
Igor Zinkovsky
e7a53aed48
fix windows build
2011-09-28 11:52:08 -07:00
Erick Tryzelaar
23796d208c
Fixes #76 . Unify OS error reporting
...
As a nice fringe benefit, this also shaves a word
off of a windows TCP handle by replacing "uv_err_t
bind_error" with "int bind_error".
2011-09-27 19:05:33 -07:00
Ben Noordhuis
fbbc085448
Rename COUNTOF() to ARRAY_SIZE().
...
Consistent with Node, it has an ARRAY_SIZE() macro but not COUNTOF().
2012-01-18 15:48:31 +01:00
Bert Belder
bdac72cc93
win tty: Implement uv_close and uv_shutdown
2011-09-27 19:12:39 +02:00
Bert Belder
554cb78eeb
win tty: Use NULL consistently, don't mix with INVALID_HANDLE_VALUE
2011-09-27 19:12:33 +02:00
Bert Belder
f5f005d51d
tty-win: fix absolute cursor positioning
2011-09-27 16:10:38 +02:00
Bert Belder
b0a9d601c8
win: tty fixes
2011-09-27 12:41:38 +02:00
Bert Belder
622eb99113
win: implement tty
...
loose end: line-buffered input reads ascii, not unicode
2011-09-26 19:31:32 +02:00
Ryan Dahl
03d0c57ea2
Remove uv_is_tty. Use uv_guess_handle instead.
2011-09-23 10:01:45 -07:00
Ryan Dahl
03652596cf
unix: add uv_guess_handle and uv_tty_get_winsize
2011-09-22 19:35:46 -07:00
Ryan Dahl
c1374ba587
Add uv_is_tty()
2011-09-20 11:48:47 -07:00
Ryan Dahl
4484d61fe1
Add interfaces for uv_pipe_open, uv_tty_init, uv_tty_set_mode
...
Nothing works - no tests. This is just to coordinate efforts between Bert
and I.
2011-09-12 14:32:14 -07:00