From: cgf Date: Tue, 4 Feb 2003 03:01:16 +0000 (+0000) Subject: Eliminate most unneeded this-> pointers throughout. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4ae0880edafcfd8e2d8e2b9b79c2017207890ecd;p=pf3gnuchains%2Fpf3gnuchains3x.git Eliminate most unneeded this-> pointers throughout. --- diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 918eb4d3bf..4ad4441a40 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2003-02-03 Christopher Faylor + + Eliminate most unneeded this-> pointers throughout. + 2003-02-03 Pierre Humblet * security.h: Add third argument to set_process_privilege. diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 877b02d58e..84b2f17517 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -240,7 +240,7 @@ public: void init (DWORD, bool, bool); /* Called the first time that stack info is needed */ /* Postfix ++ iterates over the stack, returning zero when nothing is left. */ - int operator ++(int) { return this->walk (); } + int operator ++(int) { return walk (); } }; /* The number of parameters used in STACKFRAME */ diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index b8f777ee2b..78fa5e323e 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1677,7 +1677,7 @@ fhandler_console::init (HANDLE f, DWORD a, mode_t bin) if (f != INVALID_HANDLE_VALUE) CloseHandle (f); /* Reopened by open */ - this->tcsetattr (0, &tc->ti); + tcsetattr (0, &tc->ti); } int @@ -1689,7 +1689,7 @@ fhandler_console::igncr_enabled (void) void fhandler_console::set_close_on_exec (int val) { - this->fhandler_base::set_close_on_exec (val); + fhandler_base::set_close_on_exec (val); set_inheritance (output_handle, val); } diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index f535f5993a..21052e533f 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -368,7 +368,7 @@ fhandler_disk_file::open (path_conv *real_path, int flags, mode_t mode) set_has_acls (real_path->has_acls ()); set_isremote (real_path->isremote ()); - int res = this->fhandler_base::open (real_path, flags | O_DIROPEN, mode); + int res = fhandler_base::open (real_path, flags | O_DIROPEN, mode); if (!res) goto out; @@ -399,7 +399,7 @@ out: int fhandler_disk_file::close () { - int res = this->fhandler_base::close (); + int res = fhandler_base::close (); if (!res) cygwin_shared->delqueue.process_queue (); return res; diff --git a/winsup/cygwin/fhandler_mem.cc b/winsup/cygwin/fhandler_mem.cc index 089b56b4b0..35157e85fd 100644 --- a/winsup/cygwin/fhandler_mem.cc +++ b/winsup/cygwin/fhandler_mem.cc @@ -409,7 +409,7 @@ fhandler_dev_mem::fixup_mmap_after_fork (HANDLE h, DWORD access, DWORD offset, int fhandler_dev_mem::fstat (struct __stat64 *buf, path_conv *pc) { - this->fhandler_base::fstat (buf, pc); + fhandler_base::fstat (buf, pc); buf->st_mode = S_IFCHR; if (wincap.has_physical_mem_access ()) buf->st_mode |= S_IRUSR | S_IWUSR | diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc index 2d6aeb8997..f33b368a08 100644 --- a/winsup/cygwin/fhandler_registry.cc +++ b/winsup/cygwin/fhandler_registry.cc @@ -195,7 +195,7 @@ fhandler_proc (FH_REGISTRY) int fhandler_registry::fstat (struct __stat64 *buf, path_conv *pc) { - this->fhandler_base::fstat (buf, pc); + fhandler_base::fstat (buf, pc); buf->st_mode &= ~_IFMT & NO_W; int file_type = exists (); switch (file_type) diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index 1c8edfe797..e110968321 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -214,7 +214,7 @@ fhandler_serial::open (path_conv *, int flags, mode_t mode) syscall_printf ("fhandler_serial::open (%s, %p, %p)", get_name (), flags, mode); - if (!this->fhandler_base::open (NULL, flags, mode)) + if (!fhandler_base::open (NULL, flags, mode)) return 0; res = 1; @@ -1012,7 +1012,7 @@ void fhandler_serial::fixup_after_fork (HANDLE parent) { if (get_close_on_exec ()) - this->fhandler_base::fixup_after_fork (parent); + fhandler_base::fixup_after_fork (parent); overlapped_setup (); debug_printf ("io_status.hEvent %p", io_status.hEvent); } diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index 721b2e8612..0dda0105d1 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -352,7 +352,7 @@ fhandler_termios::line_edit (const char *rptr, int nread, termios& ti) void fhandler_termios::fixup_after_fork (HANDLE parent) { - this->fhandler_base::fixup_after_fork (parent); + fhandler_base::fixup_after_fork (parent); fork_fixup (parent, get_output_handle (), "output_handle"); } diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index af26108db9..1824d37b57 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1066,7 +1066,7 @@ fhandler_pty_master::close () while (accept_input () > 0) continue; #endif - this->fhandler_tty_common::close (); + fhandler_tty_common::close (); if (!get_ttyp ()->master_alive ()) { @@ -1176,7 +1176,7 @@ void fhandler_tty_common::set_close_on_exec (int val) { #ifndef DEBUGGING - this->fhandler_base::set_close_on_exec (val); + fhandler_base::set_close_on_exec (val); #else /* FIXME: This is a duplication from fhandler_base::set_close_on_exec. It is here because we need to specify the "from_pty" stuff here or @@ -1201,7 +1201,7 @@ fhandler_tty_common::set_close_on_exec (int val) void fhandler_tty_common::fixup_after_fork (HANDLE parent) { - this->fhandler_termios::fixup_after_fork (parent); + fhandler_termios::fixup_after_fork (parent); if (output_done_event) fork_fixup (parent, output_done_event, "output_done_event"); if (ioctl_request_event) @@ -1220,7 +1220,7 @@ fhandler_tty_common::fixup_after_fork (HANDLE parent) void fhandler_pty_master::set_close_on_exec (int val) { - this->fhandler_tty_common::set_close_on_exec (val); + fhandler_tty_common::set_close_on_exec (val); /* FIXME: There is a console handle leak here. */ if (get_ttyp ()->master_pid == GetCurrentProcessId ()) @@ -1235,7 +1235,7 @@ fhandler_pty_master::set_close_on_exec (int val) void fhandler_tty_master::fixup_after_fork (HANDLE child) { - this->fhandler_pty_master::fixup_after_fork (child); + fhandler_pty_master::fixup_after_fork (child); console->fixup_after_fork (child); } diff --git a/winsup/cygwin/fhandler_windows.cc b/winsup/cygwin/fhandler_windows.cc index d6b3059e69..9d3e07e55a 100644 --- a/winsup/cygwin/fhandler_windows.cc +++ b/winsup/cygwin/fhandler_windows.cc @@ -128,9 +128,9 @@ void fhandler_windows::set_close_on_exec (int val) { if (get_handle ()) - this->fhandler_base::set_close_on_exec (val); + fhandler_base::set_close_on_exec (val); else - this->fhandler_base::set_close_on_exec_flag (val); + fhandler_base::set_close_on_exec_flag (val); void *h = hWnd_; if (h) set_inheritance (h, val); @@ -140,7 +140,7 @@ void fhandler_windows::fixup_after_fork (HANDLE parent) { if (get_handle ()) - this->fhandler_base::fixup_after_fork (parent); + fhandler_base::fixup_after_fork (parent); void *h = hWnd_; if (h) fork_fixup (parent, h, "hWnd_"); diff --git a/winsup/cygwin/perthread.h b/winsup/cygwin/perthread.h index 60c78f3eab..cfca5ae319 100644 --- a/winsup/cygwin/perthread.h +++ b/winsup/cygwin/perthread.h @@ -42,8 +42,8 @@ class per_thread_waitq : public per_thread { public: per_thread_waitq () : per_thread (0) {} - void *get () {return (waitq *) this->per_thread::get ();} - void *create () {return (waitq *) this->per_thread::create ();} + void *get () {return (waitq *) per_thread::get ();} + void *create () {return (waitq *) per_thread::create ();} size_t size () {return sizeof (waitq);} }; @@ -77,8 +77,8 @@ class vfork_save class per_thread_vfork : public per_thread { public: - vfork_save *val () { return (vfork_save *) this->per_thread::get (); } - vfork_save *create () {return (vfork_save *) this->per_thread::create ();} + vfork_save *val () { return (vfork_save *) per_thread::get (); } + vfork_save *create () {return (vfork_save *) per_thread::create ();} size_t size () {return sizeof (vfork_save);} }; extern per_thread_vfork vfork_storage; @@ -102,8 +102,8 @@ struct signal_dispatch struct per_thread_signal_dispatch : public per_thread { - signal_dispatch *get () { return (signal_dispatch *) this->per_thread::get (); } - signal_dispatch *create () {return (signal_dispatch *) this->per_thread::create ();} + signal_dispatch *get () { return (signal_dispatch *) per_thread::get (); } + signal_dispatch *create () {return (signal_dispatch *) per_thread::create ();} size_t size () {return sizeof (signal_dispatch);} }; diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index ee1f18386b..29a32b5664 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -44,7 +44,7 @@ fhandler_pipe::lseek (__off64_t offset, int whence) void fhandler_pipe::set_close_on_exec (int val) { - this->fhandler_base::set_close_on_exec (val); + fhandler_base::set_close_on_exec (val); if (guard) set_inheritance (guard, val); if (writepipe_exists) @@ -121,7 +121,7 @@ fhandler_pipe::fixup_after_exec (HANDLE parent) void fhandler_pipe::fixup_after_fork (HANDLE parent) { - this->fhandler_base::fixup_after_fork (parent); + fhandler_base::fixup_after_fork (parent); if (guard) fork_fixup (parent, guard, "guard"); if (writepipe_exists) @@ -132,7 +132,7 @@ fhandler_pipe::fixup_after_fork (HANDLE parent) int fhandler_pipe::dup (fhandler_base *child) { - int res = this->fhandler_base::dup (child); + int res = fhandler_base::dup (child); if (res) return res; diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index d8d89999c0..72919241ea 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -588,7 +588,7 @@ int fhandler_pipe::ready_for_read (int fd, DWORD howlong) { if (!howlong) - return this->fhandler_base::ready_for_read (fd, howlong); + return fhandler_base::ready_for_read (fd, howlong); get_guard (); return true; diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc index 26f155aaad..38cf259079 100644 --- a/winsup/cygwin/strace.cc +++ b/winsup/cygwin/strace.cc @@ -207,7 +207,7 @@ strace::vprntf (unsigned category, const char *func, const char *fmt, va_list ap PROTECT (buf); SetLastError (err); - count = this->vsprntf (buf, func, fmt, ap); + count = vsprntf (buf, func, fmt, ap); CHECK (buf); if (category & _STRACE_SYSTEM) { @@ -218,7 +218,7 @@ strace::vprntf (unsigned category, const char *func, const char *fmt, va_list ap #ifndef NOSTRACE if (active) - this->write (category, buf, count); + write (category, buf, count); #endif SetLastError (err); } @@ -229,7 +229,7 @@ strace::prntf (unsigned category, const char *func, const char *fmt, ...) va_list ap; va_start (ap, fmt); - this->vprntf (category, func, fmt, ap); + vprntf (category, func, fmt, ap); } extern "C" void @@ -413,11 +413,11 @@ strace::wm (int message, int word, int lon) { if (ta[i].v == message) { - this->prntf (_STRACE_WM, NULL, "wndproc %d %s %d %d", message, ta[i].n, word, lon); + prntf (_STRACE_WM, NULL, "wndproc %d %s %d %d", message, ta[i].n, word, lon); return; } } - this->prntf (_STRACE_WM, NULL, "wndproc %d unknown %d %d", message, word, lon); + prntf (_STRACE_WM, NULL, "wndproc %d unknown %d %d", message, word, lon); } } #endif /*NOSTRACE*/