aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-02-13 03:14:06 +0000
committerChristopher Faylor <me@cgf.cx>2003-02-13 03:14:06 +0000
commitf1ec3721c34e2ec4122d5c742b44c1992b8ac540 (patch)
tree6eb7f7af47255ad9c15d6f1bcb75e48ccc4c4d11 /winsup
parentd91ea2d32b1dfe734b03bc6f5da36a9a86fb1958 (diff)
downloadnewlib-f1ec3721c34e2ec4122d5c742b44c1992b8ac540.zip
newlib-f1ec3721c34e2ec4122d5c742b44c1992b8ac540.tar.gz
newlib-f1ec3721c34e2ec4122d5c742b44c1992b8ac540.tar.bz2
merge from trunk
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog14
-rw-r--r--winsup/cygwin/fhandler_termios.cc2
-rw-r--r--winsup/cygwin/fhandler_tty.cc4
-rw-r--r--winsup/cygwin/path.h6
-rw-r--r--winsup/cygwin/pipe.cc5
-rw-r--r--winsup/cygwin/spawn.cc2
6 files changed, 25 insertions, 8 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 70b40c6..4ab015d 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 0dda010..4116464 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 29f3324..4c9da4b 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 e03e005..b2b8fb8 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 6123de8..f2a5181 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 9b0b4a9..f6863e8 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);