Eliminate most unneeded this-> pointers throughout.
This commit is contained in:
parent
ad36f7d19a
commit
335556d58b
|
@ -1,3 +1,7 @@
|
||||||
|
2003-02-03 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
Eliminate most unneeded this-> pointers throughout.
|
||||||
|
|
||||||
2003-02-03 Pierre Humblet <pierre.humblet@ieee.org>
|
2003-02-03 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
* security.h: Add third argument to set_process_privilege.
|
* security.h: Add third argument to set_process_privilege.
|
||||||
|
|
|
@ -240,7 +240,7 @@ public:
|
||||||
void init (DWORD, bool, bool); /* Called the first time that stack info is needed */
|
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. */
|
/* 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 */
|
/* The number of parameters used in STACKFRAME */
|
||||||
|
|
|
@ -1677,7 +1677,7 @@ fhandler_console::init (HANDLE f, DWORD a, mode_t bin)
|
||||||
if (f != INVALID_HANDLE_VALUE)
|
if (f != INVALID_HANDLE_VALUE)
|
||||||
CloseHandle (f); /* Reopened by open */
|
CloseHandle (f); /* Reopened by open */
|
||||||
|
|
||||||
this->tcsetattr (0, &tc->ti);
|
tcsetattr (0, &tc->ti);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -1689,7 +1689,7 @@ fhandler_console::igncr_enabled (void)
|
||||||
void
|
void
|
||||||
fhandler_console::set_close_on_exec (int val)
|
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);
|
set_inheritance (output_handle, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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_has_acls (real_path->has_acls ());
|
||||||
set_isremote (real_path->isremote ());
|
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)
|
if (!res)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
@ -399,7 +399,7 @@ out:
|
||||||
int
|
int
|
||||||
fhandler_disk_file::close ()
|
fhandler_disk_file::close ()
|
||||||
{
|
{
|
||||||
int res = this->fhandler_base::close ();
|
int res = fhandler_base::close ();
|
||||||
if (!res)
|
if (!res)
|
||||||
cygwin_shared->delqueue.process_queue ();
|
cygwin_shared->delqueue.process_queue ();
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -409,7 +409,7 @@ fhandler_dev_mem::fixup_mmap_after_fork (HANDLE h, DWORD access, DWORD offset,
|
||||||
int
|
int
|
||||||
fhandler_dev_mem::fstat (struct __stat64 *buf, path_conv *pc)
|
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;
|
buf->st_mode = S_IFCHR;
|
||||||
if (wincap.has_physical_mem_access ())
|
if (wincap.has_physical_mem_access ())
|
||||||
buf->st_mode |= S_IRUSR | S_IWUSR |
|
buf->st_mode |= S_IRUSR | S_IWUSR |
|
||||||
|
|
|
@ -195,7 +195,7 @@ fhandler_proc (FH_REGISTRY)
|
||||||
int
|
int
|
||||||
fhandler_registry::fstat (struct __stat64 *buf, path_conv *pc)
|
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;
|
buf->st_mode &= ~_IFMT & NO_W;
|
||||||
int file_type = exists ();
|
int file_type = exists ();
|
||||||
switch (file_type)
|
switch (file_type)
|
||||||
|
|
|
@ -214,7 +214,7 @@ fhandler_serial::open (path_conv *, int flags, mode_t mode)
|
||||||
syscall_printf ("fhandler_serial::open (%s, %p, %p)",
|
syscall_printf ("fhandler_serial::open (%s, %p, %p)",
|
||||||
get_name (), flags, mode);
|
get_name (), flags, mode);
|
||||||
|
|
||||||
if (!this->fhandler_base::open (NULL, flags, mode))
|
if (!fhandler_base::open (NULL, flags, mode))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
res = 1;
|
res = 1;
|
||||||
|
@ -1012,7 +1012,7 @@ void
|
||||||
fhandler_serial::fixup_after_fork (HANDLE parent)
|
fhandler_serial::fixup_after_fork (HANDLE parent)
|
||||||
{
|
{
|
||||||
if (get_close_on_exec ())
|
if (get_close_on_exec ())
|
||||||
this->fhandler_base::fixup_after_fork (parent);
|
fhandler_base::fixup_after_fork (parent);
|
||||||
overlapped_setup ();
|
overlapped_setup ();
|
||||||
debug_printf ("io_status.hEvent %p", io_status.hEvent);
|
debug_printf ("io_status.hEvent %p", io_status.hEvent);
|
||||||
}
|
}
|
||||||
|
|
|
@ -352,7 +352,7 @@ fhandler_termios::line_edit (const char *rptr, int nread, termios& ti)
|
||||||
void
|
void
|
||||||
fhandler_termios::fixup_after_fork (HANDLE parent)
|
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");
|
fork_fixup (parent, get_output_handle (), "output_handle");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1066,7 +1066,7 @@ fhandler_pty_master::close ()
|
||||||
while (accept_input () > 0)
|
while (accept_input () > 0)
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
this->fhandler_tty_common::close ();
|
fhandler_tty_common::close ();
|
||||||
|
|
||||||
if (!get_ttyp ()->master_alive ())
|
if (!get_ttyp ()->master_alive ())
|
||||||
{
|
{
|
||||||
|
@ -1176,7 +1176,7 @@ void
|
||||||
fhandler_tty_common::set_close_on_exec (int val)
|
fhandler_tty_common::set_close_on_exec (int val)
|
||||||
{
|
{
|
||||||
#ifndef DEBUGGING
|
#ifndef DEBUGGING
|
||||||
this->fhandler_base::set_close_on_exec (val);
|
fhandler_base::set_close_on_exec (val);
|
||||||
#else
|
#else
|
||||||
/* FIXME: This is a duplication from fhandler_base::set_close_on_exec.
|
/* 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
|
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
|
void
|
||||||
fhandler_tty_common::fixup_after_fork (HANDLE parent)
|
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)
|
if (output_done_event)
|
||||||
fork_fixup (parent, output_done_event, "output_done_event");
|
fork_fixup (parent, output_done_event, "output_done_event");
|
||||||
if (ioctl_request_event)
|
if (ioctl_request_event)
|
||||||
|
@ -1220,7 +1220,7 @@ fhandler_tty_common::fixup_after_fork (HANDLE parent)
|
||||||
void
|
void
|
||||||
fhandler_pty_master::set_close_on_exec (int val)
|
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. */
|
/* FIXME: There is a console handle leak here. */
|
||||||
if (get_ttyp ()->master_pid == GetCurrentProcessId ())
|
if (get_ttyp ()->master_pid == GetCurrentProcessId ())
|
||||||
|
@ -1235,7 +1235,7 @@ fhandler_pty_master::set_close_on_exec (int val)
|
||||||
void
|
void
|
||||||
fhandler_tty_master::fixup_after_fork (HANDLE child)
|
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);
|
console->fixup_after_fork (child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,9 +128,9 @@ void
|
||||||
fhandler_windows::set_close_on_exec (int val)
|
fhandler_windows::set_close_on_exec (int val)
|
||||||
{
|
{
|
||||||
if (get_handle ())
|
if (get_handle ())
|
||||||
this->fhandler_base::set_close_on_exec (val);
|
fhandler_base::set_close_on_exec (val);
|
||||||
else
|
else
|
||||||
this->fhandler_base::set_close_on_exec_flag (val);
|
fhandler_base::set_close_on_exec_flag (val);
|
||||||
void *h = hWnd_;
|
void *h = hWnd_;
|
||||||
if (h)
|
if (h)
|
||||||
set_inheritance (h, val);
|
set_inheritance (h, val);
|
||||||
|
@ -140,7 +140,7 @@ void
|
||||||
fhandler_windows::fixup_after_fork (HANDLE parent)
|
fhandler_windows::fixup_after_fork (HANDLE parent)
|
||||||
{
|
{
|
||||||
if (get_handle ())
|
if (get_handle ())
|
||||||
this->fhandler_base::fixup_after_fork (parent);
|
fhandler_base::fixup_after_fork (parent);
|
||||||
void *h = hWnd_;
|
void *h = hWnd_;
|
||||||
if (h)
|
if (h)
|
||||||
fork_fixup (parent, h, "hWnd_");
|
fork_fixup (parent, h, "hWnd_");
|
||||||
|
|
|
@ -42,8 +42,8 @@ class per_thread_waitq : public per_thread
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
per_thread_waitq () : per_thread (0) {}
|
per_thread_waitq () : per_thread (0) {}
|
||||||
void *get () {return (waitq *) this->per_thread::get ();}
|
void *get () {return (waitq *) per_thread::get ();}
|
||||||
void *create () {return (waitq *) this->per_thread::create ();}
|
void *create () {return (waitq *) per_thread::create ();}
|
||||||
size_t size () {return sizeof (waitq);}
|
size_t size () {return sizeof (waitq);}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -77,8 +77,8 @@ class vfork_save
|
||||||
class per_thread_vfork : public per_thread
|
class per_thread_vfork : public per_thread
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
vfork_save *val () { return (vfork_save *) this->per_thread::get (); }
|
vfork_save *val () { return (vfork_save *) per_thread::get (); }
|
||||||
vfork_save *create () {return (vfork_save *) this->per_thread::create ();}
|
vfork_save *create () {return (vfork_save *) per_thread::create ();}
|
||||||
size_t size () {return sizeof (vfork_save);}
|
size_t size () {return sizeof (vfork_save);}
|
||||||
};
|
};
|
||||||
extern per_thread_vfork vfork_storage;
|
extern per_thread_vfork vfork_storage;
|
||||||
|
@ -102,8 +102,8 @@ struct signal_dispatch
|
||||||
|
|
||||||
struct per_thread_signal_dispatch : public per_thread
|
struct per_thread_signal_dispatch : public per_thread
|
||||||
{
|
{
|
||||||
signal_dispatch *get () { return (signal_dispatch *) this->per_thread::get (); }
|
signal_dispatch *get () { return (signal_dispatch *) per_thread::get (); }
|
||||||
signal_dispatch *create () {return (signal_dispatch *) this->per_thread::create ();}
|
signal_dispatch *create () {return (signal_dispatch *) per_thread::create ();}
|
||||||
size_t size () {return sizeof (signal_dispatch);}
|
size_t size () {return sizeof (signal_dispatch);}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ fhandler_pipe::lseek (__off64_t offset, int whence)
|
||||||
void
|
void
|
||||||
fhandler_pipe::set_close_on_exec (int val)
|
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)
|
if (guard)
|
||||||
set_inheritance (guard, val);
|
set_inheritance (guard, val);
|
||||||
if (writepipe_exists)
|
if (writepipe_exists)
|
||||||
|
@ -121,7 +121,7 @@ fhandler_pipe::fixup_after_exec (HANDLE parent)
|
||||||
void
|
void
|
||||||
fhandler_pipe::fixup_after_fork (HANDLE parent)
|
fhandler_pipe::fixup_after_fork (HANDLE parent)
|
||||||
{
|
{
|
||||||
this->fhandler_base::fixup_after_fork (parent);
|
fhandler_base::fixup_after_fork (parent);
|
||||||
if (guard)
|
if (guard)
|
||||||
fork_fixup (parent, guard, "guard");
|
fork_fixup (parent, guard, "guard");
|
||||||
if (writepipe_exists)
|
if (writepipe_exists)
|
||||||
|
@ -132,7 +132,7 @@ fhandler_pipe::fixup_after_fork (HANDLE parent)
|
||||||
int
|
int
|
||||||
fhandler_pipe::dup (fhandler_base *child)
|
fhandler_pipe::dup (fhandler_base *child)
|
||||||
{
|
{
|
||||||
int res = this->fhandler_base::dup (child);
|
int res = fhandler_base::dup (child);
|
||||||
if (res)
|
if (res)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
|
|
|
@ -588,7 +588,7 @@ int
|
||||||
fhandler_pipe::ready_for_read (int fd, DWORD howlong)
|
fhandler_pipe::ready_for_read (int fd, DWORD howlong)
|
||||||
{
|
{
|
||||||
if (!howlong)
|
if (!howlong)
|
||||||
return this->fhandler_base::ready_for_read (fd, howlong);
|
return fhandler_base::ready_for_read (fd, howlong);
|
||||||
|
|
||||||
get_guard ();
|
get_guard ();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -207,7 +207,7 @@ strace::vprntf (unsigned category, const char *func, const char *fmt, va_list ap
|
||||||
PROTECT (buf);
|
PROTECT (buf);
|
||||||
SetLastError (err);
|
SetLastError (err);
|
||||||
|
|
||||||
count = this->vsprntf (buf, func, fmt, ap);
|
count = vsprntf (buf, func, fmt, ap);
|
||||||
CHECK (buf);
|
CHECK (buf);
|
||||||
if (category & _STRACE_SYSTEM)
|
if (category & _STRACE_SYSTEM)
|
||||||
{
|
{
|
||||||
|
@ -218,7 +218,7 @@ strace::vprntf (unsigned category, const char *func, const char *fmt, va_list ap
|
||||||
|
|
||||||
#ifndef NOSTRACE
|
#ifndef NOSTRACE
|
||||||
if (active)
|
if (active)
|
||||||
this->write (category, buf, count);
|
write (category, buf, count);
|
||||||
#endif
|
#endif
|
||||||
SetLastError (err);
|
SetLastError (err);
|
||||||
}
|
}
|
||||||
|
@ -229,7 +229,7 @@ strace::prntf (unsigned category, const char *func, const char *fmt, ...)
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start (ap, fmt);
|
va_start (ap, fmt);
|
||||||
this->vprntf (category, func, fmt, ap);
|
vprntf (category, func, fmt, ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void
|
extern "C" void
|
||||||
|
@ -413,11 +413,11 @@ strace::wm (int message, int word, int lon)
|
||||||
{
|
{
|
||||||
if (ta[i].v == message)
|
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;
|
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*/
|
#endif /*NOSTRACE*/
|
||||||
|
|
Loading…
Reference in New Issue