From f70f96c67329f59d3718cb5dede413ff0fdbab3d Mon Sep 17 00:00:00 2001 From: Conrad Scott Date: Sun, 22 Sep 2002 10:54:38 +0000 Subject: GNUify non-GNU formatted functions calls throughout. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/cygserver.cc | 24 ++++++++++++------------ winsup/cygwin/cygserver_client.cc | 8 ++------ winsup/cygwin/cygserver_process.cc | 2 +- winsup/cygwin/cygserver_shm.cc | 4 ++-- winsup/cygwin/cygserver_transport_sockets.cc | 8 ++++---- winsup/cygwin/include/cygwin/cygserver.h | 2 +- winsup/cygwin/threaded_queue.h | 4 ++-- 8 files changed, 28 insertions(+), 28 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a9a7956..e5953f2 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,9 @@ 2002-09-22 Conrad Scott + GNUify non-GNU formatted functions calls throughout. + +2002-09-22 Conrad Scott + * cygserver_shm.cc (with_strerr): Remove macro. (server_shmmgr::segment_t::~segment_t): Remove calls to with_strerr. (server_shmmgr::segment_t::attach): Ditto. diff --git a/winsup/cygwin/cygserver.cc b/winsup/cygwin/cygserver.cc index c48c5c6..0c07403 100755 --- a/winsup/cygwin/cygserver.cc +++ b/winsup/cygwin/cygserver.cc @@ -35,7 +35,7 @@ details. */ static const char version[] = "$Revision$"; /* - * Support function for the XXX_printf() macros in "woutsup.h". + * Support function for the XXX_printf () macros in "woutsup.h". * Copied verbatim from "strace.cc". */ static int @@ -47,7 +47,7 @@ getfunc (char *in_dst, const char *func) for (p = func; (pe = strchr (p, '(')); p = pe + 1) if (isalnum ((int)pe[-1]) || pe[-1] == '_') break; - else if (isspace((int)pe[-1])) + else if (isspace ((int)pe[-1])) { pe--; break; @@ -73,7 +73,7 @@ getfunc (char *in_dst, const char *func) } /* - * Support function for the XXX_printf() macros in "woutsup.h". + * Support function for the XXX_printf () macros in "woutsup.h". */ extern "C" void __cygserver__printf (const char *const function, const char *const fmt, ...) @@ -83,14 +83,14 @@ __cygserver__printf (const char *const function, const char *const fmt, ...) va_list ap; - char *const buf = (char *) alloca(BUFSIZ); + char *const buf = (char *) alloca (BUFSIZ); assert (buf); int len = 0; if (function) - len += getfunc(buf, function); + len += getfunc (buf, function); va_start (ap, fmt); len += vsnprintf (buf + len, BUFSIZ - len, fmt, ap); @@ -128,7 +128,7 @@ setup_privileges () HANDLE hToken = NULL; TOKEN_PRIVILEGES sPrivileges; - rc = OpenProcessToken (GetCurrentProcess() , TOKEN_ALL_ACCESS , &hToken) ; + rc = OpenProcessToken (GetCurrentProcess () , TOKEN_ALL_ACCESS , &hToken) ; if (!rc) { system_printf ("error opening process token (%lu)", GetLastError ()); @@ -378,7 +378,7 @@ client_request_attach_tty::serve (transport_layer_base *const conn, } void -client_request_get_version::serve(transport_layer_base *, process_cache *) +client_request_get_version::serve (transport_layer_base *, process_cache *) { assert (!error_code ()); @@ -400,7 +400,7 @@ public: : _conn (conn), _cache (cache) {} - virtual ~server_request() + virtual ~server_request () { safe_delete (_conn); } @@ -525,7 +525,7 @@ handle_signal (const int signum) } /* - * print_usage() + * print_usage () */ static void @@ -540,7 +540,7 @@ print_usage (const char *const pgm) } /* - * print_version() + * print_version () */ static void @@ -588,7 +588,7 @@ print_version (const char *const pgm) } /* - * main() + * main () */ int @@ -616,7 +616,7 @@ main (const int argc, char *argv[]) else pgm++; - wincap.init(); + wincap.init (); if (wincap.has_security ()) setup_privileges (); diff --git a/winsup/cygwin/cygserver_client.cc b/winsup/cygwin/cygserver_client.cc index 3372fca..138c9dd 100755 --- a/winsup/cygwin/cygserver_client.cc +++ b/winsup/cygwin/cygserver_client.cc @@ -45,7 +45,7 @@ client_request_get_version::client_request_get_version () } /* - * client_request_get_version::check_version() + * client_request_get_version::check_version () * * The major version and API version numbers must match exactly. An * older than expected minor version number is accepted (as long as @@ -103,7 +103,7 @@ client_request_attach_tty::client_request_attach_tty () #endif /* __INSIDE_CYGWIN__ */ /* - * client_request_attach_tty::send() + * client_request_attach_tty::send () * * Wraps the base method to provide error handling support. If the * reply contains a body but is flagged as an error, close any handles @@ -507,10 +507,6 @@ check_cygserver_available () return req.check_version (); } -/* - * check_cygserver_available() - */ - void cygserver_init () { diff --git a/winsup/cygwin/cygserver_process.cc b/winsup/cygwin/cygserver_process.cc index 88115cf..7118bbc 100755 --- a/winsup/cygwin/cygserver_process.cc +++ b/winsup/cygwin/cygserver_process.cc @@ -78,7 +78,7 @@ process::~process () } /* No need to be thread-safe as this is only ever called by - * process_cache::remove_process(). If it has to be made thread-safe + * process_cache::remove_process (). If it has to be made thread-safe * later on, it should not use the `access' critical section as that * is held by the client request handlers for an arbitrary length of * time, i.e. while they do whatever processing is required for a diff --git a/winsup/cygwin/cygserver_shm.cc b/winsup/cygwin/cygserver_shm.cc index 2958667..18b1c3d 100755 --- a/winsup/cygwin/cygserver_shm.cc +++ b/winsup/cygwin/cygserver_shm.cc @@ -103,12 +103,12 @@ private: { public: cleanup_t (const segment_t *const segptr) - : cleanup_routine (reinterpret_cast(segptr->_shmid)) + : cleanup_routine (reinterpret_cast (segptr->_shmid)) { assert (key ()); } - int shmid () const { return reinterpret_cast(key ()); } + int shmid () const { return reinterpret_cast (key ()); } virtual void cleanup (class process *const client) { diff --git a/winsup/cygwin/cygserver_transport_sockets.cc b/winsup/cygwin/cygserver_transport_sockets.cc index 17f0f9b..6ade14b 100755 --- a/winsup/cygwin/cygserver_transport_sockets.cc +++ b/winsup/cygwin/cygserver_transport_sockets.cc @@ -260,7 +260,7 @@ transport_layer_sockets::read (void *const buf, const size_t buf_len) // verbose: debug_printf ("read (buf = %p, len = %u) [this = %p, fd = %d]", // buf, buf_len, this, _fd); - char *read_buf = static_cast(buf); + char *read_buf = static_cast (buf); size_t read_buf_len = buf_len; ssize_t res = 0; @@ -281,7 +281,7 @@ transport_layer_sockets::read (void *const buf, const size_t buf_len) res = buf_len - read_buf_len; } - if (res != static_cast(buf_len)) + if (res != static_cast (buf_len)) debug_printf ("%d = read (buf = %p, len = %u) [this = %p, fd = %d]: %s", res, buf, buf_len, this, _fd, (res == -1 ? strerror (errno) : "EOF")); @@ -306,7 +306,7 @@ transport_layer_sockets::write (void *const buf, const size_t buf_len) // verbose: debug_printf ("write (buf = %p, len = %u) [this = %p, fd = %d]", // buf, buf_len, this, _fd); - char *write_buf = static_cast(buf); + char *write_buf = static_cast (buf); size_t write_buf_len = buf_len; ssize_t res = 0; @@ -327,7 +327,7 @@ transport_layer_sockets::write (void *const buf, const size_t buf_len) res = buf_len - write_buf_len; } - if (res != static_cast(buf_len)) + if (res != static_cast (buf_len)) debug_printf ("%d = write (buf = %p, len = %u) [this = %p, fd = %d]: %s", res, buf, buf_len, this, _fd, (res == -1 ? strerror (errno) : "EOF")); diff --git a/winsup/cygwin/include/cygwin/cygserver.h b/winsup/cygwin/include/cygwin/cygserver.h index 6b44481..d4ea70f 100755 --- a/winsup/cygwin/include/cygwin/cygserver.h +++ b/winsup/cygwin/include/cygwin/cygserver.h @@ -73,7 +73,7 @@ public: client_request (request_code_t request_code, void *buf = NULL, size_t bufsiz = 0); - virtual ~client_request(); + virtual ~client_request (); request_code_t request_code () const { return _header.request_code; } diff --git a/winsup/cygwin/threaded_queue.h b/winsup/cygwin/threaded_queue.h index a28f045..5b6fddc 100755 --- a/winsup/cygwin/threaded_queue.h +++ b/winsup/cygwin/threaded_queue.h @@ -22,8 +22,8 @@ class queue_request public: queue_request *_next; - queue_request() : _next (NULL) {} - virtual ~queue_request(); + queue_request () : _next (NULL) {} + virtual ~queue_request (); virtual void process () = 0; }; -- cgit v1.1