GNUify non-GNU formatted functions calls throughout.

This commit is contained in:
Conrad Scott 2002-09-22 10:54:38 +00:00
parent bb1f9b213f
commit f70f96c673
8 changed files with 28 additions and 28 deletions

View File

@ -1,3 +1,7 @@
2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
GNUify non-GNU formatted functions calls throughout.
2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
* cygserver_shm.cc (with_strerr): Remove macro.

View File

@ -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 ();

View File

@ -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 ()
{

View File

@ -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

View File

@ -103,12 +103,12 @@ private:
{
public:
cleanup_t (const segment_t *const segptr)
: cleanup_routine (reinterpret_cast<void *>(segptr->_shmid))
: cleanup_routine (reinterpret_cast<void *> (segptr->_shmid))
{
assert (key ());
}
int shmid () const { return reinterpret_cast<int>(key ()); }
int shmid () const { return reinterpret_cast<int> (key ()); }
virtual void cleanup (class process *const client)
{

View File

@ -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<char *>(buf);
char *read_buf = static_cast<char *> (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<ssize_t>(buf_len))
if (res != static_cast<ssize_t> (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<char *>(buf);
char *write_buf = static_cast<char *> (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<ssize_t>(buf_len))
if (res != static_cast<ssize_t> (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"));

View File

@ -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; }

View File

@ -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;
};