diff options
author | Christopher Faylor <cgf@redhat.com> | 2003-02-13 03:14:06 +0000 |
---|---|---|
committer | Christopher Faylor <cgf@redhat.com> | 2003-02-13 03:14:06 +0000 |
commit | 335bdeb9375bfba164a07467a0ce6e9341a89a55 (patch) | |
tree | 78aa45fb5c156beeee092324cc852673afcb2cd6 | |
parent | fcd81fa62f460d3268aa6a2a8e336f983c46f79e (diff) | |
download | gdb-335bdeb9375bfba164a07467a0ce6e9341a89a55.tar.gz |
merge from trunk
-rw-r--r-- | winsup/cygwin/ChangeLog | 14 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_termios.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 4 | ||||
-rw-r--r-- | winsup/cygwin/path.h | 6 | ||||
-rw-r--r-- | winsup/cygwin/pipe.cc | 5 | ||||
-rw-r--r-- | winsup/cygwin/spawn.cc | 2 |
6 files changed, 25 insertions, 8 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 70b40c6d3a7..4ab015db396 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,17 @@ +2003-02-12 Christopher Faylor <cgf@redhat.com> + + * path.h (path_conv): Reorganize slightly. + +2003-02-12 Christopher Faylor <cgf@redhat.com> + + * fhandler_tty.cc (process_input): Add sanity check to ensure that + console typeahead is cleared on signal. + +2003-02-12 Christopher Faylor <cgf@redhat.com> + + * spawn.cc (linebuf::~linebuf): Resurrect commented out (for + debugging?) code. + 2003-02-10 Ralf Habacker <ralf.habacker@freenet.de> * include/cygwin/in.h (in_attr_t): Define new type. diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index 0dda0105d1a..4116464153b 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -308,7 +308,7 @@ fhandler_termios::line_edit (const char *rptr, int nread, termios& ti) else if (CCEQ (ti.c_cc[VEOF], c)) { termios_printf ("EOF"); - (void) accept_input(); + (void) accept_input (); ret = line_edit_input_done; continue; } diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 29f3324e2cf..4c9da4bb649 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -217,7 +217,9 @@ process_input (void *) { size_t nraw = INP_BUFFER_SIZE; tty_master->console->read ((void *) rawbuf, nraw); - (void) tty_master->line_edit (rawbuf, nraw, tty_master->get_ttyp ()->ti); + if (tty_master->line_edit (rawbuf, nraw, tty_master->get_ttyp ()->ti) + == line_edit_signalled) + tty_master->console->eat_readahead (-1); } } diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index e03e00598b2..b2b8fb8e18e 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -67,9 +67,9 @@ struct fs_info DWORD drive_type; bool update (const char *); }; + class path_conv { - char path[MAX_PATH]; DWORD fileattr; fs_info fs; void add_ext_from_sym (symlink_info&); @@ -80,7 +80,6 @@ class path_conv int error; device dev; BOOL case_clash; - char *normalized_path; int isdisk () const { return path_flags & PATH_ISDISK;} int isremote () const {return fs.is_remote_drive;} @@ -163,6 +162,9 @@ class path_conv DWORD volser () { return fs.serial; } const char *volname () {return fs.name; } void fillin (HANDLE h); + char *normalized_path; + private: + char path[MAX_PATH]; }; /* Symlink marker */ diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index 6123de87139..f2a518186bf 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -62,8 +62,7 @@ static DWORD WINAPI read_pipe (void *arg) { pipeargs *pi = (pipeargs *) arg; - fhandler_base *fh = dynamic_cast<fhandler_base *> (pi->fh); - fh->fhandler_base::read (pi->ptr, *pi->len); + pi->fh->fhandler_base::read (pi->ptr, *pi->len); return 0; } @@ -74,7 +73,7 @@ fhandler_pipe::read (void *in_ptr, size_t& in_len) in_len = 0; else { - pipeargs pi = {this, in_ptr, &in_len}; + pipeargs pi = {dynamic_cast<fhandler_base *>(this), in_ptr, &in_len}; ResetEvent (read_state); cygthread *th = new cygthread (read_pipe, &pi, "read_pipe"); if (th->detach (read_state) && !in_len) diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 9b0b4a999f7..f6863e88d24 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -211,7 +211,7 @@ class linebuf char *buf; size_t alloced; linebuf () : ix (0), buf (NULL), alloced (0) {} - ~linebuf () {/* if (buf) free (buf);*/} + ~linebuf () {if (buf) free (buf);} void add (const char *what, int len); void add (const char *what) {add (what, strlen (what));} void prepend (const char *what, int len); |